TheArtist Music Transformer β Phase 0 (Pop Baseline)
Pop-pretrained chord generation model. The starting point that all five jazz fine-tunes resume from. Released as the no-jazz reference for measuring catastrophic forgetting in the companion paper.
This checkpoint is one of six released alongside the paper Empirical Study of Pop and Jazz Mix Ratios for Genre-Adaptive Chord Generation (Lee, 2026). The collection landing page is at PearlLeeStudio/TheArtist-MusicTransformer-pop-baseline (this repo) and at the per-checkpoint repositories listed in the paper. See the paper for the experimental design that motivates this set of checkpoints.
Demo
Watch TheArtist in action on YouTube β interactive staff editor, MIDI input, AI generation with live progress, and per-genre LoRA playback across the 13-genre vocabulary.
Model summary
| Field | Value |
|---|---|
| Architecture | Music Transformer with relative positional attention |
| Parameters | 25,661,440 |
| Vocabulary size | 351 tokens |
| Max sequence length | 256 |
| d_model / heads / FFN / layers | 512 / 8 / 2048 / 8 |
| Training framework | PyTorch 2.5+ (CUDA 12.1) |
Training data
Trained from scratch on the pop training split: Chordonomicon (679K songs) and McGill Billboard (890 songs), deduplicated and twelve-key-augmented. Three epochs at peak learning rate 3 Γ 10β»β΄ with one-epoch warmup and cosine decay. Wall-clock time β27 hours on a single NVIDIA GeForce RTX 4070 Laptop GPU.
Evaluation (held-out per-genre test sets)
| Metric | Pop test | Jazz test |
|---|---|---|
| Top-1 accuracy | 84.24% | 72.86% |
| Top-5 accuracy | 97.10% | 86.51% |
| Perplexity | 1.73 | 4.01 |
The 72.86% jazz top-1 from a pop-only model reflects the substantial token overlap between the two genres. Pop and jazz share most of their chord tokens; jazz-specific gains in our fine-tuned checkpoints come from learning the transition statistics over those tokens, not from learning new tokens.
Intended use and limitations
This checkpoint is the unmodified pop baseline. It is the most pop-fluent model in the collection and the most jazz-naive. Use it when pop output is the only target. For balanced pop and jazz output, use F3 (ft-pop50). For pop-leaning output that still includes occasional jazz coloration, use F1 (ft-pop80). For jazz-leaning output, use F4 (ft-pop29).
Out of scope: melody or audio generation (symbolic chord-only model); genres outside pop, rock, and jazz (out-of-distribution behavior not characterized); real-time low-latency settings (use batched inference).
Usage
The repo bundles the project's model.py and tokenizer.py at the repo
root, so external users can load the checkpoint end-to-end without
cloning anything from GitHub. snapshot_download materializes the full
repo on disk; sys.path makes the bundled model.py / tokenizer.py
importable.
Required dependencies: torch, huggingface_hub.
import sys
import torch
from huggingface_hub import snapshot_download
# Download the full repo (model.py, tokenizer.py, best.pt, config.json).
ckpt_dir = snapshot_download(repo_id="PearlLeeStudio/TheArtist-MusicTransformer-pop-baseline")
sys.path.insert(0, ckpt_dir) # so the next two imports resolve
from model import MusicTransformer
from tokenizer import ChordTokenizer
tokenizer = ChordTokenizer()
ckpt = torch.load(f"{ckpt_dir}/best.pt", map_location="cpu", weights_only=False)
model = MusicTransformer(
vocab_size=tokenizer.vocab_size,
d_model=512, n_heads=8, d_ff=2048, n_layers=8,
max_seq_len=256, dropout=0.0, pad_id=tokenizer.pad_id,
)
model.load_state_dict(ckpt["model_state_dict"])
model.eval()
# Prompt = ii-V-I in C major; ask for a pop-flavoured continuation.
song = {
"key": "Cmaj", "time_signature": "4/4", "genre": "pop",
"bars": [["Dm7", "G7"], ["Cmaj7"]],
}
prompt_ids = tokenizer.encode_sequence(song)[:-1]
ids = torch.tensor([prompt_ids])
with torch.no_grad():
for _ in range(32):
logits = model(ids)
next_id = torch.multinomial(
torch.softmax(logits[:, -1, :] / 0.8, dim=-1), 1,
)
ids = torch.cat([ids, next_id], dim=-1)
if next_id.item() == tokenizer.eos_id:
break
print(tokenizer.decode(ids[0].tolist()))
For per-genre adaptation beyond pop and jazz, see the 11 LoRA adapter repos at PearlLeeStudio β they chain on top of this base.
Per-genre real-song eval (held-out 130-song set, 2026-05)
First per-genre evaluation of pop-baseline beyond the pop/jazz split that the original paper reports.
Eval results
| Genre | n_songs | Top-1 (%) | Top-5 (%) | val_loss |
|---|---|---|---|---|
| pop | 10 | 86.68 | 96.01 | 0.5734 |
| rock | 10 | 86.69 | 97.48 | 0.4578 |
| jazz | 10 | 64.96 | 81.16 | 1.8958 |
| blues | 10 | 81.52 | 93.91 | 0.8410 |
| bossa | 10 | 81.43 | 95.47 | 0.7825 |
| classical | 10 | 49.55 | 81.17 | 2.2389 |
| country | 10 | 85.89 | 98.44 | 0.5152 |
| electronic | 10 | 87.39 | 98.45 | 0.5072 |
| folk | 10 | 85.04 | 98.92 | 0.5244 |
| funk | 10 | 83.85 | 96.03 | 0.6811 |
| gospel | 10 | 79.79 | 96.85 | 0.7367 |
| hip_hop | 10 | 90.66 | 98.59 | 0.3957 |
| rnb_soul | 10 | 85.11 | 97.07 | 0.5877 |
On this eval set Phase0 peaks on hip_hop (90.66%) and struggles most on classical (49.55%).
This is auxiliary signal β the 11 per-genre LoRAs (sister lora-* repos) are the recommended path for production use on the 9 non-pop, non-jazz genres. F-series cells on those genres show what the base model produces under [GENRE:none] conditioning (the model's [GENRE:X] token does not exist for the 9 new genres in the F-series vocab=351).
Eval dataset composition
130 songs total, 10 per genre Γ 13 genres. Drawn from the same splits/val.jsonl + splits/test.jsonl partitions every F-series model was held out from during training β no train-set leakage. Built by ai/training/build_eval_real_songs.py --seed 42 --per-genre 10 (deterministic).
| Genre | n | Source(s) | Bar range | Avg duration Β· named |
|---|---|---|---|---|
| pop | 10 | billboard | 58β116 | 189s Β· 10/10 named |
| rock | 10 | chordonomicon_rock | 52β87 | 127s Β· 0/10 named |
| jazz | 10 | choco:jazz-corpus, choco:real-book, jazzstandards, jht | 16β89 | 72s Β· 10/10 named |
| blues | 10 | chordonomicon_blues | 24β46 | 93s Β· 0/10 named |
| bossa | 10 | chordonomicon_bossa | 24β78 | 88s Β· 0/10 named |
| classical | 10 | chordonomicon_classical | 11β40 | 60s Β· 10/10 named |
| country | 10 | chordonomicon_country | 30β81 | 110s Β· 0/10 named |
| electronic | 10 | chordonomicon_electronic | 25β84 | 89s Β· 0/10 named |
| folk | 10 | chordonomicon_folk | 33β82 | 114s Β· 0/10 named |
| funk | 10 | chordonomicon_funk | 30β60 | 92s Β· 0/10 named |
| gospel | 10 | chordonomicon_gospel | 24β85 | 98s Β· 0/10 named |
| hip_hop | 10 | chordonomicon_hip_hop | 24β81 | 136s Β· 0/10 named |
| rnb_soul | 10 | chordonomicon_rnb_soul | 34β82 | 128s Β· 0/10 named |
Source license summary: McGill Billboard (CC0, named pop songs), Jazz Harmony Treebank / JazzStandards / WJazzD (Public / community-redistributed, named jazz standards), Bach chorales via music21 (public domain, named pieces), Chordonomicon per-genre subsets (CC BY-NC 4.0; titles are Spotify track IDs by upstream dataset policy β progressions are real songs). See docs/EVAL.md for full breakdown.
Methodology
Teacher-forced next-token cross-entropy / top-1 / top-5 over each song's token sequence (BOS + key + time_sig + genre + bars + EOS, truncated to max_seq_len=256). Same evaluate() call as ai/results/f1_per_genre_baseline.csv, just narrowed to the curated 130-song subset. Token-level metrics; not a generation-quality eval (free-generation comparison with R1 Sethares + R2 theory RAG rerank is documented separately in ai/results/eval_report.md).
Caveats:
classicalval partition is intrinsically small (37 sequences in full eval); the 10-song subset here has even narrower confidence bands. Directional finding (LoRA helps a lot on Bach harmony) is robust, exact pp deltas are noisy.- F-series numbers on the 9 LoRA-only genres are conditioned without genre tag (vocab=351 has no
[GENRE:country]token etc.). This is the realistic "F-series alone" condition, not a controlled ablation.
Source CSV: ai/results/real_song_eval.csv (17 models Γ 130 songs, long format).
Training-data licenses
| Dataset | License |
|---|---|
| Chordonomicon | Public (user-generated) |
| McGill Billboard | CC0 |
Citation
Cite the original mix-ratio paper. The companion per-genre LoRA paper (chord-symbol time-series adaptation) is in preparation; its arXiv ID will be added here once posted.
@misc{lee2026chordmix,
title = {Empirical Study of Pop and Jazz Mix Ratios for Genre-Adaptive Chord Generation},
author = {Lee, Jinju},
year = {2026},
eprint = {2605.04998},
archivePrefix = {arXiv}
}
@misc{lee2026chordtimeseries,
title = {How Far Can Chord-Symbol Time-Series Adaptation Carry Genre Identity?},
author = {Lee, Jinju},
year = {2026},
note = {arXiv preprint, ID TBD},
}
- Downloads last month
- 277