alan13367's picture
Version 2: round 10 M7, GGUF Q8_0 and Q4_K_M
7671b72 verified
|
Raw History Blame Contribute Delete
3.62 kB
metadata
base_model: alan13367/Qwen3.5-4B-RustCoder
base_model_relation: quantized
license: apache-2.0
language:
  - en
tags:
  - gguf
  - llama.cpp
  - qwen3.5
  - rust
  - code

Qwen3.5-4B-RustCoder-GGUF

GGUF quantizations of alan13367/Qwen3.5-4B-RustCoder: Qwen/Qwen3.5-4B fine-tuned to write Rust that compiles, passes tests and is clippy-clean, with its thinking mode kept. They are for llama.cpp and other GGUF runtimes. Text only: no vision projector is included.

File Bits per weight Size Use
Qwen3.5-4B-RustCoder-Q8_0.gguf 8.5 4.5 GB Closest to the evaluated model
Qwen3.5-4B-RustCoder-Q4_K_M.gguf 5.2 2.7 GB Smaller and faster, slightly less accurate

Version 2 (2026-11-20). A weighted merge of two LoRA fine-tunes, +3.2 points over the first release. The first release is still available at revision 9b58a82.

Other versions:

Results of the fine-tune

Pass rate on held-out Rust tasks with hidden tests: 4 samples per task in each of two evaluation runs, thinking on, no system prompt. These were measured on the MLX 8-bit checkpoint, not on the GGUF files.

Pass rate Easy (29 tasks) Hard (40) Quality (29) Dev (82) All (180)
Qwen3.5-4B (8-bit) 43.5% 6.9% 8.6% 20.1% 19.1%
Qwen3.5-4B-RustCoder v2 53.0% 8.1% 15.9% 23.6% 23.7%

Pooled over all 180 tasks, the gain over the base is +4.6 points (95% CI +1.8 to +7.4). With a compiler in the loop (keep an answer that builds and is clippy-clean, retry with the errors) it reaches 38.9%, and 43.0% when its own unit tests choose among 8 answers. The data, the training and the limitations are in the main model card.

Usage

With llama.cpp (a build with Qwen3.5 support):

llama-server -hf alan13367/Qwen3.5-4B-RustCoder-GGUF:Q8_0 -c 8192 \
  --temp 0.6 --top-p 0.95 --top-k 20

Then send chat requests to http://localhost:8080/v1/chat/completions. Use :Q4_K_M for the smaller file. Other GGUF runtimes, such as Ollama and LM Studio, can load these files if their bundled llama.cpp supports the qwen35 architecture.

Recommended:

  • Use no system prompt. Training and evaluation used none.
  • Leave thinking on. The chat template thinks by default.
  • Allow about 4096 output tokens and a context of at least 8192. An answer that runs to the cap is usually stuck in a reasoning loop, so resampling helps more than a longer cap.
  • Use temperature 0.6, top-p 0.95 and top-k 20. These are the settings behind the results.

Conversion

Both files were converted from the bf16 weights with llama.cpp's convert_hf_to_gguf.py (build b12359), then quantized with llama-quantize, without an importance matrix. Perplexity on six of the model's training answers, rendered with its chat template (llama-perplexity, 2048-token chunks): Q8_0 1.379, Q4_K_M 1.387 (about 0.6% higher).

License

Apache 2.0, the license of the base model Qwen/Qwen3.5-4B.