KatInterview

Multi-Tenant LLM Fine-Tuning Service on AWS: Platform Design

System DesignModel answer
HardModel answerSystem Designml-system-designllm-fine-tuningaws

Last updated

Design a managed AWS platform where customers fine-tune open-weight LLMs on their own data, with isolation, budgets, resumable distributed training, evaluation and endpoint deployment.

Context

Your team is building a managed service on AWS that lets customers adapt a large language model to their own data without managing GPUs themselves. Customers range from small teams running quick experiments to enterprises with strict security demands.

What the platform must let a user do

  • Upload training data: plain text, plus optional instruction/response pairs.
  • Select a base model and a tuning approach: full fine-tuning, LoRA, QLoRA, or adapter layers.
  • Start a training job, follow its progress, and assess the quality of the result.
  • Publish the tuned model behind an inference endpoint.

Non-functional requirements

  • Isolation and security: tenants must be separated (network, identity, encryption).
  • Spend control: per-tenant quotas and budget limits.
  • Scale-out training: multi-GPU / multi-node jobs with checkpointing.
  • Reproducibility: a run can be re-created from its recorded configuration, code version and dataset version.
  • Operability: metrics, logs and traces, plus recovery from failures.

What to present

  1. State your assumptions about scale (tenants, concurrent jobs, model and dataset sizes).
  2. Overall architecture, split into control plane and data plane.
  3. Key API surface and the core data model.
  4. The end-to-end training workflow.
  5. Data management (upload, validation, versioning).
  6. Evaluation strategy.
  7. Deep dives on isolation, cost control, distributed training and failure recovery, and serving.

Be explicit about trade-offs and what you would build first.

Hints

Hint 1

Separate a control plane (APIs, metadata, quotas, workflow orchestration) from a data plane (GPU training, storage, serving), then spend your time on the hard parts of the data plane.

Hint 2

Do the arithmetic early: a full fine-tune of a 70B model with Adam in mixed precision needs roughly 16 bytes per parameter (about 1 TB per checkpoint), while a LoRA adapter is only tens to hundreds of MB. This drives checkpointing, scheduling and serving choices.

Hint 3

Think about what you do per tenant versus what you share: dedicated nodes and scoped IAM roles during training, but a shared base model with many hot-swapped adapters at serving time.

Hint 4

Make every job fully described by an immutable record (config, image digest, git SHA, base-model revision, dataset version, seed) so you can resume, audit and reproduce it.