YuE2-3B-elemusic-kto-v3
LoRA for clean instrumentals and sheet music in YuE2
2 min readupdated
This release introduces a Rank-32 semantic LoRA (a small add-on to the base model for targeted fine-tuning) for the music language model m-a-p/YuE2-3B. The adapter is trained to suppress accidental vocals, choirs, and speech on instrumental tracks while maintaining high melody adherence accuracy and a natural composition finish using end-of-track tags. The model handles short instrumental compositions across 17+ genres as well as long multi-part covers based on ABC notation scores lasting up to 6 minutes. This solution will be useful for musicians, sound producers, and enthusiasts creating high-quality instrumental tracks without random vocal insertions.
Key features
- Clean instrumentals: Suppression of unwanted vocals and speech artifacts during music generation.
- Long tracks: Correct generation of full-length compositions lasting from 3 to 6 minutes without cutoffs.
- Note accuracy: Reliable adherence to ABC scores and maintenance of high melodic similarity metrics.
- Two formats: Availability of both a standard safetensors adapter file and a pre-folded layout for various pipelines.
What you can do
- Generate a full-fledged instrumental track in the desired genre (for example, synthwave or chamber music) using the generation pipeline.
- Render complex ABC scores or staff notation without random vocals appearing in the tracks.
- Plug the LoRA on top of the
m-a-p/YuE2-3Bbase model without changing other internal generation modules.
Example
from huggingface_hub import hf_hub_download
from yue2_instrumental_lora import InstrumentalPipeline, instrumental_style, PLAN_LYRICS
adapter_path = hf_hub_download("elemusic/YuE2-3B-elemusic-kto-v3", "adapter.safetensors")
pipe = InstrumentalPipeline.from_pretrained("m-a-p/YuE2-3B", backend="torch", quantization="none")
pipe.use_adapter(adapter_path)
style = instrumental_style("1980s cosmic synthwave, warm analog brass and saw synth lead plays the melody upfront, gated drums, pulsing bass")
audio = pipe(lyrics=PLAN_LYRICS, style=style)Read more
DetailsAdapter size: 139.5 MB.
Dataset: 591 digitized rollouts (435 for training, 71 validation, 85 test).
Test preference accuracy: 74.12%.
License: CC BY-NC 4.0.










Comments