# HarmonyRL
Symbolic piano music generation: supervised pretraining on MAESTRO, then PPO
fine-tuning against musical reward functions.
Code: https://github.com/SupratikB23/HarmonyRL
## Files
| File | What it is |
|---|---|
| `checkpoints/transformer_supervised.pt` | Supervised pretrained model, epoch 12 |
| `checkpoints/transformer_rl.pt` | PPO fine-tuned, 3000 iterations, includes the critic |
Each checkpoint carries its own model config, so it rebuilds the exact
architecture with no hardcoded dimensions.
## Model
25.3M-parameter pre-norm decoder-only Transformer. `d_model` 512, 8 layers,
8 heads, feed-forward 2048, context 2048. Rotary embeddings applied to queries
and keys inside each attention head, causal masking, KV cache for generation.
Vocabulary is 172 REMI-style event tokens: bar, position, pitch, velocity,
duration. A note is four tokens, and notes sharing a position stay simultaneous,
so polyphony is preserved.
## Training
Trained on MAESTRO v3.0.0, 1276 MIDI files…