tions serving as inputs to the model and the target output
tokens set as the special audio tokens.
Assuming a total of N tokens generated by the LLaMA
2 model, where [AUDi] with i ∈ {1, 2, . . . , 8} consti-
tutes the last 8 tokens. The hidden embeddings size is
(1, N, 4096), and the last 8 tokens are extracted along di-
mension −1, resulting in an input embedding size of the
Output Projection layer as (1, 8, 4096). The output size
from the projection layer varies based on the Music Gen-
eration model: for AudioLDM2, it is (1, 512), and for
MusicGen, it is (512, 768).
M2UGen