README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MusicMamba
|
| 2 |
+
|
| 3 |
+
This is the official implementation of MusicMamba.
|
| 4 |
+
|
| 5 |
+
*Checkout our demo and paper* : [Demo](https://moersxm.github.io/MusicMamba_Demo/) | [arXiv](https://arxiv.org/abs/2409.02421)
|
| 6 |
+
|
| 7 |
+
## Environment
|
| 8 |
+
* Clone this Repo
|
| 9 |
+
|
| 10 |
+
```bash
|
| 11 |
+
git clone https://github.com/Wietc/MusicMamba.git
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
* using python version 3.11.5
|
| 15 |
+
* using pytorch version 2.2.1
|
| 16 |
+
* install python dependencies
|
| 17 |
+
|
| 18 |
+
`pip install -r requirements.txt`
|
| 19 |
+
|
| 20 |
+
* Mamba needs to be downloaded separately
|
| 21 |
+
|
| 22 |
+
`pip install mamba_ssm`
|
| 23 |
+
|
| 24 |
+
* install checkpoints from Huggingface
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
## To train the model with GPU
|
| 28 |
+
|
| 29 |
+
We currently do not offer fine-tuning functionality.
|
| 30 |
+
|
| 31 |
+
## To generate music
|
| 32 |
+
|
| 33 |
+
`python generate.py`
|
| 34 |
+
|
| 35 |
+
## Details of the files in this repo
|
| 36 |
+
```
|
| 37 |
+
`
|
| 38 |
+
βββ data Stores train, test and val data.
|
| 39 |
+
β βββ FolkDB
|
| 40 |
+
βΒ Β βββ train
|
| 41 |
+
βΒ Β βββ test
|
| 42 |
+
β βββ val
|
| 43 |
+
βββ dataset.py Progress datasets.
|
| 44 |
+
βββ generate.py For generating music. (Detailed usage are written in the file)
|
| 45 |
+
βββ model.py The MusicMamba Architecture.
|
| 46 |
+
βββ midi_tokenize Remi-M tokenize.
|
| 47 |
+
βββ utilities Tools for generating music.
|
| 48 |
+
βΒ Β βββ argument_funcs.py Some arguments for generating.
|
| 49 |
+
βΒ Β βββ constants.py
|
| 50 |
+
β βββ device.py
|
| 51 |
+
βββ README.md Readme
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
## Citation
|
| 55 |
+
If you find this work helpful and use our code in your research, please kindly cite our paper:
|
| 56 |
+
```
|
| 57 |
+
@article{MusicMamba,
|
| 58 |
+
title={MusicMamba: A Dual-Feature Modeling Approach for Generating Chinese Traditional Music with Modal Precision},
|
| 59 |
+
author={Jiatao Chen and Xing Tang and Tianming Xie and Jing Wang and Wenjing Dong and Bing Shi}, year={2024},
|
| 60 |
+
eprint={2409.02421},
|
| 61 |
+
archivePrefix={arXiv},
|
| 62 |
+
}
|
| 63 |
+
```
|