A 4-bit GGUF of Qwen2.5-1.5B-Instruct for llama.cpp, Ollama and LM Studio. It is the same size as bartowski's widely used Q4_K_M (940 MiB) and closer to the full-precision model on every measure we tried.
Independent check with llama.cpp's own llama-perplexity (Metal build, MacBook Pro M4 Pro, 2026-10-08). Perplexity:
2048-token context, 20 chunks. KL divergence and top-1 agreement against our own f16 conversion of the base model: 512-token
context, 20 chunks. WikiText-2 test and a Python source corpus. Lower is better for perplexity and KL.
| file | MiB | wiki ppl | code ppl | wiki KL | wiki top-1 | code KL | code top-1 |
|---|---|---|---|---|---|---|---|
| f16 | 2950 | 8.309 | 2.066 | – | – | – | – |
| bartowski Q4_K_M | 940 | 8.568 | 2.133 | 0.0287 | 90.61% | 0.0453 | 93.41% |
| this file | 946 | 8.444 | 2.130 | 0.0242 | 92.31% | 0.0390 | 94.43% |
The standard errors reported by llama.cpp are about ±0.0007 for wiki KL, ±0.0015 for code KL, and ±0.4 points for top-1.
Five held-out sets, PyTorch evaluator (KL to fp16 / top-1, 8 windows of 2048 tokens; measured on an NVIDIA A10G, both files evaluated the same way):
| wiki | code | chat (GSM8K / MMLU) | UltraChat | multilingual | |
|---|---|---|---|---|---|
| bartowski Q4_K_M | 0.0282 / 91.70% | 0.0381 / 94.03% | 0.0334 / 93.84% | 0.0255 / 92.61% | 0.0317 / 91.15% |
| this file | 0.0229 / 92.82% | 0.0353 / 94.69% | 0.0220 / 94.38% | 0.0205 / 93.24% | 0.0288 / 91.98% |
llama-cli -hf dfed24/Qwen2.5-1.5B-Instruct-Q4_K-GGUF -cnv
ollama run hf.co/dfed24/Qwen2.5-1.5B-Instruct-Q4_K-GGUF
Every linear layer is stored as standard Q4_K: a 16-bit scale and minimum per 256 weights, with 6-bit sub-scales and sub-minimums per 32. The token embedding, which this model also uses as its output layer, is stored as Q8_0. No importance matrix was used. Instead:
Fitting the codes. The recipe from github.com/dfed25/mlx-gptq is run with every grid constrained to what Q4_K can store. It consists of error-feedback rounding (GPTQ), a range search and a Lloyd fit of each group's grid, coordinate-descent refinement of the codes, and a weighted refit of the grids. The refinement uses a stronger ridge term (0.05 on the normalised Hessian), which stops it from over-fitting the calibration text.
Calibration. 256 windows of 512 tokens drawn from several sources:
The held-out sets are test splits or separate text (WikiText-2 test, Python source from a different package, GSM8K and MMLU test items). The calibration mix and the fine-tune settings were chosen while watching these held-out numbers, so the comparison is careful but not blind.
KL fine-tune. With the 4-bit codes fixed, the 16-bit super-scales, RMSNorm weights and attention biases are trained for 300 steps to minimise the KL divergence to the fp16 model on the calibration text. Everything trained is stored in the file as-is, so the file is the tuned model.
None of these steps is new on its own: GPTQ, K-quant packing and fine-tuning of quantization scales are all established techniques. What this release adds is a combination of them that gives a better file at the same size, for this model. A 27B version made with the same recipe is at dfed24/Qwen3.8-27B-GPTQ-GGUF. It uses unsloth's per-tensor allocation and no KL fine-tune (which gave nothing on that model). In llama.cpp it has 23% lower KL than unsloth's UD-Q4_K_M on code and is about equal on multilingual text, but 7% higher on English wiki text.
The quantization recipe is by Domenic Federico (Cal Poly San Luis Obispo; domfederico21@gmail.com). The K-quant port, calibration mix, KL fine-tune and GGUF packing are by a collaborator. The independent llama.cpp evaluation is by Domenic Federico. The work was built with Claude (Anthropic) as a coding and research assistant. The licence follows the base model (Apache 2.0).