Music generation could be approached similarly to language generation. There are many ways to represent music as text and then use a language model to create a model capable of music generation. For encoding MIDI files as text, I am using the excellent
implementation
of Dr. Tristan Beheren of the paper:
MMM: Exploring Conditional Multi-Track Music Generation with the Transformer
.
It achieves the following results on the evaluation set:
Train Loss: 0.5365
Validation Loss: 1.5482
Model description
The model is GPT-2 loaded with the GPT2LMHeadModel architecture from Hugging Face. The context size is 256, and the vocabulary size is 588. The model uses a
WhitespaceSplit
pre-tokenizer. The
tokenizer
is also in the Hugging Face hub.
Intended uses & limitations
I built this model to learn more about how to use Hugging Face. I am implementing some of the parts of the
Hugging Face course
with a project that I find interesting.
The main intention of this model is educational. I am creating a
series of notebooks
where I show every step of the process:
Collecting the data
Pre-processing the data
Training a tokenizer from scratch
Fine-tuning a GPT-2 model
Building a Gradio app for the model
I trained the model using the free version of Colab with a small dataset. Right now, it is heavily overfitting. My idea is to have a more extensive dataset of Guitar Music from Latinoamerica to train a new model similar to the Mutopia Guitar Model, using more GPU resources.
Training and evaluation data
I am training the model with
Mutopia Guitar Dataset
. This dataset consists of the soloist guitar pieces of the
Mutopia Project
.
The dataset mainly contains guitar music from western classical composers, such as Sor, Aguado, Carcassi, and Giuliani.
For the first epochs of training, I transposed the notes by raising and lowering the pitches using the twelve semi-tones of an entire octave. Later, I trained the model without transposing the pieces so that generation shows better results of a real guitar piece.
Training hyperparameters
Click to expand
The following hyperparameters were used during training (with transposition):
Without transposition (third round - new tokenizer):
Train Loss
Validation Loss
Epoch
6.1361
6.4569
0
5.6383
5.8249
1
4.9125
4.8956
2
4.2013
4.2778
3
3.8665
4.0330
4
3.7106
3.8956
5
3.6041
3.7995
6
3.5301
3.7485
7
3.4973
3.7323
8
3.4909
3.7323
9
Without transposition (fourth round - new tokenizer):
Train Loss
Validation Loss
Epoch
3.4879
3.7206
0
3.4667
3.6874
1
3.4229
3.6373
2
3.3680
3.5751
3
3.2998
3.5026
4
3.2208
3.4240
5
3.1385
3.3397
6
3.0580
3.2587
7
2.9949
3.2118
8
2.9646
3.1958
9
Without transposition (fifth round - new tokenizer):
Train Loss
Validation Loss
Epoch
2.9562
3.1902
0
2.9457
3.1751
1
2.9266
3.1512
2
2.9039
3.1176
3
2.8705
3.0775
4
2.8291
3.0295
5
2.7872
2.9811
6
2.7394
2.9321
7
2.6996
2.9023
8
2.6819
2.8927
9
Without transposition (sixth round - new tokenizer):
Train Loss
Validation Loss
Epoch
2.6769
2.8894
0
2.6719
2.8791
1
2.6612
2.8638
2
2.6465
2.8439
3
2.6242
2.8174
4
2.6006
2.7877
5
2.5679
2.7554
6
2.5387
2.7223
7
2.5115
2.7029
8
2.5011
2.6970
9
Without transposition (seventh round - new tokenizer):
Train Loss
Validation Loss
Epoch
2.2881
2.2059
0
1.7702
1.8533
1
1.4625
1.6948
2
1.2876
1.6865
3
1.1926
1.6414
4
1.1329
1.6360
5
1.1069
1.6448
6
1.0408
1.6207
7
0.8939
1.5837
8
0.7265
1.5901
9
0.5902
1.6261
10
0.4489
1.7007
11
0.3223
1.7940
12
0.2158
1.9032
13
0.1448
1.9892
14
Framework versions
Transformers 4.22.1
TensorFlow 2.8.2
Datasets 2.5.1
Tokenizers 0.12.1
Runs of juancopi81 mutopia_guitar_mmm on huggingface.co
49
Total runs
0
24-hour runs
11
3-day runs
18
7-day runs
25
30-day runs
More Information About mutopia_guitar_mmm huggingface.co Model
mutopia_guitar_mmm huggingface.co
mutopia_guitar_mmm huggingface.co is an AI model on huggingface.co that provides mutopia_guitar_mmm's model effect (), which can be used instantly with this juancopi81 mutopia_guitar_mmm model. huggingface.co supports a free trial of the mutopia_guitar_mmm model, and also provides paid use of the mutopia_guitar_mmm. Support call mutopia_guitar_mmm model through api, including Node.js, Python, http.
mutopia_guitar_mmm huggingface.co is an online trial and call api platform, which integrates mutopia_guitar_mmm's modeling effects, including api services, and provides a free online trial of mutopia_guitar_mmm, you can try mutopia_guitar_mmm online for free by clicking the link below.
juancopi81 mutopia_guitar_mmm online free url in huggingface.co:
mutopia_guitar_mmm is an open source model from GitHub that offers a free installation service, and any user can find mutopia_guitar_mmm on GitHub to install. At the same time, huggingface.co provides the effect of mutopia_guitar_mmm install, users can directly use mutopia_guitar_mmm installed effect in huggingface.co for debugging and trial. It also supports api for free installation.