What is YuE2
YuE2 is an open-source music generation model by the Hong Kong University of Science and Technology and the M-A-P team.music generationModel. The model can generate editable ABC sheet music (melody + chords) from lyrics and style, then render it into a complete 48kHz song, making the creative process white-box and controllable. The model supports creating from scratch, zero-shot cover songs, and Agent-based conversational sheet music editing. On the WildSongBench benchmark, SongBench Avg reaches 6.9632, surpassing commercial models such as Suno v5.
YuE2's main features
- Symbolic planning creation: Input lyrics and style prompts, first generate editable melody + chord ABC sheet music, then render it into a complete song with vocals and accompaniment.
- Zero-shot cover songs: Use SheetSage2 to transcribe the original recording into sheet music, then reinterpret it with a new style or new lyrics, without fine-tuning for the cover task.
- Agent conversational editing: Converse with the Agent around the sheet music, modify the harmony, melody, tempo, or musical form, then re-render a new version.
- Audio-to-score (SheetSage2): Transcribe any recording into sheet music that can be reviewed and modified, serving as the entry point for cover and editing features.
- Music understanding (MERT2): Provides full-song-level music representations, supporting downstream tasks such as transcription, and itself achieved SOTA on 14 of 15 tasks in the MARBLE benchmark.
YuE2's technical principles
- Symbolic planning intermediate layer: YuE2's core design is to insert an explicit symbolic score layer (ABC notation, including melody and chords) between the text/audio conditions and the final waveform. As a "white-box" interface, the score can be read and modified by humans or Agents, and also determines the structure of subsequent acoustic generation, turning creation from black-box "gacha" into a controllable composition process.
- AR-NAR hybrid expert architecture: The model uses a single Mixture-of-Transformers backbone: the AR expert uses causal attention to autoregressively predict score tokens and semantic tokens, ensuring the music's structure and lyric alignment; the NAR expert uses bidirectional attention to perform flow matching prediction on acoustic latents (25 Hz × 64), ensuring audio quality. The two types of experts share hybrid self-attention layers and FFNs, unifying planning and rendering within one checkpoint.
- VAE acoustic generation pipeline: The acoustic latents output by the NAR expert are restored to 48 kHz stereo audio through the VAE decoder, with no quantization loss throughout. During training, offline modules construct the targets: SheetSage2 extracts score targets from audio, MERT2+CVQ generates semantic token targets, and the VAE encoder generates latent targets.
- Three modes unified in the same weights: Creation, cover songs, and editing share the same generation checkpoint; the only difference is the source of the score, which is respectively self-generated by the model, transcribed by SheetSage2, or provided after manual/Agent modification; for cover songs, the "melody-only" mode is used, allowing the accompaniment to freely adapt to the new style.
- Staged inference API: Inference is split into
plan()→generate_semantic()→synthesize()→decode()four stages, and the score, semantic tokens, acoustic latents, and generation parameters are all saved to disk. Users can intervene at any stage: export the score for editing and re-render, or reuse the generated plan and only change the decoder, balancing flexibility and reproducibility.
Follow WeChat and reply "open source" to join theAI open-source project exchange group
How to use YuE2
- Environment preparation: Requires a Linux system, Python 3.12, and an NVIDIA GPU that supports BF16. The model weights will be automatically downloaded from Hugging Face on first run.
- Installation and Deployment:
git clone: After cloning the repository, create a virtual environment and runpip install .to complete the installation. - Quickly Generate Your First Song: Run
python examples/generate.py --output outputs/first-songto generate a song from the built-in example. The output directory contains the audio (flac), sheet music, and all intermediate artifacts. - Python API Usage: Load the pipeline via
YuE2Pipeline.from_pretrained("m-a-p/YuE2-3B"), then pass in the style and lyrics to generate; thecotparameter controls the mode —"full"generates an editable score (default),"melody"melody planning only,"off"direct generation. - Cover a Song: First use SheetSage2 to transcribe the original recording into melody ABC notation, then pass it into
cot="melody"with new lyrics or a target style to regenerate. - Edit an Existing Work: Call
pipe.plan()to export the score. After manually modifying the ABC file or having an Agent modify it, use--abc-file edited.abc --cot fullto re-render a new version. - Agent skill Usage: Import the
skills/yue2-music/from the repository into an Agent that supports SKILL.md, and you can complete songwriting, transcription, score editing, and version comparison through natural conversation.
YuE2's Core Advantages
- Quality Benchmarked Against Commercial Models: On WildSongBench, SongBench Avg reaches 6.9632 (best-of-8), surpassing commercial products such as Suno v5 and Mureka 9, setting a new upper limit for open-source music generation.
- White-Box Controllable Creation: The first "symbolic planning" pipeline, where melody and chords are explicitly presented in ABC score form, allowing both humans and Agents to read and modify the work before rendering.
- Unified Weights Across Three Modes: Creation, zero-shot covers, and conversational editing share the same checkpoint. Covers achieve 0.647 CLEWS mAP source-song preservation without dedicated fine-tuning.
- Fully Local and Open Source: The code follows Apache 2.0, the 3.6B weights are openly downloadable, and it can run offline on a single 24GB VRAM GPU, with data never leaving the local machine.
- Complete Ecosystem: Simultaneously open-sources SheetSage2 transcription, the MERT2 understanding model, the WildSongBench evaluation set, and the yue2-music Agent skill, covering the entire chain from "transcription → creation → editing → evaluation."
- Staged and Intervenable:
plan() → generate_semantic() → synthesize() → decode()four-stage API, with scores, semantic tokens, and latents all written to disk, supporting reuse of plans and switching decoders midway.
YuE2's Project Links
- Project Website:https://map-yue2.github.io/
- GitHub Repository:https://github.com/multimodal-art-projection/YuE
Comparison of YuE2 and Similar Competitors
| Comparison Dimension | YuE2 (M-A-P / HKUST) | Suno v5.5(Suno Inc.) |
|---|---|---|
| Product Nature | Open-source research model (approximately 3.6B parameters) | Closed-source commercial music generation service |
| Generation Quality | SongBench Avg 6.9632(best-of-8) / 6.7316 (standard version), ranking first and fourth among 17 settings | SongBench Avg 6.7150, ranking fifth, lower than both versions of YuE2 |
| Core Mechanism | Symbolic planning: first generates an editable ABC score (melody + chords), then renders it into 48kHz audio, white-box controllable | End-to-end audio generation, no intermediate score layer, black-box mode |
| Controllability | Scores are readable, editable, and reusable; supports Agent conversational editing of harmony, melody, tempo, and musical form | Mainly controlled through prompts, cannot intervene note by note, modifications can only be made by regenerating the entire piece |
| Cover capability | Zero-shot covers: after SheetSage2 transcription, change style/lyrics, CLEWS mAP 0.647(948 works) | No explicit transcription-reperformance pipeline, covers rely on prompt guidance, melody retention is uncontrollable |
| Lyric clarity | PER pronunciation error rate 9.79%(Bo8) / 8.44% (standard version) | PER 5.96%, significantly better than YuE2, and one of the most accurate in lyric articulation among the systems tested |
| Text alignment | MuLan 0.5051 | MuLan 0.5089, slightly higher than YuE2 |
| Open source and deployment | Code under Apache 2.0, weights openly downloadable, can run locally on a single 24GB GPU, data never leaves the machine | Closed source, cloud-only access, cannot be deployed locally, lyrics and work data are hosted by the vendor |
YuE2 application scenarios
- Personal music creation: Amateurs who don't know how to compose or arrange can input lyrics + style to make a song, and can finely adjust the melodic direction by editing the score, turning "inspiration" into a complete work.
- Covers and derivative creation: After transcribing the original song with SheetSage2, one-click adapt the song into new styles such as jazz or rock, or replace the lyrics to make multilingual versions, catering to fan derivative works and short-video adaptation needs.
- Film / game / advertising soundtrack demos: Producers quickly generate candidate soundtracks with vocals or pure instrumental accompaniment, trial-and-error at low cost before deciding whether to hire real people for production, greatly compressing upfront communication costs.
- Music education and harmonic analysis: Teachers use it to generate example pieces with specified chord progressions and musical forms, and students can learn composition techniques by referring to the ABC score, achieving a teaching loop of "audible, visible, and editable."