ChatMusician: Understanding and Generating Music Intrinsically with LLM

📄 arXiv: 2402.16153v1 📥 PDF

作者: Ruibin Yuan, Hanfeng Lin, Yi Wang, Zeyue Tian, Shangda Wu, Tianhao Shen, Ge Zhang, Yuhang Wu, Cong Liu, Ziya Zhou, Ziyang Ma, Liumeng Xue, Ziyu Wang, Qin Liu, Tianyu Zheng, Yizhi Li, Yinghao Ma, Yiming Liang, Xiaowei Chi, Ruibo Liu, Zili Wang, Pengfei Li, Jingcheng Wu, Chenghua Lin, Qifeng Liu, Tao Jiang, Wenhao Huang, Wenhu Chen, Emmanouil Benetos, Jie Fu, Gus Xia, Roger Dannenberg, Wei Xue, Shiyin Kang, Yike Guo

分类: cs.SD, cs.AI, cs.CL, cs.LG, cs.MM, eess.AS

发布日期: 2024-02-25

备注: GitHub: https://shanghaicannon.github.io/ChatMusician/


💡 一句话要点

提出ChatMusician以解决音乐生成与理解的挑战

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 音乐生成 音乐理解 ABC符号 持续预训练 多模态学习 人工智能音乐

📋 核心要点

  1. 现有大型语言模型在音乐生成与理解方面的能力不足,无法有效处理音乐这一复杂的创作语言。
  2. ChatMusician通过对LLaMA2进行持续预训练和微调,使用ABC符号作为音乐表示法,将音乐视为一种文本语言,从而提升了模型的音乐理解与生成能力。
  3. 在实验中,ChatMusician在大学级音乐理解基准MusicTheoryBench上显著超越了LLaMA2和GPT-3.5,展示了其在音乐生成方面的优越性能。

📝 摘要(中文)

尽管大型语言模型(LLMs)在文本生成方面表现出色,但其在音乐这一人类创造性语言上的能力尚未得到充分发挥。本文介绍了ChatMusician,一个开源的LLM,集成了内在的音乐能力。该模型基于对LLaMA2的持续预训练和微调,使用文本兼容的音乐表示法ABC符号,将音乐视为第二语言。ChatMusician能够理解和生成音乐,且无需外部多模态神经结构或分词器。值得注意的是,赋予音乐能力并未损害语言能力,甚至在MMLU评分上略有提升。我们的模型能够根据文本、和弦、旋律、动机、音乐形式等条件创作结构良好的完整音乐,超越了GPT-4基线。在我们精心策划的大学级音乐理解基准MusicTheoryBench上,ChatMusician在零-shot设置下显著超越了LLaMA2和GPT-3.5。我们的工作表明,LLMs可以成为音乐的优秀压缩器,但仍有大量领域待开发。我们在GitHub上发布了4B token的音乐语言语料库MusicPile、收集的MusicTheoryBench、代码、模型和演示。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在音乐生成与理解方面的不足,现有方法未能有效处理音乐的复杂性与多样性。

核心思路:ChatMusician的核心思路是将音乐视为一种文本语言,通过对LLaMA2的持续预训练和微调,使其具备内在的音乐能力。这样的设计使得模型能够在不依赖外部多模态结构的情况下,理解和生成音乐。

技术框架:ChatMusician的整体架构包括数据预处理、模型训练和生成模块。数据预处理阶段使用ABC符号将音乐转换为文本格式,模型训练阶段采用持续预训练和微调策略,生成模块则负责根据输入条件生成音乐。

关键创新:最重要的技术创新在于将音乐作为第二语言进行处理,使得模型能够在保持语言能力的同时,增强音乐生成能力。这一方法与传统的多模态学习方法有本质区别。

关键设计:在模型设计中,采用了特定的损失函数以优化音乐生成质量,并在网络结构上进行了调整,以适应音乐的特性。具体的参数设置和训练策略在实验中经过反复验证,以确保模型的有效性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

在实验中,ChatMusician在大学级音乐理解基准MusicTheoryBench上以显著优势超越了LLaMA2和GPT-3.5,尤其在零-shot设置下表现突出,展示了其在音乐生成与理解方面的强大能力。

🎯 应用场景

ChatMusician的研究成果可广泛应用于音乐创作、教育和分析等领域。它能够辅助音乐创作者生成高质量的音乐作品,帮助学生理解音乐理论,同时也为音乐分析提供新的工具,推动音乐与人工智能的结合。

📄 摘要(原文)

While Large Language Models (LLMs) demonstrate impressive capabilities in text generation, we find that their ability has yet to be generalized to music, humanity's creative language. We introduce ChatMusician, an open-source LLM that integrates intrinsic musical abilities. It is based on continual pre-training and finetuning LLaMA2 on a text-compatible music representation, ABC notation, and the music is treated as a second language. ChatMusician can understand and generate music with a pure text tokenizer without any external multi-modal neural structures or tokenizers. Interestingly, endowing musical abilities does not harm language abilities, even achieving a slightly higher MMLU score. Our model is capable of composing well-structured, full-length music, conditioned on texts, chords, melodies, motifs, musical forms, etc, surpassing GPT-4 baseline. On our meticulously curated college-level music understanding benchmark, MusicTheoryBench, ChatMusician surpasses LLaMA2 and GPT-3.5 on zero-shot setting by a noticeable margin. Our work reveals that LLMs can be an excellent compressor for music, but there remains significant territory to be conquered. We release our 4B token music-language corpora MusicPile, the collected MusicTheoryBench, code, model and demo in GitHub.