Alexis Wang commited on
Commit
0c5959a
Β·
verified Β·
1 Parent(s): 1be08f9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +68 -0
README.md CHANGED
@@ -4,3 +4,71 @@ tags:
4
  - music
5
  ---
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  - music
5
  ---
6
 
7
+ # 🎡 NotaGen: Advancing Musicality in Symbolic Music Generation with Large Language Model Training Paradigms
8
+
9
+ <p align="center">
10
+ <!-- ArXiv -->
11
+ <a href="https://arxiv.org/abs/XXXX.XXXXX">
12
+ <img src="https://img.shields.io/badge/NotaGen_Paper-ArXiv-%23B31B1B?logo=arxiv&logoColor=white" alt="Paper">
13
+ </a>
14
+ &nbsp;&nbsp;
15
+ <!-- HuggingFace -->
16
+ <a href="https://huggingface.co/ElectricOnes/NotaGen">
17
+ <img src="https://img.shields.io/badge/NotaGen_Weights-HuggingFace-%23FFD21F?logo=huggingface&logoColor=white" alt="Weights">
18
+ </a>
19
+ &nbsp;&nbsp;
20
+ <!-- Web Demo -->
21
+ <a href="https://electricalexis.github.io/notagen-demo/">
22
+ <img src="https://img.shields.io/badge/NotaGen_Demo-Web-%23007ACC?logo=google-chrome&logoColor=white" alt="Demo">
23
+ </a>
24
+ </p>
25
+
26
+ <p align="center">
27
+ <img src="notagen.png" alt="NotaGen" width="50%">
28
+ </p>
29
+
30
+
31
+ ## πŸ“– Overview
32
+ **NotaGen** is a symbolic music generation model that explores the potential of producing **high-quality classical sheet music**. Inspired by the success of Large Language Models (LLMs), NotaGen adopts a three-stage training paradigm:
33
+ - 🧠 **Pre-training** on 1.6M musical pieces
34
+ - 🎯 **Fine-tuning** on ~9K classical compositions with `period-composer-instrumentation` prompts
35
+ - πŸš€ **Reinforcement Learning** using our novel **CLaMP-DPO** method (no human annotations or pre-defined rewards required.)
36
+
37
+ Check our [demo page](https://electricalexis.github.io/notagen-demo/) and enjoy music composed by NotaGen!
38
+
39
+ ## βš™οΈ Environment Setup
40
+
41
+ ```bash
42
+ conda create --name notagen python=3.10
43
+ conda activate notagen
44
+ conda install pytorch==2.3.0 pytorch-cuda=11.8 -c pytorch -c nvidia
45
+ pip install accelerate
46
+ pip install optimum
47
+ pip install -r requirements.txt
48
+ ```
49
+
50
+ ## πŸ‹οΈ NotaGen Model Weights
51
+
52
+ ### Pre-training
53
+ We provide pre-trained weights of different scales:
54
+ | Models | Parameters | Patch-level Decoder Layers | Character-level Decoder Layers | Hidden Size | Patch Length (Context Length) |
55
+ | ---- | ---- | ---- | ---- | ---- | ---- |
56
+ | [NotaGen-small](https://huggingface.co/ElectricOnes/NotaGen/blob/main/weights_notagen_pretrain_p_size_16_p_length_2048_p_layers_12_c_layers_3_h_size_768_lr_0.0002_batch_8.pth) | 110M | 12 | 3 | 768 | 2048 |
57
+ | [NotaGen-medium](https://huggingface.co/ElectricOnes/NotaGen/blob/main/weights_notagen_pretrain_p_size_16_p_length_2048_p_layers_16_c_layers_3_h_size_1024_lr_0.0001_batch_4.pth) | 244M | 16 | 3 | 1024 | 2048 |
58
+ | [NotaGen-large](https://huggingface.co/ElectricOnes/NotaGen/blob/main/weights_notagen_pretrain_p_size_16_p_length_1024_p_layers_20_c_layers_6_h_size_1280_lr_0.0001_batch_4.pth) | 516M | 20 | 6 | 1280 | 1024 |
59
+
60
+ ### Fine-tuning
61
+
62
+ We fine-tuned NotaGen-large on a corpus of approximately 9k classical pieces. You can download the weights [here](https://huggingface.co/ElectricOnes/NotaGen/blob/main/weights_notagen_pretrain-finetune_p_size_16_p_length_1024_p_layers_c_layers_6_20_h_size_1280_lr_1e-05_batch_1.pth).
63
+
64
+ ### Reinforcement-Learning
65
+
66
+ After pre-training and fine-tuning, we optimized NotaGen-large with 3 iterations of CLaMP-DPO. You can download the weights [here](https://huggingface.co/ElectricOnes/NotaGen/blob/main/weights_notagen_pretrain-finetune-RL3_beta_0.1_lambda_10_p_size_16_p_length_1024_p_layers_20_c_layers_6_h_size_1280_lr_1e-06_batch_1.pth).
67
+
68
+ ### 🌟 NotaGen-X
69
+
70
+ Inspired by Deepseek-R1, we further optimized the training procedures of NotaGen and released a better version --- [NotaGen-X](https://huggingface.co/ElectricOnes/NotaGen/blob/main/weights_notagenx_p_size_16_p_length_1024_p_layers_20_h_size_1280.pth). Compared to the version in the paper, NotaGen-X incorporates the following improvements:
71
+
72
+ - We introduced a post-training stage between pre-training and fine-tuning, refining the model with a classical-style subset of the pre-training dataset.
73
+ - We removed the key augmentation in the Fine-tune stage, making the instrument range of the generated compositions more reasonable.
74
+ - After RL, we utilized the resulting checkpoint to gather a new set of post-training data. Starting from the pre-trained checkpoint, we conducted another round of post-training, fine-tuning, and reinforcement learning.