Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
MusicTransformer written for MaestroV2 using the Pytorch framework for music generation
| Date | Stars |
|---|---|
| 2026-07-24 | 263 |
| 2026-07-25 | 263 |
| 2026-07-28 | 263 |
| 2026-07-30 | 263 |
| 2026-08-06 | 263 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Music Transformer [](https://colab.research.google.com/github/asigalov61/SuperPiano/blob/master/Super_Piano_3.ipynb) Currently supports Pytorch >= 1.2.0 with Python >= 3.6 There is now a much friendlier [Google Colab version](https://github.com/asigalov61/SuperPiano/blob/master/Super_Piano_3.ipynb) of this project courtesy of [Alex](https://github.com/asigalov61)! ## About This is a reproduction of the MusicTransformer (Huang et al., 2018) for Pytorch. This implementation utilizes the generic Transformer implementation introduced in Pytorch 1.2.0 (https://pytorch.org/docs/stable/nn.html#torch.nn.Transformer). ## Generated Music: Some various music results (midi and mp3) are in the following Google Drive folder: https://drive.google.com/drive/folders/1qS4z_7WV4LLgXZeVZU9IIjatK7dllKrc?usp=sharing See the results section for the model hyperparameters used for generation. Mp3 results were played through a [Kawai MP11SE](https://kawaius.com/product/mp11se/). In order to play .mid files, we used [Midi Editor](https://www.midieditor.org/) which is free to use and open source. ## TODO * Write own midi pre-processor (sustain pedal errors with jason's) * Support any midi file beyond Maestro * Fixed length song generation * Midi augmentations from paper * Multi-GPU support ## How to run 1. Download the Maestro dataset (we used v2 but v1 should work as well). You can download the dataset [here](https://magenta.tensorflow.org/datasets/maestro). You only need the MIDI version if you're tight on space. 2. Run `git submodule update --init --recursive` to get the MIDI pre-processor provided by jason9693 et al. (https://github.com/jason9693/midi-neural-processor), which is used to convert the MIDI file into discrete ordered message types for training and evaluating. 3. Run `preprocess_midi.py -output_dir <path_to_save_output> <path_to_maestro_data>`, or run with `--help` for details. This will write pre-processed data into folder split into `train`, `val`, and `test` as per Maestro's recommendation. 4. To train a model, run `train.py`. Use `--help` to see the tweakable parameters. See the results section for details on model performance. 5. After training models, you can evaluate them with `evaluate.py` and generate a MIDI piece with `generate.py`. To graph and compare results visually, use `graph_results.py`. For the most part, you can just leave most arguments at their default values. If you are using a different dataset location or other such things, you will need to specify that in the arguments. Beyond that, the average user does not have to worry about most of the arguments. ### Training As an example to train a model using the parameters specified in results: ``` python train.py -output_dir rpr --rpr ``` You can additonally specify both a weight and print modulus that determine what epochs to save weights and what batches to print. The weights that achieved the best loss and the best accuracy (separate) are always stored in results, regardless of weight modulus input. ### Evaluation You can evaluate a model using; ``` python evaluate.py -model_weights rpr/results/best_acc_weights.pickle --rpr ``` Your model's results may vary because a random sequence start position is chosen for each evaluation piece. This may be changed in the future. ### Generation You can generate a piece with a trained model by using: ``` python generate.py -output_dir output -model_weights rpr/results/best_acc_weights.pickle --rpr ``` The default generation method is a sampled probability distribution with the softmaxed output as the weights. You can also use beam search but this simply does not work well and is not recommended. ## Pytorch Transformer We used the Transformer class provided since Pytorch 1.2.0 (https://pytorch.org/docs/stable/nn.html#torch.nn.Transformer). The provided Transformer assumes an encoder-decoder architecture. To make it decoder-on
Excerpt of 6,509 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:28ccfb62b2e69721, topic:music-generation, desc:music generation
matched fp:28ccfb62b2e69721, topic:pytorch
matched fp:28ccfb62b2e69721, topic:transformer, readme:model weights