Skip to content
프로젝트

소개

[ACL 2025 Main] SongComposer: A Large Language Model for Lyric and Melody Generation in Song Composition

AI 및 머신러닝

이 수치를 측정하는 방법

What you can do

  • 🔥 SongComposer composes melodies and lyrics with symbolic song representations, with the benefit of better token efficiency, precise representation, flexible format, and human-readable output.
  • 🔥 SongCompose-PT, a comprehensive pretraining dataset that includes lyrics, melodies, and paired lyrics and melodies in either Chinese or English, will be released.
  • 🔥 SongComposer outperforms advanced LLMs like GPT-4 in tasks such as lyric-to-melody generation, melody-to-lyric generation, song continuation, and text-to-song creation.

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+2
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

SongComposer

This repository is the official implementation of SongComposer.

SongComposer: A Large Language Model for Lyric and Melody Composition in Song Generation

Shuangrui Ding*1, Zihan Liu*2,3, Xiaoyi Dong3, Pan Zhang3, Rui Qian1, Conghui He3, Dahua Lin3, Jiaqi Wang†3

1The Chinese University of Hong Kong, 2Beihang University, 3Shanghai AI Laboratory

* Equal Contribution. †Corresponding authors.

📜 News

🚀 [2025/5/31] We release the SongCompose data link on Hugging Face🤗.

🎉 [2025/5/16] SongComposer is accepted by ACL 2025 main!

🚀 [2024/6/12] We enhanced SongComposer to a whole-song level and the demo page is updated!

🚀 [2024/3/21] The finetune code of SongComposer are publicly available and the weights of SongComposer_pretrain and SongComposer_sft are publicly available on Hugging Face🤗.

🚀 [2024/2/28] The paper and demo page are released!

💡 Highlights

  • 🔥 SongComposer composes melodies and lyrics with symbolic song representations, with the benefit of better token efficiency, precise representation, flexible format, and human-readable output.
  • 🔥 SongCompose-PT, a comprehensive pretraining dataset that includes lyrics, melodies, and paired lyrics and melodies in either Chinese or English, will be released.
  • 🔥 SongComposer outperforms advanced LLMs like GPT-4 in tasks such as lyric-to-melody generation, melody-to-lyric generation, song continuation, and text-to-song creation.

🛠️ Usage

Requirements

  • python 3.9 and above
  • pytorch 2.0 and above
  • CUDA 12.0 and above are recommended (this is for GPU users)

Installation

Before running the code, make sure you have setup the environment and installed the required packages. Make sure you meet the above requirements, and then install the dependent libraries. Please refer to the installation section of finetune scripts.

Quickstart

We provide a simple example to show how to use SongComposer-SFT with 🤗 Transformers.

🤗 Transformers
from transformers import AutoTokenizer, AutoModelForCausalLM
ckpt_path = "Mar2Ding/songcomposer_sft"
tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
prompt = 'Create a song on brave and sacrificing with a rapid pace.'
model.inference(prompt, tokenizer)

Finetune

Please refer to our finetune scripts.

Inference

We have provide a notebook (inference.ipynb) for the inference stage.

⭐ Samples

Audio samples, including our SongComposer and other baselines, are available on our Demo Page. The samples span four tasks related to song generation, covering both English and Chinese.

✒️ Citation

If you find our work helpful for your research, please consider giving a star ⭐ and citation 📝

@misc{ding2024songcomposer,
      title={SongComposer: A Large Language Model for Lyric and Melody Generation in Song Composition}, 
      author={Shuangrui Ding and Zihan Liu and Xiaoyi Dong and Pan Zhang and Rui Qian and Junhao Huang and Conghui He and Dahua Lin and Jiaqi Wang},
      year={2024},
      eprint={2402.17645},
      archivePrefix={arXiv},
      primaryClass={cs.SD}
}

관련 프로젝트 살펴보기

불러오는 중…