Instructions to use AngelSlim/Hy3-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use AngelSlim/Hy3-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="AngelSlim/Hy3-GGUF", filename="Hy3-IQ1_M-mtp.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 AngelSlim/Hy3-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf AngelSlim/Hy3-GGUF:IQ1_M # Run inference directly in the terminal: llama cli -hf AngelSlim/Hy3-GGUF:IQ1_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AngelSlim/Hy3-GGUF:IQ1_M # Run inference directly in the terminal: llama cli -hf AngelSlim/Hy3-GGUF:IQ1_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 AngelSlim/Hy3-GGUF:IQ1_M # Run inference directly in the terminal: ./llama-cli -hf AngelSlim/Hy3-GGUF:IQ1_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 AngelSlim/Hy3-GGUF:IQ1_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf AngelSlim/Hy3-GGUF:IQ1_M
Use Docker
docker model run hf.co/AngelSlim/Hy3-GGUF:IQ1_M
- LM Studio
- Jan
- vLLM
How to use AngelSlim/Hy3-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AngelSlim/Hy3-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": "AngelSlim/Hy3-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AngelSlim/Hy3-GGUF:IQ1_M
- Ollama
How to use AngelSlim/Hy3-GGUF with Ollama:
ollama run hf.co/AngelSlim/Hy3-GGUF:IQ1_M
- Unsloth Studio
How to use AngelSlim/Hy3-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 AngelSlim/Hy3-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 AngelSlim/Hy3-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for AngelSlim/Hy3-GGUF to start chatting
- Pi
How to use AngelSlim/Hy3-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AngelSlim/Hy3-GGUF:IQ1_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": "AngelSlim/Hy3-GGUF:IQ1_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use AngelSlim/Hy3-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AngelSlim/Hy3-GGUF:IQ1_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 AngelSlim/Hy3-GGUF:IQ1_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use AngelSlim/Hy3-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AngelSlim/Hy3-GGUF:IQ1_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "AngelSlim/Hy3-GGUF:IQ1_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use AngelSlim/Hy3-GGUF with Docker Model Runner:
docker model run hf.co/AngelSlim/Hy3-GGUF:IQ1_M
- Lemonade
How to use AngelSlim/Hy3-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AngelSlim/Hy3-GGUF:IQ1_M
Run and chat with the model
lemonade run user.Hy3-GGUF-IQ1_M
List all available models
lemonade list
Dedicated to building a more intuitive, comprehensive, and efficient LLMs compression toolkit.
📖 Documentation | 🤗 Hugging Face | 🤖 ModelScope | 💬 WeChat
Hy3 llama.cpp Quantization
Quantize and run Hy3 (hy_v3) on llama.cpp with MTP self-speculative decoding and a thinking/tool-call parser. One script patches and builds llama.cpp; recipes and a chat template are included for quantizing your own low-bit GGUF from a calibration set.
Two parts below: Deploy (build & run) and Quantization.
Quick Start
Build
bash setup_hyv3_llama.sh # clone into ./llama.cpp-hyv3, auto CUDA/CPU
bash setup_hyv3_llama.sh /path/to/target # choose the clone directory
CUDA=0 bash setup_hyv3_llama.sh # force a CPU-only build
The script pins a verified llama.cpp base commit, applies patches/01 (base arch)
then patches/02 (MTP + parser), and builds it. Binaries land in <target>/build/bin/.
Run
# plain serve (no speculative decoding)
./llama.cpp-hyv3/build/bin/llama-server -m /path/to/Hy3.gguf -ctk q8_0 -ctv q8_0 -fa on -c 65536
# serve + MTP self-speculative decoding (needs an MTP gguf, i.e. converted WITHOUT --no-mtp)
./llama.cpp-hyv3/build/bin/llama-server -m /path/to/Hy3-mtp.gguf --spec-type draft-mtp --spec-draft-n-max 3 --spec-draft-n-min 1 -ctk q8_0 -ctv q8_0 -ctkd q8_0 -ctvd q8_0 -fa on -c 65536
Recommended setups
| GPUs | build | MTP | -c (context) |
KV cache |
|---|---|---|---|---|
| 1× H20 (96 GB) | IQ1_M | no | -c 65536 |
-ctk q8_0 -ctv q8_0 |
| 2× H20 (192 GB) | IQ1_M | yes | / (default) | / (f16) |
| 2× H20 (192 GB) | Q4_K_M | yes | -c 65536 |
-ctk q8_0 -ctv q8_0 -ctkd q8_0 -ctvd q8_0 |
| 4× H20 (384 GB) | Q4_K_M | yes | / (default) | / (f16) |
Weights: IQ1_M ~83 GiB, Q4_K_M ~166 GiB (MTP adds ~2 GiB plus a draft KV cache).
1 card fits only IQ1_M, and tightly — shrink context, quantize KV, no MTP. 2 cards
run IQ1_M+MTP with room to spare (drop -c/KV flags), but Q4_K_M+MTP is tight, so
keep -c 65536 and q8_0 KV (main + draft). 4 cards run Q4_K_M+MTP comfortably.
Troubleshooting
Error: no such instruction: vdpbf16ps(inggml-cpu'svec.cpp/sgemm.cpp): the CPU has AVX512-BF16 but the system assembler (old binutils) can't encode it. The script auto-detects this and adds-DGGML_NATIVE=OFF; force it withGGML_NATIVE=0 bash setup_hyv3_llama.shif needed. Unrelated to the patches; CUDA inference is unaffected.undefined reference to SSL_get1_peer_certificate: the system OpenSSL is too old. OpenSSL is off by default here (-DLLAMA_OPENSSL=OFF); it only affects the server's HTTPS model download, not local GGUF serving. SetOPENSSL=1if you have OpenSSL 3.0+ and need it.
Quantize with Your Own Data
If you have a calibration set, you can compute your own importance matrix and quantize the model yourself. All steps use stock llama.cpp tools; the mixed-precision recipes and a minja-compatible chat template are shipped in this folder.
The mixed-precision recipes
The recipes in recipes/ spend bits where they matter:
- Attention (
attn_q/k/v) and the token embedding / output head stay high (q8_0 / q4_K / q6_K) — cheap in size, and where low bits hurt most. - Shared experts (
ffn_*_shexp, active on every token) stay at q5_K–q6_K. - Routed experts (
ffn_*_exps) carry the aggressive low bits and dominate the file size. In the IQ1_M recipe most layers are iq1_m, withffn_downa bit higher (iq3_xxs) and sensitive layers upgraded (iq2_xxs) layer-by-layer.
| recipe | target | MTP head |
|---|---|---|
recipes/hyv3_q4km_recipe.txt |
~Q4_K_M mixed | no |
recipes/hyv3_q4km_mtp_recipe.txt |
~Q4_K_M mixed | yes |
recipes/hyv3_iq1m_recipe.txt |
~IQ1_M mixed (extreme) | no |
recipes/hyv3_iq1m_mtp_recipe.txt |
~IQ1_M mixed (extreme) | yes |
The *_mtp variants add the MTP block (blk.<n>.nextn.* and layer-<n> experts).
Use them only for a gguf that still has the MTP head; use the plain ones for a gguf
converted with --no-mtp. (The MTP block's experts stay at K-quant, not IQ*, because
very-low-bit IQ types need an imatrix and the imatrix only covers the trunk layers.)
1. Convert HF → BF16 GGUF
PYTHONPATH=./llama.cpp-hyv3/gguf-py python ./llama.cpp-hyv3/convert_hf_to_gguf.py /path/to/HYV3-hf --outfile Hy3-BF16.gguf --outtype bf16
# add --no-mtp to drop the MTP head (then use a non-mtp recipe below)
2. Compute the importance matrix (imatrix)
The calibration file is plain text containing samples with the model's special
tokens already applied (one file, fed via -f). The imatrix is independent of the
target quant type — compute it once on BF16 and reuse it for any recipe.
./llama.cpp-hyv3/build/bin/llama-imatrix -m Hy3-BF16.gguf -f calib.txt -o imatrix.gguf --output-format gguf --parse-special
# single GPU can't hold BF16 -> add --cpu-moe (keep experts on CPU) or -ngl 0
3. Quantize with a recipe
Pick the recipe matching your target and whether the gguf has an MTP head (table
above). --token-embedding-type differs: keep it at q8_0 for Q4_K_M (embedding is
cheap, no reason to crush it), drop it to q4_K for the extreme IQ1_M build. The
examples below are for MTP ggufs — use the non-mtp recipe for a --no-mtp gguf.
# ~Q4_K_M mixed
./llama.cpp-hyv3/build/bin/llama-quantize --imatrix imatrix.gguf --tensor-type-file recipes/hyv3_q4km_mtp_recipe.txt --token-embedding-type q8_0 --output-tensor-type q6_K Hy3-BF16-mtp.gguf Hy3-Q4_K_M-mtp.gguf Q4_K_M
# ~IQ1_M mixed (extreme)
./llama.cpp-hyv3/build/bin/llama-quantize --imatrix imatrix.gguf --tensor-type-file recipes/hyv3_iq1m_mtp_recipe.txt --token-embedding-type q4_K --output-tensor-type q6_K Hy3-BF16-mtp.gguf Hy3-IQ1_M-mtp.gguf IQ1_M
4. (Optional) Embed a minja-compatible chat template
Hy3's built-in chat_template uses Python str.format, which llama.cpp's minja
engine can't evaluate → chat/--jinja mode crashes. hyv3_opensource_chat_template.jinja
is a static version (suffix hard-coded to :opensource, .format expanded). Bake it
into the gguf so --jinja works without --chat-template-file at runtime:
PYTHONPATH=./llama.cpp-hyv3/gguf-py python -m gguf.scripts.gguf_new_metadata --chat-template "$(cat hyv3_opensource_chat_template.jinja)" --force Hy3-IQ1_M-mtp.gguf Hy3-IQ1_M-mtp-tmpl.gguf
- Downloads last month
- -
1-bit
4-bit
Model tree for AngelSlim/Hy3-GGUF
Base model
tencent/Hy3