┌─Coding LLM · 1.5B params · QLoRA instruction-tune─┐

Qdex-1.5B

Taught to answer when asked

A 1.5B-parameter coding model, instruction-tuned with QLoRA to follow coding requests — small enough to run locally on a 16GB laptop with no GPU. Fine-tuning lifted instruction-mode HumanEval from 1.2% to 42.1% — a ~35× jump.

1.5B paramsQLoRA fine-tuneBase: Qwen2.5-Coder-1.5BGGUF · runs on CPUApache-2.0
scroll

// tl;dr — the headline result

Fine-tuning took this model from 1.2% to 42.1% on HumanEval (pass@1) in instruction-following mode. In doing so it matched and slightly edged the base model’s raw coding ability (42.1% vs the base model’s 40.2% raw-completion score) — it learned to follow instructions and kept all of its coding skill, while making that ability actually usable through natural instructions. The fine-tune didn’t teach the model new programming knowledge — it taught it to answer when asked.

0.0→42HumanEval pass@1 (instruct)
0×instruction-mode jump
+0.0 ptsabove base raw-completion
0.00%params trained (QLoRA)
0 GBGGUF · runs on CPU
0cost · free T4 GPU

// what it is

The base model already knew how to code. It just couldn’t answer.

Qdex-1.5B is an instruction-tuned coding assistant built on Alibaba’s Qwen2.5-Coder-1.5B — the pre-trained baseversion (Apache-2.0). That base “knew” a lot of code, but only knew how to continue text; it couldn’t reliably respond to “write a function that…”.

I instruction-tuned it so it behaves like a proper coding assistant, then exported it to GGUF so it runs on an ordinary laptop — no GPU — via Ollama or llama.cpp.

same model · two ways of asking

// raw completion — “continue this”

def is_palindrome(s):

works — 40.2%

// instruction — “write a function that…”

base: ✗ rambles · 1.2%

Qdex: ✓ answers · 42.1%

The ability was always there. The fine-tune unlocked the door to it.

[ 01 ]// HumanEval · pass@1 · greedy · n=1 · 164 problems

Before & after — the honest numbers

The base model was measured two ways on purpose — raw completion and instruction — so the before/after is a fair, apples-to-apples comparison. Greedy decoding, one sample per problem. An honest, reproducible measurement, not a leaderboard-tuned number.

HumanEval pass@1

Qwen2.5-Coder-1.5B (base) · raw completion40.2%66/164

latent coding ability — matches the published paper

Qwen2.5-Coder-1.5B (base) · instruction1.2%2/164

couldn't answer when actually asked

Qdex-1.5B (this model) · instruction42.1%69/164

matched and slightly edged the base model's raw ability, now usable through instructions

1.2%42.1%~35× · instruction mode

The three measurements

Qwen2.5-Coder-1.5B (base)

raw completion

40.2%66/164

Qwen2.5-Coder-1.5B (base)

instruction

1.2%2/164

Qdex-1.5B (this model)

instruction

42.1%69/164

The base model could code (40.2% in completion mode — which also matches the published paper, confirming the harness is sound), but was nearly useless when actually asked (1.2%). After fine-tuning, Qdex answers coding requests at 42.1%— matching, and slightly edging, the model’s full latent ability, now reachable through instructions.

[ 02 ]// method · QLoRA

How it was built

QLoRA — Quantized Low-Rank Adaptation. Load the base model in 4-bit to shrink its memory ~4×, freeze all of it, and train only tiny adapter matrices on top. Cheap, fast, and it fits on a single free GPU.

Q — 4-bit quantization

The base model is loaded in 4-bit, cutting its memory footprint ~4× so it fits on a small, free GPU.

LoRA — adapters

The base is frozen; only low-rank adapter matrices train. That’s what makes the fine-tune cheap and fast.

1.18%trained

18.5M of 1.56B params

The entire base model is frozen. Only tiny low-rank adapter matrices are trained — which is what makes the fine-tune cheap, fast and runnable on a single free GPU.

The pipeline

  1. 1Benchmark the base model (both modes)
  2. 2Instruction-tune with QLoRA
  3. 3Merge the adapter into the base
  4. 4Benchmark the fine-tuned model
  5. 5Export to GGUF for local use

Training loss · trajectory

~1.06 start2 epochs · 5,000 steps~0.53 final

Tooling: Unsloth (fast single-GPU QLoRA) · Hugging Face TRL (supervised fine-tuning) · llama.cpp (GGUF export).

[ 03 ]// reproducible · quick reference

Training details

Base modelQwen2.5-Coder-1.5B (Apache-2.0)
DatasetMagicoder-OSS-Instruct-75K · 20,000-example slice
DecontaminationHumanEval-decontaminated split — no answer leakage
Prompt formatQwen ChatML (system / user / assistant)
Trainable params18.5M / 1.56B (1.18%)
LoRA rank / alpha / dropout16 / 32 / 0.0
Target modulesall 7 linear layers (q, k, v, o, gate, up, down)
Epochs / steps2 / 5,000
Effective batch size8 (batch 2 × grad-accum 4)
LR / schedule2e-4 · cosine · 3% warmup
Max sequence length2,048 tokens
Optimizer / precisionadamw_8bit / fp16
Hardware1× NVIDIA Tesla T4 (16GB) · Kaggle free tier
Training time~4 h 55 m · final loss ~0.53 (from ~1.06)
[ 04 ]// Ollama · CPU is enough

Run it locally

Download merged.Q4_K_M.gguf(~1 GB — the 4-bit build recommended for a 16GB laptop; there’s also a slightly higher-quality merged.Q5_K_M.gguf, ~1.2 GB). Create a Modelfile, then run.

Modelfile
# Modelfile
$ FROM ./merged.Q4_K_M.gguf
# Qwen ChatML template (what it was trained on)
$ TEMPLATE """{{ if .System }}<|im_start|>system
$ {{ .System }}<|im_end|>
$ {{ end }}<|im_start|>user
$ {{ .Prompt }}<|im_end|>
$ <|im_start|>assistant
$ """
$ PARAMETER stop "<|im_end|>"
$ SYSTEM "You are a helpful coding assistant."
Create & run
# build the model from the Modelfile
$ ollama create qdex-1.5b -f Modelfile
# ask it something
$ ollama run qdex-1.5b \
$ "Write a Python function that checks
$ if a string is a palindrome."
[ 05 ]// engineering challenges · fault tolerance

The first two runs were lost

Training ran on a free, time-limited cloud GPU — and the first two runs were lost. Each time, training actually finished, but the session ended (a power cut at home) before the model was saved, and the platform’s default “No Persistence” setting wiped the working directory. So I rebuilt the pipeline to assume the session could die at any moment.

1

Checkpoint every 200 steps

A dropped session loses minutes, not hours.

2

Persistence: Files only

Saved files survive a session ending.

3

One-command resume

Restart from the latest checkpoint instantly.

4

Immediate off-platform backup

Push to Hugging Face the moment training finishes.

The third run completed and every artifact survived. The lesson — assume the session can die at any moment — is what separates a notebook that works once from a pipeline you can trust.
I also audited my own benchmark and found a scoring bug that was undercounting the model — correct solutions were failing on output-formatting artifacts. I hardened the extractor, added a regression test, and re-ran the full benchmark for a fair number (39.0% → 42.1%).
[ 06 ]// limitations · what's next

Stated honestly

Limitations

  • It's a small model

    Genuinely useful on focused, well-specified coding tasks — but not a frontier model. It won't replace GPT/Claude on complex, multi-step problems.

  • Single-benchmark measurement

    The reported score is HumanEval only, greedy decoding, one sample per problem. An honest, reproducible number — not a leaderboard-tuned one.

What’s next — Phase 2

WIP
  • 01

    v2 — a data experiment

    Retrain with an added, decontaminated slice of NVIDIA's OpenCodeInstruct (solutions ship with test cases + quality scores), then re-run the same HumanEval benchmark. A controlled, data-driven comparison — not guesswork.

  • 02

    Project 3 — the agent

    Qdex-1.5B is the engine for a local CLI coding agent that runs entirely on a 16GB no-GPU laptop via Ollama. This model was built specifically to make that agent possible.

open weights · Apache-2.0

Small model. Runs on your laptop.

Download the ~1 GB GGUF, point Ollama at it, and ask your first coding question in under a minute — no GPU required. Weights and model card are open on Hugging Face.

Qdex-1.5B · QLoRA fine-tune of Qwen2.5-Coder-1.5B · Apache-2.0 · built by Suman Debnath