Fine-Tuned Small Open Model with Eval-Gated Releases and Self-Hosted Serving
A pipeline for startups and support teams that pay per token for one narrow, repetitive LLM task: fine-tune a small open model with LoRA, release it only when it passes an eval gate against the hosted API baseline, serve it with vLLM behind an OpenAI-compatible endpoint, trace every request and report quality, latency and cost. An advanced AI final year project that turns an API bill into an engineering decision.
Advanced
Needs a team, real planning, and a supervisor who knows the area.2 semesters · 2 to 3 students
9 to ship
4 optional extrasSuggested stack
What you should ship
- A task definition and a versioned eval set of at least 300 labelled cases, with a held-out split never used for training
- A baseline: the hosted API model with the best prompt you can write, scored on the eval set
- A cleaned, versioned fine-tuning dataset in the base model's chat template
- LoRA or QLoRA fine-tuning runs on a small open model, logged to MLflow with dataset version and settings
- An eval gate in CI (promptfoo or a custom harness) that blocks any release scoring below the current production version
- The fine-tuned model served with vLLM behind an OpenAI-compatible endpoint, with a load test report
- Tracing of every request with model version, latency and tokens in Langfuse or Phoenix
- A router that can send traffic to the fine-tuned model or fall back to the API baseline
- A final report comparing quality, p95 latency and cost per 1,000 requests for the API and the self-hosted model
If you have time left
- Quantise the model and measure the quality, memory and throughput trade-off
- Online evals on a sample of live traffic with a validated LLM judge
- A retraining loop that adds reviewed production failures to the dataset each month
- Serve several task-specific LoRA adapters on one base model
The problem
Many startups and support teams use a large hosted model for one narrow job repeated thousands of times a day: tagging support tickets and pulling out order numbers, classifying delivery messages, or turning free text into a fixed JSON form. The task is stable, the format is fixed, and the bill grows with every customer. A small open model fine-tuned on that one task can often match the large model on it, run on a single GPU the team controls, and keep customer text in-house. But teams rarely have the evidence or the pipeline to switch safely.
This project builds that pipeline: fine-tune, evaluate against the API baseline, release only through an eval gate, serve, trace, and report whether switching is worth it.
What exists and the gap
Hosted fine-tuning is offered by model providers, such as OpenAI's supervised fine-tuning API, and by inference platforms such as Together AI. Open tools such as Unsloth, Hugging Face TRL and PEFT make LoRA fine-tuning of open models practical on modest hardware, and vLLM serves the result efficiently. What is missing for most small teams is the release discipline around them: a versioned eval set, a gate that compares every candidate with production, tracing and an honest cost comparison. Without those, a fine-tuned model is a gamble.
Inspiration
- LoRA: Low-Rank Adaptation of Large Language Models (Hu and colleagues, Microsoft, 2021) introduced the adapter approach this project uses.
- QLoRA: Efficient Finetuning of Quantized LLMs (Dettmers and colleagues, University of Washington, 2023) showed that fine-tuning a 4-bit base model with adapters can preserve quality while fitting on a single GPU.
Scope for a final year project
Pick one task and one real or realistic dataset: public customer support or e-commerce message datasets work, or anonymised messages from a partner company, in English, Urdu or Roman Urdu. Keep the task narrow and measurable, such as a category plus three extracted fields as JSON.
- Build the eval set first and score the hosted API baseline on it.
- Prepare and version the training data; fine-tune a small open model with QLoRA on a free or low-cost GPU.
- Put the eval gate in CI so no model or prompt change ships if it regresses.
- Serve the winner with vLLM, put a router and fallback in front, and trace every request.
- Load test, measure, and write the comparison.
What to measure
Exact match and field-level F1 on the held-out set, valid JSON rate, results by message type and language, p95 latency, throughput per GPU, and cost per 1,000 requests for both options, using your own measured throughput and the providers' published prices at the time you write the report.
Path to a product
The reusable part is the pipeline, not one model. Package it as a service that takes a team's task definition and examples and returns a gated, served, monitored model with a cost report, starting with software houses that run the same kind of task for many clients. Data residency, keeping customer text inside the company or the country, is a strong selling point for banks, telecoms and health providers.
Discuss it and get help
Want to shape this idea for your team? Discuss it at /account/fyp-ideas/fine-tuned-small-open-model-with-eval-gated-releases/, ask a question at /account/ask/, or book time with Tauseef at /account/book/. New to Sefism? Create a free account.
Learn what you need on Sefism
- MLOps and LLMOps roadmap: the LLMOps and fine-tuning stages map directly onto this project
- MLOps cheat sheet and MLflow cheat sheet
- Unsloth documentation for LoRA and QLoRA fine-tuning notebooks
- vLLM documentation for serving open models
- promptfoo and AI Evals: Everything You Need to Know for the eval gate
- Langfuse documentation for tracing and AI Engineering for the bigger picture
Ideas and guidance, not finished projects
These are project ideas and scoping guidance, published free for students to use as a starting point. I do not build, write, or sell final-year projects, and I do not complete coursework for anyone. Take an idea, make it yours, and build it.
Not sure this one fits you?
I help students pick an idea that matches their skills and their deadline, then scope it down until it is finishable. Guidance only, never done for you.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.