56 Downloads Updated 6 days ago
ollama run mohdnihalll03/qwen2.5-coder-1.5b-codeslm-nihal
Updated 6 days ago
6 days ago
05f27dc3c279 · 986MB ·
A QLoRA fine-tune of Qwen2.5-Coder-1.5B-Instruct into a terse, code-first Python assistant — trained on a single 8 GB consumer GPU (RTX 5060) as a phase-by-phase learning project.
The base model is a capable coder but chronically verbose (every answer trails a prose essay). This fine-tune trains it to reply with correct, minimal code and nothing else.

On 18 held-out prompts (greedy decoding), average output length dropped from 272 to 60 tokens (−78%) while core algorithm correctness was preserved.

| Checkpoint (epoch) | Validation loss |
|---|---|
| 0.13 | 0.5157 |
| 0.38 | 0.5020 |
| 0.88 | 0.4927 |
| 1.00 | 0.4928 |
Final train loss 0.4906; validation mean token-accuracy ~85.4%.
| Base | Qwen/Qwen2.5-Coder-1.5B-Instruct |
| Method | QLoRA (4-bit NF4 + LoRA), completion-only loss |
| Dataset | sahil2801/CodeAlpaca-20k → Qwen ChatML (19,020 / 1,002) |
| LoRA | r=16, α=32, dropout=0.05, all 7 proj modules |
| Trainable | 18.46M params (~1.18%) |
| Schedule | 1 epoch, 1,189 steps, LR 2e-4 cosine + 3% warmup |
| Hardware | RTX 5060 (8 GB), ~50 min, peak VRAM 3.32 GB |
ollama run mohdnihalll03/qwen2.5-coder-1.5b-codeslm-nihal
Recommended: temperature 0.2. Full weights, adapter, and GGUFs on Hugging Face: https://huggingface.co/MohdNihal03/qwen2.5-coder-1.5b-CodeSLM-Nihal
Fine-tuning changed style far more than correctness. A few subtle base-model bugs persist and one answer regressed — review generated code before use. Python-focused; 1.5B + 4-bit is not a substitute for a large frontier model.