
YOLO-7B-Qwen-Coder
A fine-tuned version of Qwen2.5-Coder-7B-Instruct specialized in diagnosing CLI errors and generating a single, precise bash fix command.
Part of the yolo-coder project โ an automated CLI repair tool that wraps any command, catches failures, and fixes them locally using a local LLM.
What it does
Given a CLI error message and surrounding code context, the model outputs exactly one bare bash command to fix the problem. No explanation. No markdown. No backticks. Just the fix.
Input: ModuleNotFoundError: No module named 'requests'
Output: pip install requests
Input: IndexError: list index out of range (line 7: print(items[2]))
Output: python3 yoco_replace.py app.py 7 'print(items[1])'
Model Details
| Property | Value |
|---|---|
| Base model | Qwen/Qwen2.5-Coder-7B-Instruct |
| Fine-tune method | LoRA (MLX on Apple Silicon) |
| LoRA rank | 8 |
| LoRA scale | 20.0 |
| Layers trained | 28 |
| Training iterations | 800 |
| Learning rate | 5e-6 |
| Batch size | 2 (grad accumulation ร 4 = effective 8) |
| Max sequence length | 1024 |
| Training hardware | Apple Silicon M-series (16GB) |
| Final train loss | 0.217 |
| Final val loss | 0.260 |
Training Data
Trained on a custom dataset of 2,250 CLI error/fix pairs covering:
- Python:
SyntaxError,ImportError,ModuleNotFoundError,AttributeError,IndexError,KeyError,TypeError,ZeroDivisionError,PermissionError,FileNotFoundError - pip: missing packages,
--break-system-packages, hash mismatches, permissions - Node.js:
Cannot find module,MODULE_NOT_FOUND - npm:
ENOENT,ERESOLVE,EACCES - TypeScript:
TS2304,TS2339 - Docker: image not found, port conflicts, container name collisions, daemon not running
- Git: merge conflicts, detached HEAD, push rejected, not a repo
- Web frameworks: Next.js, FastAPI, Flask, Express
- Auth errors: JWT, OAuth, session issues
- Async/CORS errors
Format: ChatML with a strict system prompt enforcing single-command output.
90/10 train/validation split โ 2025 train, 225 validation examples.
Files in this repo
| File | Description |
|---|---|
YOLO-7B-Qwen-q4.gguf |
Q4_K_M quantized GGUF (~4.4GB) โ recommended for Ollama |
YOLO-7B-Qwen-finetuned.gguf |
f16 GGUF (~14GB) โ full quality, for requantization |
safetensors/ |
fp16 HuggingFace safetensors โ for further fine-tuning |
adapter/ |
Raw LoRA adapter weights (MLX format) |
Usage with Ollama
# Download the Modelfile
curl -O https://raw.githubusercontent.com/erdemozkan/yolo-coder/main/YOLO-MODEL-FILES/Modelfile-7B
# Pull the GGUF and register
ollama create yolo-7b -f Modelfile-7B
# Test it
ollama run yolo-7b "ModuleNotFoundError: No module named 'flask'"
# โ pip install flask
Usage with yolo-coder
git clone https://github.com/erdemozkan/yolo-coder
cd yolo-coder
pip install -e .
# Use the 7B model
yoco --model yolo-7b python3 myapp.py
Usage with Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "erdemozkan/YOLO-7B-Qwen-Coder"
tokenizer = AutoTokenizer.from_pretrained(model_id, subfolder="safetensors")
model = AutoModelForCausalLM.from_pretrained(model_id, subfolder="safetensors")
messages = [
{"role": "system", "content": "You are a CLI repair tool. Output ONLY a single bare bash command to fix the error. No explanation. No markdown. No backticks."},
{"role": "user", "content": "ModuleNotFoundError: No module named 'requests'"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=64, temperature=0.1)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
# โ pip install requests
Prompt Format (ChatML)
<|im_start|>system
You are a CLI repair tool. Output ONLY a single bare bash command to fix the error. No explanation. No markdown. No backticks.<|im_end|>
<|im_start|>user
{error message}
<|im_end|>
<|im_start|>assistant
Limitations
- Outputs a single command only โ not suitable for multi-step fixes without a wrapper
- Trained on common CLI errors; rare or highly domain-specific errors will fall back to base model behavior
- Not a general coding assistant โ use base Qwen2.5-Coder for that
License
Apache 2.0 โ same as the base model.
- Downloads last month
- 1,339
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support