Lesson 25 / Unit 7: Adaptation and Serving
LoRA Adaptation
The LoRA paper cut trainable parameters 10,000 times on GPT-3. What the same trick does to a speech model, how to run one adapter per dialect, and when to stop.
LoRA trains small updates to selected weights while keeping the base model frozen. It is one option for adapting a supported TTS model. The examples here explain the method; they are not a measured fine-tuning run.
Low-Rank Updates
LoRA freezes every original weight and learns a small correction next to selected layers. For a frozen weight matrix W, it trains two thin matrices, B and A, and the layer computes with W + (alpha / r) BA in the original scaled formulation.
The trick is the shape. If W is d by k, then B is d by r and A is r by k, with the rank r much smaller than d or k. The paper initialises A randomly and B to zeros, so at step zero the correction is zero and the model behaves exactly like the base. Training then moves only A and B.
A worked example with our own model’s width makes the scale concrete. Our tiny TTS model uses d = 128, so the attention output projection is 128 by 128, or 16,384 weights. A rank-4 adapter on that layer adds 4 × (128 + 128) = 1,024 trainable weights. That is arithmetic, not a training run, and the ratio grows more favourable as layers get wider.
LoRA freezes the base and trains small low-rank matrices alongside it. Fewer trainable parameters means adaptation from a few hours of audio, cheap per-dialect variants, and a base that cannot forget what it knew.
Adapter Tradeoffs
Full fine-tuning updates every weight. It has the most capacity to absorb a new voice or language, and the most ways to go wrong: more data, more compute, a full model copy per variant, and the risk that the model gains your accent and loses general behaviour it had before (catastrophic forgetting).
LoRA changes the trade in four ways:
- The base survives. The original weights never change. Remove the adapter and the base model’s behaviour returns exactly.
- Variants are small files. Ten dialects become one base model plus ten adapters, loaded or swapped at serving time.
- No added latency after merging. The paper notes that BA can be added into W before deployment, so a merged model costs the same to run as the base.
- A capacity ceiling. The rank bounds how much the adapter can learn. A shift in timbre or accent may fit an adapter; a language the base model barely knows may need more than a low-rank update can hold.
There is speech-specific evidence for the first use case. LoRP-TTS applies LoRA to a zero-shot TTS model so that single, noisy, spontaneous recordings work as voice prompts, and reports raising speaker similarity “by up to 30pp while preserving content and naturalness.”
Dialect Experiments
For a dialect experiment, collect consented recordings that cover its sounds and speaking styles. Use several speakers if the target is a dialect rather than one voice, and reserve independent evaluation speakers where the model supports that task. The recipe has four parts.
Data, prepared like unit 2. The same manifest, the same forced-alignment filter, the same normalisation. In our LJSpeech subset the alignment filter flagged 86.4% of clips whose transcript contained digits, against 7.7% of clips without. Dialect data has its own version of that trap: transcripts written in the standard spelling of words the speaker says differently. Coverage of the sounds that distinguish the dialect matters more than raw hours.
Choose the conditioning. Separate adapters can make variants easier to compare and deploy. A shared adapter with explicit dialect conditioning may also work; compare it rather than assuming mixed data must average the dialects.
A dialect test set. Built with a native speaker, containing the words, vowels and constructions the base model renders as its majority neighbour. A general test set the base model already passes will tell you nothing.
Native listeners per checkpoint. Output WER and speaker similarity miss a vowel that is slightly off. A short listening session with two native speakers per candidate checkpoint catches it. The evaluation metrics lesson covers what each automatic metric can and cannot see.
Acceptance Criteria
Write it down before training starts: a target output WER on the dialect test set, a speaker-similarity floor if a specific voice is involved, a latency ceiling on your serving hardware, and a listening sign-off. Without a bar agreed in advance, adaptation work drifts, because the model can always be a little better.
If the base model supports LoRA, compare an adapter against the unchanged model first. Investigate data, targets and optimisation before deciding that full fine-tuning is necessary.
Our own training run shows the plateau shape you are watching for, at toy scale. Validation mel L1 fell from 0.4643 at step 550 to 0.4268 at step 1,650, then sat at 0.4282 by step 2,200. That was a model trained from scratch on 0.74 h of audio, without establishing the cause. With an adapter, a plateau below the bar can have several causes, including too little data in the target, too low a rank, or a target too far from the base. Use controlled changes to distinguish those causes with the eval harness, including learning-rate and target checks.
Before the first adapter
Draft the acceptance sheet now: the dialect test set, the WER target, the latency ceiling, and the names of two native listeners. If you cannot fill in all four, the adapter is not ready to train.
Next: voice cloning vs fine-tuning, for when the target is one person’s voice rather than a whole dialect.
Common questions
What is LoRA in text-to-speech?
LoRA, low-rank adaptation, freezes a trained model and adds a pair of small trainable matrices next to selected weight matrices, usually the attention and projection layers. Only the small matrices are trained, so one base model can carry many cheap adapters, each for a voice, accent or dialect.
Does a LoRA adapter slow down TTS inference?
Not if you merge it. The LoRA paper points out that the low-rank update can be added into the frozen weight before serving, so the merged model has the same shape and cost as the original, with no additional inference latency. Keeping adapters separate for hot-swapping adds a small amount of compute per layer.
How much audio does a TTS LoRA need?
There is no reliable single number. It depends on the base model, how far the target is from what it already knows, and the acceptance bar. We have not run a TTS LoRA ourselves, so we do not quote hours; the practical answer is to agree the bar first and measure how far a first adapter gets.
We do this work for teams shipping voice agents: Self-Hosted Voice Agent .
Edit this lesson on GitHub ↗Discussion
Questions, corrections and war stories welcome. Sign in with GitHub to comment.