I Fine-Tuned a Model and Made It Worse
The evaluation came back 71% in favour of the base model. The thing I’d built — an end-to-end pipeline to ingest documents, generate synthetic training data, and run QLoRA fine-tuning on a cloud GPU — had produced an adapter that made Gemma 4 E4B measurably worse at the thing I was training it for.
I’m publishing it anyway. This is what I learned.
What I was building and why
EdgeTutor is a fine-tuning pipeline I built to test a question that sits under every “specialised model” pitch: can you take a capable base model and specialise it on specific subject matter using your own synthetic training data? I’d already built a set of coaching prompts that make a model guide rather than answer. This was the next step: baking that behaviour into the model itself.
The domain I chose was algebra and trigonometry. The target behaviour was Socratic tutoring — guiding students toward understanding rather than just handing them answers. I had source materials. I had a plan.
The pipeline I built does four things: ingests PDFs and Markdown into 512-token chunks with metadata; generates synthetic question-answer pairs across three types (factual QA, multi-step reasoning, instruction following); validates them through schema checks, length filters, deduplication, and an LLM-as-judge pass; then runs QLoRA fine-tuning via Unsloth on a Modal A100, with experiment tracking in Weights & Biases and the adapter pushed to Hugging Face Hub.
It produced 3,144 training examples. It trained cleanly. Loss fell steadily across three epochs. Everything looked fine.
What went wrong
The evaluation used 17 structured test cases across five categories: concept introduction, worked examples, misconception correction, synthesis, and multi-turn follow-up. Each response pair was scored blind by Claude Opus on five dimensions: pedagogical approach, mathematical accuracy, clarity, concept coverage, and depth.
The fine-tuned model won 5 of 17. It scored 19.5/25 on average against the base model’s 22.1.
The clearest pattern: the fine-tuned model learned to be more procedural and less Socratic. In category after category, it produced responses that were technically correct but lectured rather than guided. It gave the answer. The base model, more often, asked a question first.
This is a painful irony given what I was trying to build. The coaching philosophy I’d designed the system around — guide toward solutions rather than hand them over — was precisely what the fine-tune eroded. The worked-example category was the only one where the fine-tuned model reliably won, because there the task actually called for complete procedural walkthroughs. When it had learned to lecture, lecturing turned out to be occasionally correct.
The most likely cause: the synthetic training data skewed toward direct answer formats. Generating instruction-response pairs from document chunks naturally produces pairs where the response answers the question. That’s what the generation pipeline optimised for. I didn’t have enough examples that demonstrated the Socratic redirects, the comprehension checks mid-explanation, the deliberate withholding of the punchline — the behaviours I actually wanted.
The base model had been trained on far more diverse material, including what I assume is a lot of good tutoring and pedagogical content. My 3,000 synthetic pairs nudged it away from that without replacing it with anything better.
What the pipeline is actually for
Despite the result, the pipeline itself works, and the experiment answered the question it was built to test.
Synthetic data quality is the job. I understood this theoretically before. I understand it differently now. The filtering stages — length validation, deduplication, LLM-as-judge scoring on a 10% sample — removed a meaningful fraction of the generated pairs. But the remaining pairs were still wrong for the task in a way the filters couldn’t detect, because they were individually coherent; they just encoded the wrong behaviour pattern at scale.
QLoRA is genuinely accessible. Fitting a fine-tune of Gemma 4 E4B onto a single A100 with 4-bit quantisation, in a Python-native cloud environment with no container overhead, for a few pounds of compute — that’s remarkable. The friction is in the data, not the infrastructure.
Loss curves are not evaluation. Training loss fell nicely across all three epochs. The model didn’t catastrophically forget general knowledge (I was tracking perplexity on WikiText-103 throughout). By every automated signal, the run looked healthy. The structured evaluation told a completely different story. It’s a lesson that only lands when you run the evaluation yourself.
Evaluation design matters as much as training design. Building a proper harness — test cases by category and difficulty, blind scoring, random A/B ordering to mitigate position bias, multiple rubric dimensions — gave me actual signal. Without it I would have shipped this adapter convinced it worked.
What’s next
Two things matter more to me now than they did when I started. The first is making the evaluation reproducible: folding the harness into the pipeline so the comparison can be rerun on every new adapter. The second is better evaluation at data generation time — not just filtering bad pairs, but actively scoring whether the generated responses demonstrate the specific behaviours the fine-tune is meant to reinforce.
The evaluation harness is the most reusable part of what I built. The pipeline architecture is sound. The data generation strategy needs a rethink.
There’s a version of this post where I only publish the pipeline and skip the results. A lot of project write-ups work that way — the architecture diagram, the training configuration, the clean loss curves, the Hugging Face link. I don’t think that would be useful. The failure is the finding, and it’s a finding that took real compute and several weeks to produce.
If you’re building something similar and want to compare notes, get in touch.