HyperAIHyperAI

Command Palette

Search for a command to run...

Text-to-Audio
LLM

YuE: Scaling Open Foundation Models for Long-Form Music Generation

Abstract

We tackle the task of long-form music generation—particularly the challenging lyrics-to-song problem—by introducing YuE (乐), a family of open foundation models based on the LLaMA2 architecture. Specifically, YuE scales to trillions of tokens and generates up to five minutes of music while maintaining lyrical alignment, coherent musical structure, and engaging vocal melodies with appropriate accompaniment. It achieves this through: (1) track-decoupled nexttoken prediction to overcome dense mixture signals, (2) structural progressive conditioning for long-context lyrical alignment, and (3) a multitask, multiphase pre-training recipe to converge and generalize. In addition, we redesign the in-context learning technique for music generation, enabling versatile style transfer (e.g., converting Japanese city pop into an English rap while preserving the original accompaniment) and bidirectional generation. Through extensive evaluation, we demonstrate that YuE matches or even surpasses some of the proprietary systems in musicality and vocal agility. In addition, fine-tuning YuE enables additional controls and enhanced support for tail languages. Furthermore, beyond generation, we show that YuE’s learned representations can perform competatively on music understanding tasks, where the results of YuE match or exceed state-of-the-art methods on the MARBLE benchmark.

One-sentence Summary

Researchers from HKUST, Moonshot.ai, and collaborating institutions introduce YuE, a family of open LLaMA2-based foundation models for long-form lyrics-to-song music generation that scales to trillions of tokens and produces up to five minutes of music with lyrical alignment, coherent musical structure, and engaging vocal melodies through track-decoupled next-token prediction, structural progressive conditioning, and a multitask multiphase pretraining recipe, matching or surpassing some proprietary systems in musicality and vocal agility while enabling versatile style transfer, bidirectional generation, and competitive music understanding on the MARBLE benchmark.

Key Contributions

  • YuE is introduced as an open LLaMA2-based foundation model family for lyrics-to-song generation that scales to trillions of tokens and generates up to five minutes of music with lyrical alignment and coherent musical structure.
  • The model uses track-decoupled next-token prediction to overcome dense mixture signals, structural progressive conditioning for long-context lyrical alignment, and a multitask multiphase pre-training recipe for convergence and generalization; a redesigned in-context learning technique supports style transfer, such as converting Japanese city pop into English rap while preserving the original accompaniment, and bidirectional generation.
  • Extensive evaluations show that YuE matches or surpasses some proprietary systems in musicality and vocal agility, fine-tuning enables additional controls and better support for tail languages, and YuE's learned representations match or exceed state-of-the-art methods on the MARBLE benchmark.

Introduction

Neural music generation has strong commercial and cultural potential, from personalized composition to therapy, but lyrics-to-song audio generation is especially difficult because songs require long-range temporal coherence, polyphonic coordination, singing-specific lyric alignment, and large paired lyric-vocal-accompaniment datasets. Prior academic systems mostly produce short clips under 30 seconds, treat singing voice synthesis and instrumental generation separately, and lack open source alternatives to proprietary systems such as Suno and Udio. The authors introduce YuE, an open foundation model family built on the LLaMA2 architecture and trained on trillions of tokens, capable of generating songs up to five minutes with coherent vocals and accompaniment. Its main contributions include track-decoupled next-token prediction, structural progressive conditioning, a redesigned in-context learning framework, and multitask multiphase pre-training, addressing long-form lyrical alignment, musical coherence, and controllability.

Dataset

The authors use the following dataset setup.

Main data sources and scale

  • Conditional speech/TTS data: WeNetSpeech (Chinese), LibriHeavy (English), and GigaSpeech (English), totaling about 70k hours.
  • Unconditional music data: about 650K hours of in-the-wild music recordings mined from the Internet.
  • After filtering, about 10% of the music data has corresponding lyrics.
  • The off-the-shelf X-Codec audio tokenizer was trained separately on 200k hours of 16 kHz audio with a mixture ratio of music:speech:audio effects = 1:1:0.05.

Tokenized dataset composition and mixture ratios

  • Stage-1 data consists of:
    • 13B conditional speech tokens.
    • Over 200B unconditional music tokens, including both mixed and demixed variants.
    • 28B CoT music tokens.
  • During annealing:
    • A high-quality subset of 10B CoT tokens is sampled and expanded fourfold.
    • This creates a 40B ICL dataset with vocal-ICL, accompaniment-ICL, mix-ICL, and dual-ICL variants.
  • Pre-annealing mixture ratios:
    • Conditional:Unconditional = 3:1.
    • Music:Speech = 10:1.
  • Annealing mixture ratio:
    • CoT:ICL = 2:1.
  • The provided text does not describe a separate train/validation/test split; it mainly reports token budgets and mixture ratios for training and annealing.

Text processing and special tokens

  • Text uses the LLaMA BPE tokenizer with 32,000 unique tokens.
  • Instructions, genres, lyrics, structure annotations, and structure segment boundary signals are represented as text and tokenized with BPE.
  • The vocabulary is expanded to support multiple audio tokenizers:
    • Encodec-32khz-music
    • HiFi-Codec-universal
    • X-Codec-general
    • Semanticodec-100tps
  • Special tokens include:
    • <EOD> for end of document.
    • <SOA> for start of audio.
    • <EOA> for end of audio.
    • <stage_1> and <stage_2> for stage indicators.
    • Tokenizer type indicators inserted between <SOA> and the actual audio token IDs.
  • Stage indicators are used in residual modeling and are positioned between <SOA> and the tokenizer type indicator.

Audio processing

  • The stage-1 LM models text tokens and semantic-rich codebook-0 tokens.
  • The authors use X-Codec as the off-the-shelf audio tokenizer.
  • X-Codec fuses a 100M-parameter HuBERT-based universal semantic representation into the codec latent space.
  • It has a 50Hz frame rate and 12 RVQ layers, each with a codebook size of 1024.
  • Only the first 8 RVQ layers are used, since more layers did not provide noticeable quality improvements.
  • Codebook-0 alone captures semantic information such as melody and vocal content.
  • For reconstruction, 16 kHz audio is upsampled to 44.1 kHz using a lightweight upsampling vocoder adapted from Vocos.
  • The upsampler is trained with random codebook dropout and a small amount of Gaussian noise for robustness.

Cropping and metadata notes

  • No explicit cropping strategy is described in the provided text.
  • Metadata construction is mostly represented through text annotations: instructions, genres, lyrics, structure annotations, and segment boundary signals.

Method

YuE is an autoregressive language model framework specifically tailored for lyrics-to-song generation. The architecture comprises four primary components: an audio tokenizer, a text tokenizer, and two distinct language models. The audio tokenizer converts raw waveforms into discrete tokens using a semantic-acoustic fused approach. The Stage-1 language model operates on text tokens and semantic-rich bottom-level audio tokens, modeling the generation process as a next-token prediction task. Subsequently, a smaller Stage-2 language model predicts residual tokens to reconstruct high-fidelity audio, which is finally upsampled to 44.1 kHz by a lightweight vocoder.

Stage-1: Music Language Modeling

The first stage focuses on modeling the high-level semantic structure of music conditioned on diverse inputs such as lyrics, tags, and reference audio.

Track-Decoupled Next-Token Prediction Standard next-token prediction frameworks typically use a single token to represent each audio frame. However, forcing one token to encode both vocal and accompaniment signals simultaneously degrades lyric intelligibility, a phenomenon quantified as Linguistic information Loss After Tokenization (LLAT). The authors measure this using the delta Word Error Rate (ΔWER\Delta\text{WER}ΔWER), which increases significantly in acoustically dense genres when modeling mixed tracks compared to vocal-only tracks.

To overcome this, the authors propose a Track-Decoupled Next-Token Prediction (Dual-NTP) method. This approach explicitly incorporates a source separation prior by splitting each time step ttt into two distinct tokens: a vocal token vtv_tvt​ and an accompaniment token ata_tat​. The joint probability is factorized as:

p(v1:T,a1:T)=∏t=1Tp(vt,at∣v<t,a<t;θ)p(\mathbf{v}_{1:T}, \mathbf{a}_{1:T}) = \prod_{t=1}^{T} p(v_t, a_t \mid v_{<t}, a_{<t}; \theta)p(v1:T​,a1:T​)=t=1∏T​p(vt​,at​∣v<t​,a<t​;θ)

This joint probability is decomposed for standard autoregressive decoding:

p(vt,at∣v<t,a<t;θ)=p(vt∣v<t,a<t;θ)×p(at∣v≤t,a<t;θ)p(v_t, a_t \mid v_{<t}, a_{<t}; \theta) = p(v_t \mid v_{<t}, a_{<t}; \theta) \times p(a_t \mid v_{\le t}, a_{<t}; \theta)p(vt​,at​∣v<t​,a<t​;θ)=p(vt​∣v<t​,a<t​;θ)×p(at​∣v≤t​,a<t​;θ)

This design preserves the existing language model architecture while enabling granular modeling and joint contextualization of both tracks in a single forward pass.

Structural Progressive Conditioning Full-song generation requires handling minutes-long contexts, which often leads to long-term decay in text conditioning due to limitations in positional embeddings. To address this, the authors introduce Structural Progressive Conditioning (CoT). Songs are automatically segmented into distinct musical sections (e.g., intro, verse, chorus). Within each section, segment labels, lyrics, and audio tokens are paired. A single training example is constructed by concatenating an instruction, metadata, raw lyrics, and a series of annotated segments:

Dcot=Instruct∘Tag∘Lyrics⏟Prompt∘(◯i=1Nsi)∘<EOD>\mathcal{D}_{\text{cot}} = \underbrace{\text{Instruct} \circ \text{Tag} \circ \text{Lyrics}}_{\text{Prompt}} \circ \left(\bigcirc_{i=1}^{N} s_i\right) \circ <\text{EOD}>Dcot​=PromptInstruct∘Tag∘Lyrics​​∘(◯i=1N​si​)∘<EOD>

Each segment sis_isi​ includes structure labels, lyric content, and Dual-NTP audio tokens, effectively interleaving structured text and audio to maintain long-term lyrical adherence.

Music In-Context Learning The authors redesign In-Context Learning (ICL) for music to avoid the unidirectional constraints and entanglement issues of speech-based continuation. They propose single-track and dual-track modes where reference audio tokens are prepended to the CoT data. To prevent shortcut learning where the model merely copies the reference audio, a delayed activation strategy is employed, introducing ICL data only during the final annealing phase of training.

The Stage-1 framework integrates these techniques across multiple tasks, including lyrics-to-song, text-to-speech, and unconditional music generation, as illustrated in the token arrangement diagram below.

Stage-2: Residual Modeling

After Stage-1 yields coarse semantic tokens (codebook-0), Stage-2 refines the audio by predicting additional residual codebooks (1 through 7). The authors train Stage-2 to predict all codebooks jointly within a single autoregressive framework, ensuring a unified view of both high-level structure and fine-grained details.

The output space at each timestep ttt is treated as a tuple xt(0:7)=(xt(0),xt(1),…,xt(7))\mathbf{x}_t^{(0:7)} = (x_t^{(0)}, x_t^{(1)}, \dots, x_t^{(7)})xt(0:7)​=(xt(0)​,xt(1)​,…,xt(7)​). The model maintains a strictly time-aligned factorization:

p(x1:T(0:7))=∏t=1Tp(xt(0:7)∣x<t(0:7))p(\mathbf{x}_{1:T}^{(0:7)}) = \prod_{t=1}^{T} p(\mathbf{x}_t^{(0:7)} \mid \mathbf{x}_{<t}^{(0:7)})p(x1:T(0:7)​)=t=1∏T​p(xt(0:7)​∣x<t(0:7)​)

During training, the sequence is organized by placing all codebook-0 tokens at the beginning, followed by repeated blocks of tokens 0 through 7 for each frame. This cross-conditioning setup guarantees that the model processes the complete semantic outline from Stage-1 before generating residual details. At inference, the codebook-0 tokens from Stage-1 are clamped, and the model autoregressively generates only the residual codebooks.

Tokenization and Audio Reconstruction

For text tokenization, the framework reuses the LLaMA tokenizer with 32,000 unique BPE tokens. For audio, the authors adopt a semantic-acoustic fused codec strategy, utilizing X-Codec as the audio tokenizer. This codec fuses a HuBERT-based universal semantic representation into the latent space, operating at a 50Hz frame rate with 12 residual vector quantization layers. The first 8 layers are utilized, as codebook-0 alone captures critical semantic information like melody and vocal content. To achieve high perceptual quality, a lightweight upsampling vocoder based on Vocos is applied to upsample the reconstructed 16 kHz audio to 44.1 kHz.

Training Strategies

Multitask Learning To address the scarcity of conditional lyrics-to-song data, the authors employ a multitask pre-training approach. The training data is decomposed into Text-to-Speech (to establish linguistic-vocal alignment), unconditional Music Generation (to improve musicality and style control), and Lyrics-to-Song (to learn segment-level alignment).

Multiphase Training The Stage-1 model is trained across four distinct phases:

  1. Warm Up: The model is warmed up using high-quality English and Chinese data with a linear learning rate schedule to establish basic musical generation capabilities.
  2. Constant Learning Rate: Additional in-the-wild, multilingual datasets are introduced while maintaining a constant learning rate.
  3. Context Extension: The maximum positional embedding and sequence length are extended to handle longer musical contexts, and single-track unconditional data is removed.
  4. Annealing with Control Injection: The learning rate is annealed using a cosine schedule. Stronger control signals, such as reference audio (ICL) and vocal timbre tags, are introduced alongside a curated subset of high-quality data to enable precise controllability.

Test-time Strategies During inference, forced decoding ensures that only valid audio vocabulary tokens are generated until the end-of-audio token is predicted. Classifier-free guidance is applied to the conditional log-probabilities to improve generation quality:

ℓcfg(k)=s[ℓc(k)−ℓu(k)]+ℓu(k)\ell_{\text{cfg}}(k) = s [\ell_c(k) - \ell_u(k)] + \ell_u(k)ℓcfg​(k)=s[ℓc​(k)−ℓu​(k)]+ℓu​(k)

where sss is the guidance scale, ℓc(k)\ell_c(k)ℓc​(k) is the conditional log-probability, and ℓu(k)\ell_u(k)ℓu​(k) is the unconditional log-probability. Dual-track ICL is enabled by default to maximize audio quality and musical stability.

Experiment

The experiments evaluate YuE, a generative music model trained on large scale conditional speech and unconditional music data with dual next token prediction, using human A/B tests, automatic distribution and alignment metrics, multilingual fine tuning, ablations, and memorization analysis. YuE shows competitive performance against closed source systems, with particular strengths in long form structure, arrangement, vocal range, controllability, and multilingual adaptation, though it still trails Suno V4 in acoustic quality and some control dimensions. Ablations confirm that semantic acoustic tokenizers, source separation priors with Dual-NTP, CoT based lyric conditioning, scaling, and inference time ICL with CFG improve convergence, lyric following, musicality, and full song generation, while memorization tests indicate creative recombination rather than copying.

The special tokens define document and audio boundaries, training stage transitions, and tokenizer type. Experimental context indicates that the in-context learning mode recombines learned patterns rather than copying extensively, and that semantic-enhanced tokens are more stable than acoustic tokens. Early activation of in-context learning data can harm musicality and increase overfitting. Special tokens mark document and audio boundaries, training stage starts, and tokenizer type. Generated-reference similarity was lower than known duplicate baselines and only moderate relative to genre-level baselines, suggesting limited copying. Acoustic tokens led to convergence difficulties and higher losses compared with semantic-enhanced tokens. Early in-context learning activation caused overfitting, diminished musicality, and more invalid outputs at larger scales.

The comparison shows YuE achieves the strongest distribution matching on KL divergence while remaining competitive on FAD. It also performs comparably to leading closed-source models on content-based aesthetic metrics, particularly production quality and usability. Alignment results are mixed: YuE leads on CLaMP 3, but its lower CLAP score is inconsistent with human evaluations, suggesting CLAP may be less reliable for controllability. YuE achieves the best KL divergence among compared models and remains competitive on FAD, with Udio showing the lowest FAD. YuE's content-based aesthetic scores are comparable to top closed-source systems, and it records the highest CLaMP 3 alignment despite a lower CLAP score.

Vocal Range has the strongest positive association with both musicality and average listener preference, exceeding 0.85 correlation. Other automatic metrics show weaker or mixed relationships, with CLaMP 3 moderately positive while KL, FAD, and CLAP are weak or near zero. This supports vocal expressiveness and melodic diversity as practical proxies for subjective music quality. Vocal Range correlated above 0.85 with both Musicality and Average ratings, making it the strongest automatic predictor in this comparison. KL and FAD showed weak negative correlations with Musicality and Average, suggesting distribution matching metrics poorly track these subjective judgments. CLaMP 3 showed moderate positive correlations with Musicality and Average, while CLAP remained close to zero.

CLaMP 3 alignment scores correlate more consistently and positively with human judgments of controllability than CLAP scores across all evaluated tasks. CLAP shows notably weak or negative correlations, particularly for lyric following and instrument control. The results indicate CLaMP 3 better captures nuanced controllability aspects in generated music. CLaMP 3 scores show consistently stronger positive correlations with human controllability ratings than CLAP scores across lyric, genre, instrument, emotion, and tempo/rhythm control. CLAP correlations are near zero or negative for lyric following and instrument control, indicating limited sensitivity to these controllability aspects. The differences are especially pronounced for lyric following and instrument control, where CLaMP 3 shows moderate positive agreement but CLAP does not.

KL shows weak positive correlations with acoustic quality preference ratings, with a somewhat stronger association for vocal quality than accompaniment quality. FAD correlations are near zero and slightly negative, indicating little alignment with either acoustic quality judgment. These patterns suggest that distribution-level metrics may not fully capture subtle subjective perceptions of acoustic fidelity. KL correlates weakly and positively with acoustic quality preferences, and its relationship is slightly stronger for vocal quality than accompaniment quality. FAD shows near-zero or slightly negative correlations with both acoustic quality preference metrics, suggesting it does not track these judgments well. The weak relationships imply that distribution matching metrics may overlook finer acoustic quality perceptions.

The experiments evaluate tokenization and training strategies for music generation, benchmark the model against closed and open systems, and examine how automatic metrics relate to human judgments. Semantic-enhanced tokens prove more stable than acoustic tokens, while early in-context learning activation causes overfitting and reduced musicality, with limited evidence of direct copying. In evaluations, the model achieves strong distribution matching and competitive aesthetic quality, vocal range is the best automatic predictor of musicality and listener preference, and CLaMP 3 tracks controllability more reliably than CLAP, whereas KL and FAD only weakly reflect subjective acoustic quality.


Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing

HyperAI Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp