Instructions to use alan13367/Qwen3.5-4B-RustCoder-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 alan13367/Qwen3.5-4B-RustCoder-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 alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
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 alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
Use Docker
docker model run hf.co/alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use alan13367/Qwen3.5-4B-RustCoder-GGUF with Ollama:
ollama run hf.co/alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use alan13367/Qwen3.5-4B-RustCoder-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
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": "alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use alan13367/Qwen3.5-4B-RustCoder-GGUF with Docker Model Runner:
docker model run hf.co/alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
- Lemonade
How to use alan13367/Qwen3.5-4B-RustCoder-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3.5-4B-RustCoder-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use alan13367/Qwen3.5-4B-RustCoder-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 alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
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 alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use alan13367/Qwen3.5-4B-RustCoder-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M
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 "alan13367/Qwen3.5-4B-RustCoder-GGUF:Q4_K_M" \ --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-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.1 | 2.7 GB | Smaller and faster, slightly less accurate (see Checks) |
Other versions:
- Qwen3.5-4B-RustCoder: bf16 safetensors, for transformers.
- Qwen3.5-4B-RustCoder-MLX-8bit: MLX, for Apple Silicon. This is the checkpoint that was trained and evaluated.
Results of the fine-tune
Pass rate on held-out Rust tasks with hidden tests: 4 samples per task, thinking on, no system prompt. These were measured on the MLX 8-bit checkpoint. The GGUF files were not run on these tiers.
| Pass rate | Easy (29 tasks) | Hard (40) | Quality (29) | Dev (82) |
|---|---|---|---|---|
| Qwen3.5-4B (8-bit) | 41.4% | 7.5% | 8.6% | 20.7% |
| Qwen3.5-4B-RustCoder | 51.7% | 8.8% | 17.2% | 22.9% |
Pooled over all 180 tasks, the gain over the base is +4.3 points (95% CI +0.6 to +8.2). 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. They were not tested here.
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. Answers that finish take a median of about 1.2k tokens. 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.
Checks
Both files were converted from the bf16 weights with llama.cpp's convert_hf_to_gguf.py (build b12110), then quantized with llama-quantize, without an importance matrix. Tested with llama.cpp on CPU.
Perplexity on six of the model's own training answers, rendered with its chat template (llama-perplexity, 2048-token chunks):
| File | Perplexity | Loss per token |
|---|---|---|
| bf16 (not uploaded) | 1.3632 ยฑ 0.019 | 0.310 |
| Q8_0 | 1.3630 ยฑ 0.019 | 0.310 |
| Q4_K_M | 1.3760 ยฑ 0.019 | 0.319 |
Q8_0 is indistinguishable from bf16. Q4_K_M costs about 1% in perplexity. The bf16 weights have a loss of 0.24 to 0.44 on the same kind of answers in transformers, which matches the training loss.
Neither file has been run on the evaluation tiers yet.
License
Apache 2.0, the license of the base model Qwen/Qwen3.5-4B.
- Downloads last month
- -
4-bit
8-bit