Commit ·
31d9624
0
Parent(s):
Duplicate from SymphonyGen/SymphonyGen
Browse filesCo-authored-by: SymphonyGen <SymphonyGen@users.noreply.huggingface.co>
Files changed (6)
- .gitattributesAdded+35
- README.mdAdded+91
- grpo_clamp+track_epoch_6.ptAdded+3
- grpo_clamp_epoch_10.ptAdded+3
- stage_one_pretrained.ptAdded+3
- stage_two_pretrained.ptAdded+3
1234567891011121314151617181920212223242526272829303132333435*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091---license: mittags:- music- music-generation- symbolic-music- midi- orchestral-music- transformer- grpo- reinforcement-learninglibrary_name: pytorch---
# SymphonyGen: 3D Hierarchical Orchestral Generation with Controllable Harmony Skeleton
[](https://arxiv.org/abs/2604.25498)[](https://github.com/symphonygen/symphonygen)[](https://symphonygen.github.io)
SymphonyGen is a 3D hierarchical framework for contemporary cinematic orchestration, accepted at **ISMIR 2026**. It decomposes symphonic scores along the Bar, Track, and Event axes with a cascading decoder architecture, conditions generation on a beat-quantized multi-voice **harmony skeleton** ("short-score" conditioning), refines the model with **GRPO** using a cross-modal audio-perceptual reward (CLaMP 3 audio embeddings), and suppresses tonal clashes at inference time with **dissonance-averse sampling**.
- 📄 **Paper:** [SymphonyGen: 3D Hierarchical Orchestral Generation with Controllable Harmony Skeleton](https://arxiv.org/abs/2604.25498) (ISMIR 2026)- 💻 **Code:** [github.com/symphonygen/symphonygen](https://github.com/symphonygen/symphonygen)- 🌐 **Audio demo page:** [symphonygen.github.io](https://symphonygen.github.io) (listening-test excerpts for composition and re-orchestration, plus baselines)
## Released checkpoints
All checkpoints are **packed**: each `.pt` bundles the model config together with the weights, and is loaded by `ModelBase.from_pretrained` in the codebase.
| File | Model | Role || --- | --- | --- || `stage_one_pretrained.pt` | 1D harmony skeleton model (12 layers, hidden 768, 87M) | Samples harmony skeletons || `stage_two_pretrained.pt` | 3D symphony model (33 layers, hidden 512, 124M, 2-stream cross-attention) | Pretrained on the SymphonyNet Dataset; starting point for GRPO / finetuning || `grpo_clamp_epoch_10.pt` | 3D symphony model ("reinforced") | GRPO with the pure CLaMP 3 audio reward (paper round-1 subjective test) || `grpo_clamp+track_epoch_6.pt` | 3D symphony model ("reinforced+track") | GRPO with the composite CLaMP 3 + track density reward (paper round-2 subjective test) |
Recommended dissonance-averse sampling settings: `(λ_hn, λ_nn) = (1, 10)`; use register decay (`--register_decay 1`) with `reinforced+track` and `--register_decay 0` with `reinforced`.
## Usage
Generation is run through the [codebase](https://github.com/symphonygen/symphonygen) (see its README for full setup):
```bashgit clone https://github.com/symphonygen/symphonygencd symphonygen && pip install -r requirements.txtexport PYTHONPATH=$(pwd)
# Download the checkpoints into $ASSET_DIR (default: asset/)hf download SymphonyGen/SymphonyGen --local-dir asset/
# Generate a harmony skeleton, then orchestrate itpython arch/harmo/generator.py asset/stage_one_pretrained.pt --batch_size 4 --save_dir harmony_outpython arch/symph/generator.py asset/grpo_clamp+track_epoch_6.pt harmony_out \ --group_size 1 --save_dir songs --forbid_piano
# Or re-orchestrate any MIDI by analyzing its harmony skeletonpython arch/symph/generator.py asset/grpo_clamp+track_epoch_6.pt your_song.mid \ --analyze_harmo --save_dir songs```
The harmony skeleton may also be **user-written** (e.g. a few chords played on a MIDI keyboard, exported as MIDI) — pass it as the conditioning MIDI without `--analyze_harmo`.
## Training
- **Data:** the [SymphonyNet Dataset](https://symphonynet.github.io/) (728 classical + 45,632 contemporary MIDI files), 90/10 train/validation split.- **Pretraining:** four NVIDIA H800 GPUs for one day, AdamW, lr 1e-4 with cosine annealing.- **GRPO:** single GPU, lr 4e-5, group size 32 over 16 skeletons per epoch; reward = CLaMP 3 audio-embedding cosine similarity against the centroid of a small cinematic reference set (rendered with MuseScore 3), optionally + 0.2 × track-density term.
See the paper and the repository's `DIFF.md` for implementation details that go beyond the paper's description.
## Evaluation
Objective metrics (CLaMP similarity, dissonance, track density, harmony precision/recall, melodic movement/ornament) and two rounds of subjective listening tests are reported in the paper; reproduction scripts live under `Results/` in the codebase.
> **Reproducibility disclaimer:** the objective metrics depend on the exact implementation of the harmony analysis and of the harmony-skeleton filters (see `DIFF.md` in the code repository). As a result, you might see reproduced objective evaluation numbers that differ from the paper's tables. The trends, however, should be the same.
## Intended use and limitations
SymphonyGen is intended as a collaborative aid for composers, not as an autonomous replacement. It is oriented toward contemporary cinematic scoring through its data, reward, and hyperparameters. Generative outputs may inadvertently resemble existing works; users should not assume all outputs are fully original without verification.
## Citation
```bibtex@inproceedings{symphonygen2026, title = {SymphonyGen: 3D Hierarchical Orchestral Generation with Controllable Harmony Skeleton}, author = {He, Xuzheng and Nan, Nan and Wang, Zhilin and Kang, Ziyue and Mo, Zhuoru and Li, Ao and Pan, Yu and Li, Xiaobing and Yu, Feng and Guan, Xiaohong}, booktitle = {Proceedings of the 27th International Society for Music Information Retrieval Conference (ISMIR)}, year = {2026}}```123version https://git-lfs.github.com/spec/v1oid sha256:bf7313c9c2cdafc9472743b2d994942702f2b639f745257761e45dfb7c27af3csize 497491672123version https://git-lfs.github.com/spec/v1oid sha256:bf03ff281c4c8f84b5ab576484830126c86545a534e837110df71c0686b0ea10size 497488489123version https://git-lfs.github.com/spec/v1oid sha256:229027368063ba46048deb63a0b5e7a37f072d0402d0505123d6e30c862a7352size 346559849123version https://git-lfs.github.com/spec/v1oid sha256:de056dae05d6b095a2208ae57d2b525f07161ad2d5b7de79f1ca3b07d8f42dbfsize 497489100.gitattributesAdded+35
README.mdAdded+91
grpo_clamp+track_epoch_6.ptAdded+3
grpo_clamp_epoch_10.ptAdded+3
stage_one_pretrained.ptAdded+3
stage_two_pretrained.ptAdded+3