Instructions to use YoozLabs/Qwen3.5-4B-qat-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 YoozLabs/Qwen3.5-4B-qat-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 YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0 # Run inference directly in the terminal: llama cli -hf YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0 # Run inference directly in the terminal: llama cli -hf YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
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 YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0 # Run inference directly in the terminal: ./llama-cli -hf YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
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 YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
Use Docker
docker model run hf.co/YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
- LM Studio
- Jan
- vLLM
How to use YoozLabs/Qwen3.5-4B-qat-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YoozLabs/Qwen3.5-4B-qat-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": "YoozLabs/Qwen3.5-4B-qat-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
- Ollama
How to use YoozLabs/Qwen3.5-4B-qat-GGUF with Ollama:
ollama run hf.co/YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
- Unsloth Desktop
- Pi
How to use YoozLabs/Qwen3.5-4B-qat-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use YoozLabs/Qwen3.5-4B-qat-GGUF with Docker Model Runner:
docker model run hf.co/YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
- Lemonade
How to use YoozLabs/Qwen3.5-4B-qat-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
Run and chat with the model
lemonade run user.Qwen3.5-4B-qat-GGUF-Q4_0
List all available models
lemonade list
- Hermes Agent
How to use YoozLabs/Qwen3.5-4B-qat-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 YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
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 YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use YoozLabs/Qwen3.5-4B-qat-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0
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 "YoozLabs/Qwen3.5-4B-qat-GGUF:Q4_0" \ --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"
Qwen3.5-4B (Yooz QAT, GGUF Q4_0)
What this is
The GGUF (Q4_0) release of Yooz Labs' quantization-aware-trained (QAT) Qwen3.5-4B -- the same weights as Qwen3.5-4B-qat-lean-4bit-mlx, converted for llama.cpp. Stock 4-bit PTQ builds of this model break its aggregation abilities outright (variable-tracking collapses to 0.00 on the MLX product grid); this build is trained to tolerate 4-bit quantization via knowledge distillation from the full-precision bf16 model, so the quantized weights reproduce the original model's behavior -- aggregation AND multi-turn recall -- at both short and long context.
Provenance
- Base checkpoint:
Qwen/Qwen3.5-4B - QAT training: Yooz Labs, 2026-07 -- knowledge distillation from the bf16 base model under fake-quantization matching the MLX 4-bit group-64 grid (the training target; this GGUF is the same trained weights re-quantized to Q4_0 for llama.cpp). Full-parameter training at this size. Training recipes are not published.
- Conversion:
llama.cppconvert_hf_to_gguf.py+llama-quantizeto Q4_0 (build e3546c7). The converter's block count is set to 32 layers, matching this model's actual depth. - Harness:
benchmarks/(infiniterepo, Yooz Labs).
Validation
The comprehensive A/B (needle-in-a-haystack, RULER-style aggregation, MRCR) was run on the MLX build of these exact weights, since that is where the full n=30, two-context-length harness lives; see Qwen3.5-4B-qat-lean-4bit-mlx for the full table and chart. Summary:
| Task | Context | 4-bit PTQ, same grid | Yooz QAT 4-bit |
|---|---|---|---|
| NIAH single | 8K | 1.00 | 1.00 |
| NIAH multikey | 8K | 1.00 | 0.97 |
| Variable tracking | 8K | 0.00 | 0.97 |
| Frequent words | 8K | 0.12 | 0.83 |
| MRCR 2-needle | 8K | 0.97 | 0.97 |
| NIAH single | 32K | 0.97 | 1.00 |
| NIAH multikey | 32K | 1.00 | 0.97 |
| Variable tracking | 32K | 0.89 | 0.99 |
| Frequent words | 32K | 0.22 | 0.77 |
| MRCR 2-needle | 32K | 0.96 | 0.96 |
This GGUF file was separately spot-checked through the actual llama.cpp Q4_0 path (not just the MLX grid) at 8K context, n=30, on an A100-SXM4-80GB (AMD EPYC 7713, Ubuntu 22.04, llama.cpp build e3546c7):
| Task | Context | Yooz QAT 4-bit (this GGUF file) |
|---|---|---|
| Variable tracking | 8K | 0.96 |
| Frequent words | 8K | 0.62 |
| MRCR 2-needle | 8K | 0.94 |
Consistent with the MLX numbers above -- the fix survives re-quantization to a different format.
Usage
llama-cli -m Qwen3.5-4B-qat-Q4_0.gguf -p "List the first five prime numbers." -n 64
Or with llama-server for an OpenAI-compatible endpoint:
llama-server -m Qwen3.5-4B-qat-Q4_0.gguf --port 8080
An MLX build of the same QAT weights is available at YoozLabs/Qwen3.5-4B-qat-lean-4bit-mlx.
About Yooz Labs
Maintained by Yooz Labs -- sovereign, on-device AI for macOS. Everything we ship runs locally; nothing goes to a cloud. This build comes out of our long-context research line, where we found and quantified the PTQ aggregation crater -- and then trained it away.
Questions, issues, or corrections: dev@yooz.info
License and attribution
Apache 2.0, inherited from the base checkpoint Qwen/Qwen3.5-4B. Qwen is
a model family by Alibaba Cloud; this is an independent, unofficial QAT
build, not distributed, endorsed, or certified by Alibaba.
- Downloads last month
- 238
4-bit