Text Generation
PEFT
Safetensors
English
music
music-generation
chord-generation
symbolic-music
music-transformer
lora
blues
Instructions to use PearlLeeStudio/TheArtist-MusicTransformer-lora-blues with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use PearlLeeStudio/TheArtist-MusicTransformer-lora-blues with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Update: best-rank release (lora_r=32) from rank sweep
Browse files- README.md +39 -11
- adapter_config.json +4 -4
- adapter_model.safetensors +2 -2
- config.json +3 -3
- embedding_extension.pt +1 -1
README.md
CHANGED
|
@@ -18,7 +18,7 @@ pipeline_tag: text-generation
|
|
| 18 |
|
| 19 |
# TheArtist Music Transformer — LoRA Adapter (Blues)
|
| 20 |
|
| 21 |
-
**LoRA adapter that conditions the F1 base (PearlLeeStudio/TheArtist-MusicTransformer-ft-pop80) toward blues chord progressions.** One of eleven per-genre adapters released alongside the paper *Empirical Study of Pop and Jazz Mix Ratios for Genre-Adaptive Chord Generation* (Lee, 2026).
|
| 22 |
|
| 23 |
## Adapter summary
|
| 24 |
|
|
@@ -26,35 +26,63 @@ pipeline_tag: text-generation
|
|
| 26 |
|---|---|
|
| 27 |
| Base model | `PearlLeeStudio/TheArtist-MusicTransformer-ft-pop80` (F1, 25.6M params) |
|
| 28 |
| Adapter type | LoRA (Q/K/V projections) |
|
| 29 |
-
| LoRA rank |
|
| 30 |
-
| LoRA alpha |
|
| 31 |
| LoRA dropout | 0.05 |
|
| 32 |
| Target modules | `w_q`, `w_k`, `w_v` |
|
| 33 |
-
| Trainable parameters | ~
|
| 34 |
-
| Adapter file size | ~
|
| 35 |
| Base vocabulary | 351 tokens (jazz/pop) |
|
| 36 |
-
| Vocabulary extension | +
|
| 37 |
| Training epochs | 8 |
|
| 38 |
|
| 39 |
## Training data
|
| 40 |
|
| 41 |
9,944 chord-progression sequences in the **blues** subset of the [Chordonomicon dataset](https://huggingface.co/datasets/ailsntua/Chordonomicon). Chordonomicon is licensed CC BY-NC 4.0; see the dataset card for full terms.
|
| 42 |
|
|
|
|
|
|
|
| 43 |
## Genre character
|
| 44 |
|
| 45 |
12-bar and modified blues forms
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
## Evaluation
|
| 48 |
|
| 49 |
-
Validation token-level metrics on the genre-specific val split (994 sequences, no key augmentation). The F1 base column uses the same val split, same dataloader, and the same `[GENRE:none]`-initialized embedding-extension setup as the LoRA run — only the LoRA parameters and the trained embedding rows differ.
|
| 50 |
|
| 51 |
| Metric | F1 base alone | F1 + this LoRA | Δ |
|
| 52 |
|---|---:|---:|---:|
|
| 53 |
-
| Top-1 accuracy (%) | 81.
|
| 54 |
-
| Top-5 accuracy (%) | 94.
|
| 55 |
-
| Cross-entropy loss | 0.8137 | 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
## License and use
|
| 60 |
|
|
|
|
| 18 |
|
| 19 |
# TheArtist Music Transformer — LoRA Adapter (Blues)
|
| 20 |
|
| 21 |
+
**LoRA adapter that conditions the F1 base (PearlLeeStudio/TheArtist-MusicTransformer-ft-pop80) toward blues chord progressions.** One of eleven per-genre adapters released alongside the paper *Empirical Study of Pop and Jazz Mix Ratios for Genre-Adaptive Chord Generation* (Lee, 2026). This release is the **best-rank** snapshot from a 5-point rank sweep (`r ∈ {4, 8, 16, 32, 64}`); see §Rank sweep below for the full table and selection criterion.
|
| 22 |
|
| 23 |
## Adapter summary
|
| 24 |
|
|
|
|
| 26 |
|---|---|
|
| 27 |
| Base model | `PearlLeeStudio/TheArtist-MusicTransformer-ft-pop80` (F1, 25.6M params) |
|
| 28 |
| Adapter type | LoRA (Q/K/V projections) |
|
| 29 |
+
| LoRA rank | **32** |
|
| 30 |
+
| LoRA alpha | 64 |
|
| 31 |
| LoRA dropout | 0.05 |
|
| 32 |
| Target modules | `w_q`, `w_k`, `w_v` |
|
| 33 |
+
| Trainable parameters | ~794,624 (~3.06% of base) |
|
| 34 |
+
| Adapter file size | ~3.0 MB |
|
| 35 |
| Base vocabulary | 351 tokens (jazz/pop) |
|
| 36 |
+
| Vocabulary extension | +8 genre tokens (`embedding_extension.pt`) |
|
| 37 |
| Training epochs | 8 |
|
| 38 |
|
| 39 |
## Training data
|
| 40 |
|
| 41 |
9,944 chord-progression sequences in the **blues** subset of the [Chordonomicon dataset](https://huggingface.co/datasets/ailsntua/Chordonomicon). Chordonomicon is licensed CC BY-NC 4.0; see the dataset card for full terms.
|
| 42 |
|
| 43 |
+
Training data preparation: per-genre extraction by `ai/training/extract_genre_subsets.py` (`main_genre` match OR `genres` column substring match; first-match-only to avoid double-counting). 12-key augmentation × 80/10/10 song-level train/val/test split. Same pipeline + same val split as the F1 baseline so the LoRA-vs-base comparison is apples-to-apples.
|
| 44 |
+
|
| 45 |
## Genre character
|
| 46 |
|
| 47 |
12-bar and modified blues forms
|
| 48 |
|
| 49 |
+
## Rank sweep
|
| 50 |
+
|
| 51 |
+
The released adapter is the **best-rank** snapshot from training the same LoRA recipe at five different ranks. Every cell uses the same F1 base, same val split, same `evaluate()` call, and the same `[GENRE:none]`-initialized embedding extension — only `lora_r` (and `lora_alpha = 2 × lora_r`) changes. Numbers are validation-set token-level metrics (no key augmentation).
|
| 52 |
+
|
| 53 |
+
| Rank | val_loss | val_top1 (%) | val_top5 (%) | Δtop1 vs F1 |
|
| 54 |
+
|---|---:|---:|---:|---:|
|
| 55 |
+
| r=4 | 0.5647 | 84.16 | 96.78 | +2.46 |
|
| 56 |
+
| r=8 | 0.5655 | 84.13 | 96.77 | +2.43 |
|
| 57 |
+
| r=16 | 0.5640 | 84.16 | 96.76 | +2.46 |
|
| 58 |
+
| **r=32** | 0.5632 | 85.05 | 96.78 | +3.35 ← selected |
|
| 59 |
+
| r=64 | 0.5652 | 84.14 | 95.86 | +2.44 |
|
| 60 |
+
|
| 61 |
+
**Selection criterion**: minimum validation cross-entropy loss; `val_top1` as tiebreaker. `val_loss` is what the training loop optimizes and what selects each rank's `best.pt` epoch, so using it for cross-rank selection keeps consistency with how each individual checkpoint was chosen.
|
| 62 |
+
|
| 63 |
+
Full 11-genre × 5-rank sweep + full-FT anchor table: `ai/results/lora_rank_sweep.md` in the repo.
|
| 64 |
+
|
| 65 |
## Evaluation
|
| 66 |
|
| 67 |
+
Validation token-level metrics on the genre-specific val split (994 sequences, no key augmentation). The F1 base column uses the same val split, same dataloader, and the same `[GENRE:none]`-initialized embedding-extension setup as the LoRA run — only the LoRA parameters and the trained embedding rows differ.
|
| 68 |
|
| 69 |
| Metric | F1 base alone | F1 + this LoRA | Δ |
|
| 70 |
|---|---:|---:|---:|
|
| 71 |
+
| Top-1 accuracy (%) | 81.70 | **85.05** | **+3.35** |
|
| 72 |
+
| Top-5 accuracy (%) | 94.80 | 96.78 | +1.98 |
|
| 73 |
+
| Cross-entropy loss | 0.8137 | 0.5632 | -0.2505 |
|
| 74 |
+
|
| 75 |
+
Source: `ai/results/f1_per_genre_baseline.csv` + `ai/results/lora_rank_sweep.csv`. Higher top-1/top-5 and lower loss are better.
|
| 76 |
+
|
| 77 |
+
## Real-song eval
|
| 78 |
|
| 79 |
+
Mean validation top-1/top-5/cross-entropy on **10 held-out real blues songs** from `ai/data/eval_real_songs.jsonl` (held-out from `ai/data/splits/{val,test}.jsonl`, see [docs/EVAL.md](https://github.com/JinJuLee/PearlLeeStudio_TheArtist/blob/main/docs/EVAL.md) for dataset composition + methodology). Teacher-forced eval — same `evaluate()` call as the full-val rank-sweep eval above, just narrowed to a curated 10-song subset.
|
| 80 |
+
|
| 81 |
+
| Model | Top-1 (%) | Top-5 (%) | val_loss |
|
| 82 |
+
|---|---:|---:|---:|
|
| 83 |
+
| F1 base alone | 25.00 | 50.00 | 6.8125 |
|
| 84 |
+
| **F1 + this LoRA** | **75.00** | 100.00 | 3.0176 |
|
| 85 |
+
| Δ | +50.00 | +50.00 | -3.7949 |
|
| 86 |
|
| 87 |
## License and use
|
| 88 |
|
adapter_config.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
| 19 |
"layers_pattern": null,
|
| 20 |
"layers_to_transform": null,
|
| 21 |
"loftq_config": {},
|
| 22 |
-
"lora_alpha":
|
| 23 |
"lora_bias": false,
|
| 24 |
"lora_dropout": 0.05,
|
| 25 |
"lora_ga_config": null,
|
|
@@ -29,13 +29,13 @@
|
|
| 29 |
"peft_type": "LORA",
|
| 30 |
"peft_version": "0.19.1",
|
| 31 |
"qalora_group_size": 16,
|
| 32 |
-
"r":
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
|
|
|
| 36 |
"w_q",
|
| 37 |
-
"w_k"
|
| 38 |
-
"w_v"
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
| 41 |
"task_type": null,
|
|
|
|
| 19 |
"layers_pattern": null,
|
| 20 |
"layers_to_transform": null,
|
| 21 |
"loftq_config": {},
|
| 22 |
+
"lora_alpha": 64,
|
| 23 |
"lora_bias": false,
|
| 24 |
"lora_dropout": 0.05,
|
| 25 |
"lora_ga_config": null,
|
|
|
|
| 29 |
"peft_type": "LORA",
|
| 30 |
"peft_version": "0.19.1",
|
| 31 |
"qalora_group_size": 16,
|
| 32 |
+
"r": 32,
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
| 36 |
+
"w_v",
|
| 37 |
"w_q",
|
| 38 |
+
"w_k"
|
|
|
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
| 41 |
"task_type": null,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:638dc66cc20306d7e3800b35920da46843c93db778d5fc671baa77f202559a86
|
| 3 |
+
size 3151352
|
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"run_name": "
|
| 3 |
"base_checkpoint": "checkpoints/ft_jazz_pop80/best.pt",
|
| 4 |
"target_genre": "blues",
|
| 5 |
"sources": [
|
|
@@ -11,8 +11,8 @@
|
|
| 11 |
"n_layers": 8,
|
| 12 |
"max_seq_len": 256,
|
| 13 |
"dropout": 0.1,
|
| 14 |
-
"lora_r":
|
| 15 |
-
"lora_alpha":
|
| 16 |
"lora_dropout": 0.05,
|
| 17 |
"lora_target_modules": [
|
| 18 |
"w_q",
|
|
|
|
| 1 |
{
|
| 2 |
+
"run_name": "ft_f1_lora_blues_r32",
|
| 3 |
"base_checkpoint": "checkpoints/ft_jazz_pop80/best.pt",
|
| 4 |
"target_genre": "blues",
|
| 5 |
"sources": [
|
|
|
|
| 11 |
"n_layers": 8,
|
| 12 |
"max_seq_len": 256,
|
| 13 |
"dropout": 0.1,
|
| 14 |
+
"lora_r": 32,
|
| 15 |
+
"lora_alpha": 64,
|
| 16 |
"lora_dropout": 0.05,
|
| 17 |
"lora_target_modules": [
|
| 18 |
"w_q",
|
embedding_extension.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1472800
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f7b5f7fab33a785d45965a74e067a956749bc6be6ee554ef13f9a566f943a28
|
| 3 |
size 1472800
|