Instructions to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF", filename="Hy-MT2-30B-A3B-Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
Use Docker
docker model run hf.co/GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
- Ollama
How to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with Ollama:
ollama run hf.co/GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
- Unsloth Studio
How to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF to start chatting
- Pi
How to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with Docker Model Runner:
docker model run hf.co/GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
- Lemonade
How to use GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Hy-MT2-30B-A3B-4bit-GGUF-Q4_K_M
List all available models
lemonade list
Hy-MT2-30B-A3B 4bit GGUF
GGUF quantizations of tencent/Hy-MT2-30B-A3B, with Q4_K_M as the
recommended 4bit deployment file.
Files
| File | Size | Notes |
|---|---|---|
Hy-MT2-30B-A3B-Q2_K.gguf |
10.30 GiB | smallest test build |
Hy-MT2-30B-A3B-Q3_K_M.gguf |
13.45 GiB | lower VRAM option |
Hy-MT2-30B-A3B-Q4_K_M.gguf |
16.98 GiB | recommended default |
Hy-MT2-30B-A3B-BF16.gguf |
56.03 GiB | conversion source |
patches/llama-cpp-hyv3.patch |
17 KiB | required when upstream llama.cpp has no HYV3 support |
Important
Current upstream llama.cpp may not support HYV3ForCausalLM / model_type=hy_v3
directly. This repository includes the required patch at:
patches/llama-cpp-hyv3.patch
Clone this model repository first, then prepare a patched llama.cpp checkout:
git lfs install
git clone https://huggingface.co/GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF
cd Hy-MT2-30B-A3B-4bit-GGUF
bash scripts/prepare_llama_cpp.sh ./llama.cpp
For CUDA 13.1 builds:
CUDA_HOME=/usr/local/cuda-13.1 bash scripts/prepare_llama_cpp.sh ./llama.cpp
Run Q4 Server
cd Hy-MT2-30B-A3B-4bit-GGUF
CUDA_VISIBLE_DEVICES=0 bash scripts/run_q4_server.sh
The script runs:
./llama.cpp/build-hyv3-cuda/bin/llama-server \
-m Hy-MT2-30B-A3B-Q4_K_M.gguf \
-ngl all \
--host 127.0.0.1 \
--port 8080
Test Translation
bash scripts/test_translation.sh
Expected style:
The weather is really nice today.
Use stop strings when serving through the OpenAI-compatible endpoint:
["<eos:6124c78e>", "<|hy_User|>", "<|hy_Assistant|>"]
Measured Local Runtime
Test machine: RTX 4090, WSL CUDA, patched llama.cpp.
| Quant | GPU model buffer | Notes |
|---|---|---|
| Q2_K | 10465.90 MiB | 49/49 layers offloaded |
| Q3_K_M | 13670.82 MiB | 49/49 layers offloaded |
| Q4_K_M | 17254.26 MiB | 49/49 layers offloaded |
For Q4 server translation tests after warmup, generation was typically around
195-206 tok/s on the local 4090 setup. Actual speed depends on prompt length,
context size, batch settings, and build options.
Tested Cases
The Q4 server path was tested with:
- normal Chinese to English translation
- mixed Chinese/English/Japanese text
- code and function names
- Markdown lists and tables
- XML tags
- JSON-like text
- logs, shell commands, and Windows/WSL paths
Structure-heavy prompts should explicitly ask the model to preserve structure, keys, tags, and newlines.
License
This repository contains quantized derivatives of tencent/Hy-MT2-30B-A3B.
Follow the upstream model license and usage terms.
- Downloads last month
- 3,741
2-bit
3-bit
4-bit
Model tree for GrahLnn/Hy-MT2-30B-A3B-4bit-GGUF
Base model
tencent/Hy-MT2-30B-A3B