Instructions to use peasantsmith/Hy4-Flash-Maya-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 peasantsmith/Hy4-Flash-Maya-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 peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS # Run inference directly in the terminal: llama cli -hf peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS # Run inference directly in the terminal: llama cli -hf peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
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 peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS # Run inference directly in the terminal: ./build/bin/llama cli -hf peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
Use Docker
docker model run hf.co/peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
- Llama new
- LM Studio
- Jan
- vLLM
How to use peasantsmith/Hy4-Flash-Maya-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "peasantsmith/Hy4-Flash-Maya-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": "peasantsmith/Hy4-Flash-Maya-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/peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
- Ollama
How to use peasantsmith/Hy4-Flash-Maya-GGUF with Ollama:
ollama run hf.co/peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
- Unsloth Desktop
- Pi
How to use peasantsmith/Hy4-Flash-Maya-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
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": "peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use peasantsmith/Hy4-Flash-Maya-GGUF with Docker Model Runner:
docker model run hf.co/peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
- Lemonade
How to use peasantsmith/Hy4-Flash-Maya-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
Run and chat with the model
lemonade run user.Hy4-Flash-Maya-GGUF-IQ4_XS
List all available models
lemonade list
- Hermes Agent
How to use peasantsmith/Hy4-Flash-Maya-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 peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
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 peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use peasantsmith/Hy4-Flash-Maya-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS
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 "peasantsmith/Hy4-Flash-Maya-GGUF:IQ4_XS" \ --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"
Hy4-flash · Maya GGUF
GGUF quants of tencent/Hy4-flash (220B parameters: 155.5B language backbone with 512 experts per layer, 63.5B n-gram "Engram" tables, a vision encoder and the DFly2 drafter; 1M context) made for Project Maya. The files also load in llama.cpp with the Hy4-flash pull request (see "Running it").
Sizes
| Size | Experts | Model file | Vision | Drafter | n-gram table (on SSD) |
|---|---|---|---|---|---|
| Maya-XS | 2-bit (IQ2_XXS), every layer | 44.8 GB | 0.8 GB | 0.7 GB | 63.4 GB |
| Maya-S | 2-bit (IQ2_XXS) on layers 1-23, 3-bit (IQ3_XXS) on layers 24-41 | 53.0 GB | 0.8 GB | 0.9 GB | 63.4 GB |
| Maya-M | 3-bit (IQ3_XXS), 4-bit (IQ4_XS) on 7 layers | 68.4 GB | 0.8 GB | 0.9 GB | 63.4 GB |
| Maya-L | 4-bit (IQ4_XS), 5-bit (Q5_K) on 5 layers | 89.5 GB | 0.8 GB | 0.9 GB | 63.4 GB |
Every size uses the same n-gram table file. It is Tencent's FP8 table, value for value; it is read from the SSD page by page while the model runs and does not need to fit in memory.
:gear: Usage Guide
Table: Hardware requirements (units = total memory: RAM + VRAM, or unified memory). The n-gram table is not counted: it stays on the SSD.
| Maya-XS | Maya-S | Maya-M | Maya-L |
|---|---|---|---|
| 56-64 GB | 68-80 GB | 80-96 GB | 104-128 GB |
- Rule of thumb: RAM + VRAM ≈ the model file + the vision file + 4-8 GB for context. With less it still runs, only slower, because parts of the model are then read from disk.
- Maya-XS is the size for a PC with 64 GB of RAM and one GPU (any size; the more VRAM, the more of the experts run on it), or a 64 GB unified-memory machine.
- Keep the n-gram table (63.4 GB) on an SSD or NVMe drive, never on a hard disk. Disk space for Maya-XS in total: about 110 GB.
- Pictures need the vision file; text-only use can skip it.
- With Project Maya, Maya-S, Maya-M and Maya-L need a graphics card of about 12 GB or more: about 9-10 GB of the model always sits on the card. Maya-XS runs on cards from 8 GB.
- Graphics cards under about 10 GB: Project Maya's setup picks a Maya-XS file made for them by itself (the same model and experts, with the attention weights at 4 bits so that the part that must sit on the card fits; slightly lower quality than standard Maya-XS). It is
Maya-XS-8GB/Hy4-Flash-Maya-XS-8GB-00001-of-00002.gguf_filein this repository and uses Maya-XS's n-gram table.
Recommended Settings
Tencent's defaults, which Project Maya applies by itself when the model is selected:
| Parameter | Thinking (reasoning_effort high, the default) |
Direct answers (no_think) |
|---|---|---|
temperature |
0.9 | 0.9 |
top_p |
1.0 | 1.0 |
top_k |
off | off |
- Maximum context window:
1,048,576. - Thinking has two modes: on (
reasoning_efforthigh, the default) and off (no_think). The model is not made for other levels. - Keep the recommended sampling: with greedy decoding (
temperature0) a long thinking phase can start repeating itself, as it can with the original model.
Quality
Measured against the original full-precision model on held-out conversations that were never used for calibration (110,230 answer tokens; the original's own next-token distribution is the reference).
| Same top token as the original | KL divergence (mean) | |
|---|---|---|
| Maya-XS | 88.5% | 0.16 |
| Maya-S | 91.8% | 0.072 |
| Maya-M | 93.6% | 0.046 |
| Maya-L | 96.6% | 0.012 |
The same measurement as charts, by model file size, next to Tencent's own GGUF files (scored the same way, on the same conversations):
How they were made
- Calibration text in Hy4-flash's own chat format, thinking included: a neutral mix of conversations, a large part of it the original model's own answers.
- Every expert is rounded with error feedback against its own input statistics, layer after layer, each layer seeing the already-rounded layers before it.
- The rounding settings were tuned on this model, and the bits per layer follow its measured sensitivity.
- Standard ggml tensor types only, so the files stay loadable by llama.cpp.
Files
| File | What | Size |
|---|---|---|
Maya-XS/Hy4-Flash-Maya-XS-IQ2_XXS-00001-of-00002.gguf |
the model | 44.8 GB |
Maya-XS/Hy4-Flash-Maya-XS-IQ2_XXS-00002-of-00002.gguf |
n-gram table (FP8), same for every size | 63.4 GB |
Maya-XS/mmproj-Hy4-Flash-Maya-XS.gguf |
vision encoder | 0.8 GB |
Maya-XS/Hy4-Flash-Maya-XS-drafter.dfly2 |
DFly2 drafter, for Project Maya | 0.7 GB |
Maya-S/Hy4-Flash-Maya-S-IQ2_S-00001-of-00002.gguf |
the model | 53.0 GB |
Maya-S/Hy4-Flash-Maya-S-IQ2_S-00002-of-00002.gguf |
n-gram table (FP8), same for every size | 63.4 GB |
Maya-S/mmproj-Hy4-Flash-Maya-S.gguf |
vision encoder | 0.8 GB |
Maya-S/Hy4-Flash-Maya-S-drafter.dfly2 |
DFly2 drafter, for Project Maya | 0.9 GB |
Maya-M/Hy4-Flash-Maya-M-IQ3_XXS-00001-of-00002.gguf |
the model | 68.4 GB |
Maya-M/Hy4-Flash-Maya-M-IQ3_XXS-00002-of-00002.gguf |
n-gram table (FP8), same for every size | 63.4 GB |
Maya-M/mmproj-Hy4-Flash-Maya-M.gguf |
vision encoder | 0.8 GB |
Maya-M/Hy4-Flash-Maya-M-drafter.dfly2 |
DFly2 drafter, for Project Maya | 0.9 GB |
Maya-L/Hy4-Flash-Maya-L-IQ4_XS-00001-of-00002.gguf |
the model | 89.5 GB |
Maya-L/Hy4-Flash-Maya-L-IQ4_XS-00002-of-00002.gguf |
n-gram table (FP8), same for every size | 63.4 GB |
Maya-L/mmproj-Hy4-Flash-Maya-L.gguf |
vision encoder | 0.8 GB |
Maya-L/Hy4-Flash-Maya-L-drafter.dfly2 |
DFly2 drafter, for Project Maya | 0.9 GB |
mtp/Hy4-Flash-mtp-BF16.gguf_file |
Tencent's MTP draft block, one file for every size, for Project Maya | 7.5 GB |
Running it
Project Maya (from v1.1.68):
git clone https://github.com/mw00/project-maya.git && cd project-maya
./setup.sh --setup --model hy4-flash-maya-xs # Windows: START-MAYA.bat
The script checks the PC, downloads and verifies the files, builds the engine for your GPU and serves a dashboard
and an OpenAI- and Anthropic-compatible API at http://127.0.0.1:8080.
- Drafting is available in Project Maya: it drafts with Tencent's MTP block, which is in
mtp/as a file of its own (one for every size; the setup downloads it where the graphics card has room for it). - NVIDIA graphics cards on Linux and Windows, and AMD on Linux, are supported.
llama.cpp: Hy4-flash support is in pull request ggml-org/llama.cpp #32517 (not merged yet). Build that branch, then:
llama-server -m Hy4-Flash-Maya-XS-IQ2_XXS-00001-of-00002.gguf --mmproj mmproj-Hy4-Flash-Maya-XS.gguf \
--jinja --temp 0.9 --top-p 1.0 --top-k 0 -c 32768 -ngl 99
Both shards must sit in the same folder; llama.cpp finds the second one by itself. The drafter file is not used by llama.cpp.
License
Hy4-flash is released under the Tencent Hy License
(Apache-2.0 based, with additional commercial terms for large model-as-a-service providers in its section 10). These
files are modified versions of Tencent's weights (quantized; the n-gram table is stored as FP8 codes, the vision
encoder and drafter are re-encoded) and are distributed under the same license; a copy is in this repository
(LICENSE). "Tencent" and "Hy" are Tencent's names; this is not a Tencent release.
- Downloads last month
- 191,067
2-bit
3-bit
4-bit
Model tree for peasantsmith/Hy4-Flash-Maya-GGUF
Base model
tencent/Hy4-flash
