YuE #08: Fine-Tuning With LoRA: A Working Setup
A walkthrough of YuE's finetune flow: prepare aligned data, set the mixture, pick LoRA rank and alpha, run the script, and judge the result honestly.
YuE gained LoRA finetuning in June 2025, and it changed what the model is for. Instead of accepting whatever voice the released checkpoints happen to have, you can push a small set of adapter weights toward a consistent singer, a language the base model handles weakly, or a production style you keep returning to. The repository ships a working finetune flow, and the whole thing comes down to three files you edit correctly.
What LoRA Changes And What It Does Not
LoRA freezes the original model and trains small low-rank update matrices alongside it, which is why a finetune fits on hardware that would choke on full training. It moves behaviour: phrasing, language habits, how a chorus is delivered, how instrumental sections are handled. It does not add knowledge the base model never had, and it cannot rescue a dataset that is inconsistent. Adapters trained on sloppy pairs produce a consistent mess, just faster.
Preparing Data YuE Can Actually Read
Your unit of data is a piece of audio paired with its lyrics, already split into the same sections you would write by hand. Keep the pairing tight: a line that is sung at one point in the audio but placed at another teaches the model to ignore alignment. Match the language of the lyrics to the checkpoint you are starting from, and keep the genre tags in the same format the inference path expects, because the finetune sees exactly the text format you will later prompt with. Twenty careful examples beat two hundred careless ones.
Configuring The Mixture Before Training
Before any weights move, the repository wants a mixture configuration: a YAML file that sets the token count log directory, the global batch size, the sequence length, and how many rounds each dataset is repeated for. From that configuration you generate the training parameters, which produce the DATA_PATH string. That string carries dataset weights in front of each path, so a second corpus can be included at a fraction of the influence of your main one. Getting this wrong is invisible until the model comes out half-forgotten on its original skills.
Setting The LoRA Parameters
Everything else lives in scripts/run_finetune.sh. The shipped defaults are a rank of 64, an alpha of 32, a dropout of 0.1, a per-device batch size of 1, and ten epochs, alongside the tokenizer path, the base checkpoint, the train and validation split expressed as three comma-separated numbers, and an output directory. Raise the rank when the target behaviour is far from the base model; raise alpha relative to it if you want the update to bite harder. Move one at a time, and keep the base checkpoint fixed so results stay comparable.
Running The Finetune And Checking It
Run the script, watch the loss, and then do the only evaluation that matters: point the inference command at your output directory instead of the released checkpoint and generate with the same lyrics and genre tags you used as a sanity example. Compare it against a generation from the base model with identical inputs. You are looking for the specific thing you trained for, not for general polish. If the new behaviour appears and the base skills you care about are still there, keep the adapter; if the model has started repeating phrases, you trained too hard for too long.
Mistakes That Waste A Training Run
Three cause most of the damage. A split that puts near-duplicate takes into both training and validation, so the loss looks better than reality. Mixture weights that accidentally make a small unrelated dataset dominant, which shows up as a model that is fluent and strange. And an output directory that gets overwritten by the next run, so the version you liked is gone. Name runs by what changed, not by the date.
— Nam Hoai (Nam Hoài Đất Mỏ)