Instructions to use Pilestin/qwen2.5-3b-debug-v3-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 Pilestin/qwen2.5-3b-debug-v3-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 Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Pilestin/qwen2.5-3b-debug-v3-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 Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Pilestin/qwen2.5-3b-debug-v3-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 Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Pilestin/qwen2.5-3b-debug-v3-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Pilestin/qwen2.5-3b-debug-v3-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Pilestin/qwen2.5-3b-debug-v3-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M
- Ollama
How to use Pilestin/qwen2.5-3b-debug-v3-GGUF with Ollama:
ollama run hf.co/Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use Pilestin/qwen2.5-3b-debug-v3-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Pilestin/qwen2.5-3b-debug-v3-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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Pilestin/qwen2.5-3b-debug-v3-GGUF with Docker Model Runner:
docker model run hf.co/Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M
- Lemonade
How to use Pilestin/qwen2.5-3b-debug-v3-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.qwen2.5-3b-debug-v3-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Pilestin/qwen2.5-3b-debug-v3-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 Pilestin/qwen2.5-3b-debug-v3-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:9931/v1 hermes config set model.default Pilestin/qwen2.5-3b-debug-v3-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Pilestin/qwen2.5-3b-debug-v3-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Pilestin/qwen2.5-3b-debug-v3-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:9931/v1 \ --custom-model-id "Pilestin/qwen2.5-3b-debug-v3-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"
qwen2.5-3b-debug-v3-GGUF
A Q4_K_M GGUF build of a Qwen2.5-3B-Instruct model fine-tuned to fix buggy Python
programs. You give it a broken program (plus its error message, stdin and an execution-trace summary), and it returns the corrected
program in a single ```python block.
This is variant v3 (code + error + trace) of a three-way ablation. The ablation tests whether giving a small model a dynamic execution trace (from FocusTracer) helps it repair code.
| Variant | Model input | pass@1 |
|---|---|---|
| v1 | buggy code | 64.8% |
| v2 | buggy code + error message / stderr + stdin | 69.1% |
| v3 | buggy code + error + FocusTracer execution trace summary | 68.4% |
The LoRA adapter this file was built from is at Pilestin/qwen2.5-3b-debug-v3-lora.
| File | Quant | Size |
|---|---|---|
qwen2.5-3b-debug-v3-q4_k_m.gguf |
Q4_K_M | 1.80 GB |
Usage
Ollama
Run it directly from the Hub:
ollama run hf.co/Pilestin/qwen2.5-3b-debug-v3-GGUF
The system prompt matters: the model was trained with the system prompt below, so pass it
yourself. The simplest way is to download the Modelfile in this repo, which already sets
the system prompt, chat template and sampling parameters:
hf download Pilestin/qwen2.5-3b-debug-v3-GGUF --local-dir .
ollama create qwen-debug-v3 -f Modelfile
ollama run qwen-debug-v3
llama.cpp
llama-cli -m qwen2.5-3b-debug-v3-q4_k_m.gguf -cnv --temp 0 \
-sys "You are an expert Python debugging assistant. The user gives you a buggy Python program (and optionally its runtime error and an execution trace). Reply with the corrected program in a single \`\`\`python code block. Do not add explanations."
Prompt format
The system prompt is:
You are an expert Python debugging assistant. The user gives you a buggy Python program (and optionally its runtime error and an execution trace). Reply with the corrected program in a single ```python code block. Do not add explanations.
The user message is built step by step. Each variant adds a section to the one before it:
Fix the following buggy Python program.
```python
<buggy program>
```
โโ v1 ends here
Runtime error:
<exception message + last 4 lines of stderr>
(if there is no exception, this whole section is replaced by one of:
"The program runs without crashing but produces WRONG OUTPUT for the given input."
"The program is too slow / never terminates (time limit exceeded).")
Program input (stdin):
```
<stdin, if โค 400 chars>
```
โโ v2 ends here
Execution trace (FocusTracer, last steps before failure):
```
L3: for i in range[0:3]:
!! EXCEPTION at L3: TypeError: 'type' object is not subscriptable
```
โโ v3 ends here
The trace summary is the last 25 line events before the failure, capped at 1,800 characters.
Each line has the form L<line>: <source> [var=value, ...]: the line number (matching the
buggy program), its source, and the variables that changed on that line. Any exception is
shown as an !! EXCEPTION line.
The assistant reply is always the whole fixed program in a single ```python block.
Evaluation
The benchmark set is 960 held-out CodeNetPy Python bug-fix pairs. The test problems do not appear in training: training covers 466 problems, test covers 306 different ones.
- pass@1: the generated program is executed on the problem's input (5 s timeout), and its stdout is compared with the reference solution's output. This is not text similarity.
- exact: the generated code matches the reference fix after whitespace normalization.
- Decoding is greedy (temperature 0). Models were run as Q4_K_M GGUF through Ollama on an RTX 4060 Laptop GPU. Significance was tested with a paired McNemar exact test.
| Input variant | Base Qwen2.5-3B-Instruct (same prompt) | Fine-tuned | ฮ |
|---|---|---|---|
| v1 ยท code only | 59.8% | 64.8% | +5.0 |
| v2 ยท code + error | 57.2% | 69.1% | +11.9 |
| v3 ยท code + error + trace | 59.2% | 68.4% | +9.2 |
Fine-tuned models, by bug category (pass@1):
| Model | runtime exception | wrong answer | time limit exceeded | exact | tok/s | J/query |
|---|---|---|---|---|---|---|
| FT-v1 | 49.4% | 73.6% | 77.9% | 14.4% | 80.7 | 71.7 |
| FT-v2 | 57.0% | 81.0% | 74.6% | 16.4% | 85.0 | 69.6 |
| FT-v3 | 60.3% | 77.3% | 71.1% | 18.4% | 86.2 | 65.9 |
Key findings:
- Fine-tuning helps clearly. All three variants beat the base model (p < 0.01), with no change in inference speed or energy.
- Traces help only in some cases. Overall, v3 โ v2 (p = 0.62). On runtime exceptions, however, adding the trace raises pass@1 by +3.3 points. The trace helps most when it shows the exact line and variable state where the crash happens. For wrong-output and timeout bugs, the cut-off trace mostly adds noise.
- Traces produce the fixes closest to the reference. v3 has the highest exact-match rate (18.4 %).
Training data
The training dataset is not published. This section summarizes how it was built.
- Source. The Python subset of CodeNetPy: real buggy โ accepted submission pairs from
IBM's Project CodeNet (Apache-2.0). The data was
deduplicated, empty or identical pairs were dropped, and every fix had to pass
ast.parse. The result is 1,959 train / 960 test pairs, with no problem overlap between the splits. - Labels. Each pair has a
bug_category(runtime_exception / wrong_answer / time_limit_exceeded), anerror_class(e.g.TypeError,IndexError) and diff line ranges. About 1/3 of the pairs fall in each category. - Execution traces. Every buggy program was run on its problem's sample input under
FocusTracer, a Python execution tracer that records line events, variable changes and
exceptions as XML. Programs that ran too long were given a 2 s alarm and a hard-kill
watchdog, and yielded partial traces. The trace covers 93 % of train and 96 % of test
pairs. The exception seen in the live trace matched the dataset's
error_classlabel in 96โ99 % of cases. For training, each trace was shrunk to the compact summary shown in Prompt format. - Ablation design. The three variants use exactly the same pairs and the same target (the fixed program). Only the amount of information in the user message changes, so any difference comes from that information alone.
Training procedure
QLoRA with TRL SFTTrainer, sized to fit in 8 GB of VRAM.
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen2.5-3B-Instruct (4-bit NF4, double quant, bf16 compute) |
| LoRA | r = 16, alpha = 32, dropout = 0.05, bias none |
| Target modules | q, k, v, o, gate, up, down projections |
| Max sequence length | 2048 |
| Epochs | 3 (best eval-loss checkpoint kept) |
| Effective batch size | 8 (1 ร 8 gradient accumulation) |
| Optimizer / LR | paged AdamW 8-bit, 2e-4, cosine, 50 warmup steps, weight decay 0.01 |
| Other | gradient checkpointing, no packing |
Limitations
- The model was trained only on short, stdin/stdout competitive-programming programs (median ~260 characters). It is not a general-purpose coding assistant.
- It sometimes returns the input unchanged or makes a plausible but wrong fix. Always run the output before you trust it.
- Prompts are English only. Results are best when you use the exact system prompt and user template shown above.
- The license follows the base model (Qwen Research License), which does not allow commercial use.
Links
- Code (training, merging, quantization, benchmark): https://github.com/BitnetTR/llm-fine-tune-for-debugging
- Downloads last month
- 16
4-bit