Design a Self-Serve LoRA Fine-Tuning Service for Hosted Models
Last updated: November 29, 2026
Quick Overview
Design a service that lets API customers upload JSONL training data, launch LoRA fine-tuning jobs on a hosted base model, track metrics, and then call their fine-tuned model through the same chat completions endpoint.
Mistral AI
November 29, 20260
0
0 solved
Design a service that lets API customers upload JSONL training data, launch LoRA fine-tuning jobs on a hosted base model, track metrics, and then call their fine-tuned model through the same chat completions endpoint.
Mistral AI offers fine-tuning on La Plateforme and open-sources mistral-finetune, so platform engineers own the path from a customer's dataset to a servable adapter. The interviewer checks data validation, job orchestration on shared GPUs, adapter storage and multi-LoRA serving, and how you protect customer data.
What the Interviewer Expects
- Validate datasets up front (schema, chat template, token lengths, size limits) with actionable errors
- Model jobs as a state machine in a queue with GPU-aware scheduling and quotas
- Train LoRA adapters, checkpoint regularly, and stream loss and validation metrics to the user
- Store adapters per tenant and serve many adapters on one base-model replica
- Address cost estimation, isolation of customer data, and deletion
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How do you serve hundreds of adapters without one replica per adapter?
- How would you detect a dataset that will make the model worse?
- What happens if a job's node is preempted at 80 percent?
- How would you price jobs and show the estimate before launch?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Upload files, create a job (base model, hyperparameters with defaults), poll status and metrics, cancel, and get a model id usable in chat completions. Jobs run minutes to hours. Data is private to th...
High-Level Design
Files API writes to encrypted object storage. A validator job checks each line: valid messages, roles alternate, final turn assistant, token count under the context limit, and computes total training ...