Commit ·
00ff14a
0
Parent(s):
Duplicate from SymphonyGen/SymphonyGen
Browse filesCo-authored-by: SymphonyGen <SymphonyGen@users.noreply.huggingface.co>
- .gitattributes +35 -0
- README.md +91 -0
- grpo_clamp+track_epoch_6.pt +3 -0
- grpo_clamp_epoch_10.pt +3 -0
- stage_one_pretrained.pt +3 -0
- stage_two_pretrained.pt +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- music
|
| 5 |
+
- music-generation
|
| 6 |
+
- symbolic-music
|
| 7 |
+
- midi
|
| 8 |
+
- orchestral-music
|
| 9 |
+
- transformer
|
| 10 |
+
- grpo
|
| 11 |
+
- reinforcement-learning
|
| 12 |
+
library_name: pytorch
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# SymphonyGen: 3D Hierarchical Orchestral Generation with Controllable Harmony Skeleton
|
| 16 |
+
|
| 17 |
+
[](https://arxiv.org/abs/2604.25498)
|
| 18 |
+
[](https://github.com/symphonygen/symphonygen)
|
| 19 |
+
[](https://symphonygen.github.io)
|
| 20 |
+
|
| 21 |
+
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**.
|
| 22 |
+
|
| 23 |
+
- 📄 **Paper:** [SymphonyGen: 3D Hierarchical Orchestral Generation with Controllable Harmony Skeleton](https://arxiv.org/abs/2604.25498) (ISMIR 2026)
|
| 24 |
+
- 💻 **Code:** [github.com/symphonygen/symphonygen](https://github.com/symphonygen/symphonygen)
|
| 25 |
+
- 🌐 **Audio demo page:** [symphonygen.github.io](https://symphonygen.github.io) (listening-test excerpts for composition and re-orchestration, plus baselines)
|
| 26 |
+
|
| 27 |
+
## Released checkpoints
|
| 28 |
+
|
| 29 |
+
All checkpoints are **packed**: each `.pt` bundles the model config together with the weights, and is loaded by `ModelBase.from_pretrained` in the codebase.
|
| 30 |
+
|
| 31 |
+
| File | Model | Role |
|
| 32 |
+
| --- | --- | --- |
|
| 33 |
+
| `stage_one_pretrained.pt` | 1D harmony skeleton model (12 layers, hidden 768, 87M) | Samples harmony skeletons |
|
| 34 |
+
| `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 |
|
| 35 |
+
| `grpo_clamp_epoch_10.pt` | 3D symphony model ("reinforced") | GRPO with the pure CLaMP 3 audio reward (paper round-1 subjective test) |
|
| 36 |
+
| `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) |
|
| 37 |
+
|
| 38 |
+
Recommended dissonance-averse sampling settings: `(λ_hn, λ_nn) = (1, 10)`; use register decay (`--register_decay 1`) with `reinforced+track` and `--register_decay 0` with `reinforced`.
|
| 39 |
+
|
| 40 |
+
## Usage
|
| 41 |
+
|
| 42 |
+
Generation is run through the [codebase](https://github.com/symphonygen/symphonygen) (see its README for full setup):
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
git clone https://github.com/symphonygen/symphonygen
|
| 46 |
+
cd symphonygen && pip install -r requirements.txt
|
| 47 |
+
export PYTHONPATH=$(pwd)
|
| 48 |
+
|
| 49 |
+
# Download the checkpoints into $ASSET_DIR (default: asset/)
|
| 50 |
+
hf download SymphonyGen/SymphonyGen --local-dir asset/
|
| 51 |
+
|
| 52 |
+
# Generate a harmony skeleton, then orchestrate it
|
| 53 |
+
python arch/harmo/generator.py asset/stage_one_pretrained.pt --batch_size 4 --save_dir harmony_out
|
| 54 |
+
python arch/symph/generator.py asset/grpo_clamp+track_epoch_6.pt harmony_out \
|
| 55 |
+
--group_size 1 --save_dir songs --forbid_piano
|
| 56 |
+
|
| 57 |
+
# Or re-orchestrate any MIDI by analyzing its harmony skeleton
|
| 58 |
+
python arch/symph/generator.py asset/grpo_clamp+track_epoch_6.pt your_song.mid \
|
| 59 |
+
--analyze_harmo --save_dir songs
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
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`.
|
| 63 |
+
|
| 64 |
+
## Training
|
| 65 |
+
|
| 66 |
+
- **Data:** the [SymphonyNet Dataset](https://symphonynet.github.io/) (728 classical + 45,632 contemporary MIDI files), 90/10 train/validation split.
|
| 67 |
+
- **Pretraining:** four NVIDIA H800 GPUs for one day, AdamW, lr 1e-4 with cosine annealing.
|
| 68 |
+
- **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.
|
| 69 |
+
|
| 70 |
+
See the paper and the repository's `DIFF.md` for implementation details that go beyond the paper's description.
|
| 71 |
+
|
| 72 |
+
## Evaluation
|
| 73 |
+
|
| 74 |
+
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.
|
| 75 |
+
|
| 76 |
+
> **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.
|
| 77 |
+
|
| 78 |
+
## Intended use and limitations
|
| 79 |
+
|
| 80 |
+
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.
|
| 81 |
+
|
| 82 |
+
## Citation
|
| 83 |
+
|
| 84 |
+
```bibtex
|
| 85 |
+
@inproceedings{symphonygen2026,
|
| 86 |
+
title = {SymphonyGen: 3D Hierarchical Orchestral Generation with Controllable Harmony Skeleton},
|
| 87 |
+
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},
|
| 88 |
+
booktitle = {Proceedings of the 27th International Society for Music Information Retrieval Conference (ISMIR)},
|
| 89 |
+
year = {2026}
|
| 90 |
+
}
|
| 91 |
+
```
|
grpo_clamp+track_epoch_6.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf7313c9c2cdafc9472743b2d994942702f2b639f745257761e45dfb7c27af3c
|
| 3 |
+
size 497491672
|
grpo_clamp_epoch_10.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf03ff281c4c8f84b5ab576484830126c86545a534e837110df71c0686b0ea10
|
| 3 |
+
size 497488489
|
stage_one_pretrained.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:229027368063ba46048deb63a0b5e7a37f072d0402d0505123d6e30c862a7352
|
| 3 |
+
size 346559849
|
stage_two_pretrained.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de056dae05d6b095a2208ae57d2b525f07161ad2d5b7de79f1ca3b07d8f42dbf
|
| 3 |
+
size 497489100
|