qwen3-4b-coder-ft — GGUF (Q8_0)

Q8_0 GGUF quantization of mayankbhaskarr/qwen3-4b-coder-ft, a QLoRA fine-tune of Qwen/Qwen3-4B-Instruct-2507 (trained with Unsloth + Hugging Face TRL) targeting coding and code-instruction tasks. The repo ships the full 38-item live runtime benchmark of this model: executed Python coding tasks with held-out tests, instruction-following rubric checks, and standardized llama-bench throughput profiling.

Model lineage

Stage Repo Format
Base Qwen/Qwen3-4B-Instruct-2507 BF16
Fine-tune mayankbhaskarr/qwen3-4b-coder-ft BF16 safetensors (~8.0 GB)
This repo mayankbhaskarr/qwen3-4b-coder-ft-gguf Q8_0 GGUF (4.28 GB)

Q8_0 is a documented near-lossless format: k-quants reference measurements report only +0.0004% relative perplexity vs BF16 (llama.cpp PR #1684), so this file is a faithful representation of the fine-tuned weights at half the disk footprint.

Provided formats

Format Size BPW Relative ppl (ref.) Availability
BF16 safetensors 8.04 GB 16.00 reference parent repo
Q8_0 4.28 GB 8.50 +0.0004% this repo (qwen3-4b-coder-ft-Q8_0.gguf)
Q5_K_M 2.89 GB 5.70 +0.0142% evaluation derivative (reproduce with one command below)
Q4_K_M 2.50 GB 4.95 +0.0535% evaluation derivative (reproduce with one command below)

Integrity: the uploaded Q8_0 file was hash-verified across independent downloads — SHA-256 ffeb04e87ab636150002c6a22a67a5d01c19d462117bbb98445316ea3a2f9410.

Benchmark evaluation (October 22, 2026)

Method

  • Suite: 38 items — 12 easy + 12 medium + 6 hard executable Python coding tasks (generated code is run against held-out unit tests), plus 8 instruction-following items scored with objective rubric checks (exact-format compliance, JSON schema conformance, executed refactors, MCQ, IPv4 regex).
  • Engine: llama.cpp v0.7.0 (CPU build), llama-server with --jinja (repo chat template), greedy decoding (--temp 0.0), context 1280, 2 threads.
  • Hardware: CPU-only host, 2× Intel Xeon vCPU, 4 GB RAM (~3.7 GB usable), no GPU.
  • Why Q5_K_M / Q4_K_M? The BF16 (~8.0 GB) and Q8_0 (4.28 GB) artifacts exceed the host's usable RAM, so the suite ran on Q5_K_M and Q4_K_M derivatives quantized from the uploaded Q8_0 with llama-quantize --allow-requantize (dequant-f32 path — a documented near-lossless composite). Since Q8_0 itself is near-lossless vs BF16, these results represent the fine-tuned weights faithfully, with a slight conservative bias.

Task accuracy (38/38 items executed per variant)

Tier Q5_K_M Q4_K_M
Easy coding (12) 12/12 (100%) 12/12 (100%)
Medium coding (12) 12/12 (100%) 12/12 (100%)
Hard coding (6) 3/6 (50.0%) 2/6 (33.3%)
Instruction following (8) 6/8 (75.0%) 7/8 (87.5%)
Overall (38) 33/38 (86.8%) 33/38 (86.8%)

Task accuracy by tier

Throughput (llama-bench, pp512 / tg128, 3 reps)

Config Q5_K_M Q4_K_M
Prompt eval, t=1 28.88 tok/s 28.30 tok/s
Prompt eval, t=2 40.54 tok/s 41.93 tok/s
Generation, t=1 2.58 tok/s 3.32 tok/s
Generation, t=2 3.33 tok/s 4.58 tok/s

Throughput

Server cold-load to first healthy response: 8.55 s (Q5_K_M) / 6.3 s (Q4_K_M); peak resident memory ~3.8 GB including the 1,280-token KV cache.

Quantization agreement

The two quantizations produced identical pass/fail outcomes on 36 of 38 items (94.7%). The two disagreements flip in both directions — H04 (JSON flattener): Q5 pass / Q4 fail; I07 (fib refactor): Q5 fail (empty/EOS single-token response under greedy decoding) / Q4 pass — i.e., greedy-decoding tie-breaking noise near the pass threshold, not a systematic quality gap. Combined with the accuracy table above, Q4_K_M is the recommended deployment quant for constrained hardware: 37.5% faster generation, 0.39 GB smaller, faster loading, identical overall accuracy on this suite.

Failure analysis

  • All hard-tier failures (LRU cache, spec-precise tokenizer, sliding-window rate limiter) are boundary-condition assertion errors inside otherwise correct scaffolding — the same three items fail on both variants.
  • The only instruction-tier failure is I04 (code review, two-part rubric): both variants produce the correct fixed loop, but only partially name the bug class (Q5 0/2, Q4 1/2).

Footprint and feasibility

Quantization ladder

Memory feasibility

Usage — llama.cpp

# Serve straight from the Hub (chat template via --jinja)
llama-server -hf mayankbhaskarr/qwen3-4b-coder-ft-gguf -c 1280 -t 4 --jinja

# Or from a local file
llama-server -m qwen3-4b-coder-ft-Q8_0.gguf -c 4096 -t 4 --jinja
# One command to reproduce the evaluation derivatives from this Q8_0
llama-quantize --allow-requantize qwen3-4b-coder-ft-Q8_0.gguf out-Q5_K_M.gguf Q5_K_M
llama-quantize --allow-requantize qwen3-4b-coder-ft-Q8_0.gguf out-Q4_K_M.gguf Q4_K_M

Note: Qwen3-4B-Instruct-2507 is a non-thinking instruct model — no enable_thinking handling is required; keep --temp 0 for deterministic code generation, or --temp 0.7 --top-p 0.8 per the base model's recommended sampling.

Raw data & reproduce

git clone --depth 1 --branch v0.7.0 https://github.com/ggml-org/llama.cpp && cd llama.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=OFF -DLLAMA_CURL=OFF && cmake --build build -j --target llama-server llama-bench
./build/bin/llama-bench -m <model>.gguf -p 512 -n 128 -r 3 -t 1,2

Citation

@misc{bhaskar2026qwen3coderft,
  title  = {Comparative Benchmark Evaluation of a QLoRA Fine-Tuned Qwen3-4B Coder Model and its GGUF Quantization},
  author = {Bhaskar, Mayank},
  year   = {2026},
  month  = {October},
  url    = {https://huggingface.co/mayankbhaskarr}
}

References

  • Dettmers, T., Pagnoni, A., Holtzman, A., & Zettlemoyer, L. (2023). QLoRA: Efficient finetuning of quantized LLMs (arXiv:2305.14314)
  • Yang, A., et al. (2025). Qwen3 Technical Report (arXiv:2505.09388)
  • Kawrakow, I. (2022). K-quantization methods (llama.cpp PR #1684)
  • Kurt, U. (2026). Which quantization should I use? A unified evaluation of llama.cpp quantization methods (arXiv:2601.14277)
Downloads last month
278
GGUF
Model size
4B params
Architecture
qwen3
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mayankbhaskarr/qwen3-4b-coder-ft-gguf

Papers for mayankbhaskarr/qwen3-4b-coder-ft-gguf