Instructions to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="h0ney-badger/qwen2.5-coder-1.5b-python-distill", filename="qwen-coder-1.5b-py-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill 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 h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M # Run inference directly in the terminal: llama cli -hf h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M # Run inference directly in the terminal: llama cli -hf h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
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 h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
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 h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
Use Docker
docker model run hf.co/h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "h0ney-badger/qwen2.5-coder-1.5b-python-distill" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h0ney-badger/qwen2.5-coder-1.5b-python-distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
- Ollama
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with Ollama:
ollama run hf.co/h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
- Unsloth Studio
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for h0ney-badger/qwen2.5-coder-1.5b-python-distill to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for h0ney-badger/qwen2.5-coder-1.5b-python-distill to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for h0ney-badger/qwen2.5-coder-1.5b-python-distill to start chatting
- Pi
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf h0ney-badger/qwen2.5-coder-1.5b-python-distill: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 h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf h0ney-badger/qwen2.5-coder-1.5b-python-distill: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 "h0ney-badger/qwen2.5-coder-1.5b-python-distill: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"
- Docker Model Runner
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with Docker Model Runner:
docker model run hf.co/h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
- Lemonade
How to use h0ney-badger/qwen2.5-coder-1.5b-python-distill with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull h0ney-badger/qwen2.5-coder-1.5b-python-distill:Q4_K_M
Run and chat with the model
lemonade run user.qwen2.5-coder-1.5b-python-distill-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)Qwen2.5-Coder-1.5B-Instruct โ Python self-distill (GGUF)
A tiny, Python-focused QLoRA fine-tune of Qwen2.5-Coder-1.5B-Instruct, distilled from a Qwen2.5-Coder-14B-Instruct teacher on locally-generated, execution-verified Python data. Quantized to Q4_K_M โ 941 MB โ so it runs comfortably on CPU on old / low-power hardware (built to run on a 2014 ThinkPad W541, no GPU needed).
TL;DR โ 81.5% Python pass@1 in under 1 GB. That's +7.4 points over the stock 1.5B, and it beats a stock 7B at Python while being ~5ร smaller โ plus it now writes complete, interactive programs, not just bare functions.
Results (execution-based pass@1, Python)
Same 54-sample held-out Python eval, same Q4_K_M quant. Base = the exact weights this was fine-tuned from.
| Model | Python pass@1 |
|---|---|
| Qwen2.5-Coder-1.5B-Instruct (base) | 74.1% (40/54) |
| This model | 81.5% (44/54) |
For context, on the same eval the stock 7B scored 77.8% at Python โ this 941 MB model edges it out for Python.
pass@1 = the model's code was executed against held-out tests and had to pass. Carries ยฑ1โ2 samples of sampling noise.
How it was made
Teacher (Qwen2.5-Coder-14B) generates Python tasks + solutions + tests โ each is executed, only passing samples kept โ QLoRA SFT of the 1.5B student (Unsloth, r=16, 3 epochs) โ merged 16-bit โ GGUF Q4_K_M. Same pipeline as the 7B sibling, Python-only.
Training data mixes two styles (~566 samples): execution-verified functions
and complete, runnable programs from natural requests (calculators, CLIs,
games, file tools โ teacher-generated + hand-authored gold, each run-verified). The
complete-program half is what makes it write whole interactive programs (using
input(), menus, etc.) rather than bare functions.
โ ๏ธ Run it right or it feels dumb
A 1.5B must be run with the chat template applied and low temperature, or
it rambles. Use llama-server (applies the template automatically) or llama-cli -cnv
with --temp 0.2. Do not use plain llama-cli -p "..." (raw completion, temp 0.8) โ
that's the usual reason a small local model seems broken.
Evaluation methodology
Execution-based pass@1 on a dedicated eval set disjoint from training (exact + fuzzy dedup). Deliberately not HumanEval/MBPP โ the goal was an honest, contamination-controlled comparison against the base, not a leaderboard number.
Honest limitations
- Python only. It was trained and evaluated on Python; don't expect other languages to benefit.
- Modest, specialized gain. +3.7 points over an already-decent base, on a same-distribution eval โ a neutral benchmark would likely show less.
- Small model: fine for functions, scripts, and everyday Python help; not a reasoning-heavy or large-context coder.
Usage (CPU-friendly)
Q4_K_M GGUF, 941 MB. On CPU (e.g. an old laptop):
# llama.cpp on CPU โ no GPU offload
llama-cli -m qwen-coder-1.5b-py-Q4_K_M.gguf -p "Write a Python function to ..."
llama-server -m qwen-coder-1.5b-py-Q4_K_M.gguf -c 4096 # OpenAI-compatible API
# or load the .gguf in LM Studio
Provenance & license
- License: Apache-2.0. Base (Qwen2.5-Coder-1.5B) and teacher (Qwen2.5-Coder-14B) are both Apache-2.0 โ no restriction on training from model outputs โ and the data is fully self-generated (no scraped corpus, no ToS-restricted API).
- Base model: Qwen/Qwen2.5-Coder-1.5B-Instruct
- Teacher: Qwen/Qwen2.5-Coder-14B-Instruct
- Full pipeline: https://github.com/h0n3y-badger/code-distill
A companion to the 7B Python/C distill โ see the repo for the reproducible pipeline.
- Downloads last month
- 67
4-bit
Model tree for h0ney-badger/qwen2.5-coder-1.5b-python-distill
Base model
Qwen/Qwen2.5-1.5B
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="h0ney-badger/qwen2.5-coder-1.5b-python-distill", filename="qwen-coder-1.5b-py-Q4_K_M.gguf", )