SkyTNT / midi-model

Midi event transformer for symbolic music generation
Apache License 2.0
166 stars 24 forks source link

[QUESTION] LoRa Creation #23

Open Flockhopper-bit opened 5 days ago

Flockhopper-bit commented 5 days ago

How would one go about creating a LoRa for this? Is there any plan to add a LoRa training feature within the GUI itself (for local use)?

SkyTNT commented 5 days ago

You need to prepare some MIDI files (ideally more than 1000). Use train.py for training, and specify the --task option as lora. The value of --data-val-split must be less than the number of your MIDI files, as this defines the number of MIDI files used for the validation set. The --gen-example-interval option determines the interval for generating samples during training, which is triggered every time a checkpoint is saved. Set this to a larger value to avoid frequent interruptions during training.

I do not plan to add LoRA training to the GUI. First, the GUI is mainly designed for inference. To support training, I would have to change the inference library from ONNXRuntime to PyTorch. However, PyTorch is very large, which is not ideal for packaging. Secondly, the training efficiency in the GUI might be relatively low.