Instructions to use Xylolabs/Hy4-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Xylolabs/Hy4-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 Xylolabs/Hy4-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Xylolabs/Hy4-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Xylolabs/Hy4-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Xylolabs/Hy4-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Xylolabs/Hy4-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Xylolabs/Hy4-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Xylolabs/Hy4-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Xylolabs/Hy4-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Xylolabs/Hy4-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": "Xylolabs/Hy4-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Xylolabs/Hy4-GGUF:Q4_K_M
- Ollama
How to use Xylolabs/Hy4-GGUF with Ollama:
ollama run hf.co/Xylolabs/Hy4-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use Xylolabs/Hy4-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Xylolabs/Hy4-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Xylolabs/Hy4-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Xylolabs/Hy4-GGUF with Docker Model Runner:
docker model run hf.co/Xylolabs/Hy4-GGUF:Q4_K_M
- Lemonade
How to use Xylolabs/Hy4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Xylolabs/Hy4-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Hy4-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Xylolabs/Hy4-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 Xylolabs/Hy4-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:9931/v1 hermes config set model.default Xylolabs/Hy4-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Xylolabs/Hy4-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Xylolabs/Hy4-GGUF:Q4_K_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:9931/v1 \ --custom-model-id "Xylolabs/Hy4-GGUF:Q4_K_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"
GGUF quants of tencent/Hy4 for multimodal inference with llama.cpp.
Files
| Quant | Parts | Size |
|---|---|---|
| Q8_0 | 13 | 818.5 GB |
| Q6_K | 13 | 638.3 GB |
| Q4_K_M | 13 | 464.1 GB |
| IQ3_S | 13 | 328.0 GB |
| IQ2_XXS | 13 | 219.4 GB |
mmproj-Hy4-BF16.gguf (vision) |
1 | 2.7 GB |
mmproj-Hy4-Q8_0.gguf (vision) |
1 | 1.6 GB |
Hy4.imatrix.gguf |
1 | 2.4 GB |
Hy4.imatrix.ub12288.gguf |
1 | 2.4 GB |
How to run
Hy4 support is llama.cpp pull request #32517 until it is merged. Keep all parts of a quant in one folder and pass part 1:
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
git fetch origin pull/32517/head:hy4 && git checkout hy4
cmake -B build -DCMAKE_BUILD_TYPE=Release # add -DGGML_CUDA=ON for NVIDIA GPUs
cmake --build build -j --target llama-cli llama-server
./build/bin/llama-cli -m Hy4-Q4_K_M-00001-of-00013.gguf -ngl 99 --jinja -c 8192
Keep --ubatch-size at 8192 or below; larger ubatches can give wrong output in this llama.cpp build.
Accuracy
Mean KL divergence and top-1 agreement against the BF16 model on WikiText-2, chat and held-out text; Answers is a five-question check.
| Quant | Size | WikiText-2 KL | top-1 | Chat KL | top-1 | Held-out KL | top-1 | Answers |
|---|---|---|---|---|---|---|---|---|
| BF16, flash attention off (part of WikiText-2) | 1541.7 GB | 0.0336 | 95.1% | |||||
| Q8_0 | 818.5 GB | 0.0373 | 94.6% | 0.1187 | 93.3% | 0.0173 | 96.0% | 5/5 |
| Q6_K | 638.3 GB | 0.0431 | 93.8% | 0.1235 | 92.8% | 0.0188 | 95.5% | 5/5 |
| Q4_K_M | 464.1 GB | 0.0920 | 90.8% | 0.1590 | 91.3% | 0.0408 | 93.8% | 5/5 |
| AngelSlim Q4_K_M | 470.2 GB | 0.1464 | 88.3% | 0.2315 | 88.8% | 0.0713 | 91.9% | 5/5 |
| IQ3_S | 328.0 GB | 0.3237 | 82.8% | 0.2851 | 87.3% | 0.1535 | 88.1% | 5/5 |
| AngelSlim IQ2 | 332.4 GB | 0.5673 | 76.9% | 0.4303 | 83.5% | 0.2802 | 83.8% | 5/5 |
| IQ2_XXS | 219.4 GB | 0.8881 | 70.1% | 0.5610 | 80.7% | 0.4522 | 80.3% | 5/5 |
Which file for your hardware
| Hardware | Memory | File | Context |
|---|---|---|---|
| RTX 4090 / RTX 3090 | 24 GB | none | |
| RTX 5090 | 32 GB | offload | 32K |
| RTX 6000 Ada, or 2 x 24 GB | 48 GB | offload | 32K |
| One H100 | 80 GB | offload | 32K |
| RTX PRO 6000 Blackwell (GDDR7) | 96 GB | offload | 32K |
| DGX Spark | 128 GB unified | none | |
| Mac Studio M5 Max | 128 GB unified | none | |
| One H200 (HBM3e) | 141 GB | offload | 32K |
| One B200 | 192 GB | offload | 32K |
| Mac Studio M5 Ultra | 256 GB unified | Hy4-IQ2_XXS* (219.4 GB) |
64K |
| Mac Studio M5 Ultra | 512 GB unified | Hy4-IQ3_S (328.0 GB) |
512K |
| One B300 (HBM3e) | 288 GB | Hy4-IQ2_XXS (219.4 GB) |
256K |
| 2 x H200 | 282 GB | Hy4-IQ2_XXS (219.4 GB) |
256K |
| 4 x H200 | 564 GB | Hy4-Q4_K_M (464.1 GB) |
256K |
| 8 x H200 | 1,128 GB | Hy4-Q8_0 (818.5 GB) |
1M |
| 4 x B200 | 768 GB | Hy4-Q6_K (638.3 GB) |
64K |
| 8 x B200 | 1,536 GB | Hy4-Q8_0 (818.5 GB) |
1M |
* Needs the macOS GPU memory limit raised.
Offload: llama-server -m FILE --n-cpu-moe 78 keeps the expert weights in system RAM.
License and notices
These files are under the Tencent Hy License, Version 1.0, copied in LICENSE. We converted the weights to GGUF and quantized them.
Updates
- 2026-11-22: Added Q6_K (638.3 GB) and IQ2_XXS (219.4 GB).
- 2026-11-21: Added IQ3_S and the importance matrices; accuracy re-measured on WikiText-2, chat and held-out text.
- 2026-11-20: First release: Q8_0 and Q4_K_M with BF16 and Q8_0 vision projectors.
- Downloads last month
- 1,793
Model tree for Xylolabs/Hy4-GGUF
Base model
tencent/Hy4