TheArtist Music Transformer — F2 (Pop 5K Mix)
F2, one of six checkpoints of the pop→jazz sweep in Empirical Study of Pop and Jazz Mix Ratios for Genre-Adaptive Chord Generation (Lee, 2026): the Phase-0 pop baseline fine-tuned on jazz with a 5,000-sequence pop rehearsal buffer. The choice among the rehearsal runs, all usable for pop and jazz, is stylistic: F1 commits more to pop, F4 to jazz, and F3 sits at an intermediate register.
Paper · Code · Web app · Demo · All models
Accepted at ISMIR 2026 as a Late-Breaking Demo: Where Does Genre Stop Following the Chords? A Fixed-Frame Listening Probe of Bounded Chord-Symbol Genre Identity (TheArtist)
Model details
| 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 |
| Fine-tune resumed from | Phase-0 pop baseline |
| Fine-tune mix | 1,513 jazz + 5,000 pop rehearsal (pop:jazz ≈ 3.3:1, seed 42) |
| Best epoch | 4 |
Usage
Requires torch, huggingface_hub. The repo bundles model.py and tokenizer.py, so nothing needs to be cloned from GitHub.
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-ft-pop67")
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 — they chain on top of the released ft-pop80 (F1) base, not this checkpoint.
Evaluation
Held-out pop and jazz test sets:
| Metric | Pop test | Jazz test |
|---|---|---|
| Top-1 accuracy | 84.06% | 79.91% |
| Top-5 accuracy | 96.17% | 91.46% |
| Perplexity | 1.75 | 2.34 |
| Δ vs. Phase-0 baseline | −0.15 | +7.05 |
| Δ vs. Phase-0, header targets excluded | −0.15 | +7.19 |
Top-1 counts every target, including the three header tokens that open each sequence (key, time signature, genre marker). The last row leaves them out (arXiv:2605.04998 v4, Table 6).
Per-genre real-song eval
Teacher-forced token-level metrics per genre; on this set F2 peaks on hip_hop (90.49%) and struggles most on classical (49.84%). The 11 per-genre LoRA adapters remain the recommended path beyond pop and jazz — for the eight genres without a [GENRE:X] token in the 351-token vocabulary (all but rock, blues, and bossa) the F-series numbers reflect decoding without genre conditioning.
| Genre | n_songs | Top-1 (%) | Top-5 (%) | val_loss |
|---|---|---|---|---|
| pop | 10 | 86.23 | 95.70 | 0.5810 |
| rock | 10 | 87.04 | 96.90 | 0.4660 |
| jazz | 10 | 69.43 | 85.73 | 1.3464 |
| blues | 10 | 83.11 | 93.35 | 0.7935 |
| bossa | 10 | 82.44 | 95.04 | 0.7304 |
| classical | 10 | 49.84 | 83.17 | 2.0839 |
| country | 10 | 85.80 | 97.25 | 0.5200 |
| electronic | 10 | 86.81 | 97.49 | 0.5097 |
| folk | 10 | 84.60 | 98.06 | 0.5295 |
| funk | 10 | 83.76 | 95.61 | 0.6983 |
| gospel | 10 | 80.47 | 95.83 | 0.7463 |
| hip_hop | 10 | 90.49 | 97.62 | 0.3990 |
| rnb_soul | 10 | 84.66 | 96.40 | 0.5954 |
130 songs (10 per genre × 13 genres, seed 42) drawn from held-out val/test partitions — pop from McGill Billboard (CC0), jazz from public standards corpora, classical from Bach chorales, the other ten genres from the matching Chordonomicon subsets (CC BY-NC 4.0; titles are Spotify track IDs by upstream policy).
Reharmonization selection versus Muse Spark
During the Meta Global AI Developer Hackathon (October 27 to November 4, 2026), F2 and Meta's Muse Spark (muse-spark-1.3) each picked three sparse alternatives from the same pool of 11 to 18 candidates for 40 jazz passages from 16 tunes (JAZZVAR, CC BY-NC-SA 2.0, evaluation only), and a blinded Muse Spark judge rated them from 0 to 4 over two shuffled presentations.
| Selection | Judge mean (0 to 4) | Seconds per passage | USD per passage |
|---|---|---|---|
| F2 alone (top three by likelihood) | 2.516 | 0.221 | 0.000 |
| Muse Spark alone | 2.589 | 7.007 | 0.010 |
| F2 scores the pool, Muse Spark chooses | 2.688 | 7.602 | 0.011 |
F2 alone and Muse Spark alone are within the judge's noise: F2 minus Muse Spark is −0.073 (95% tune bootstrap interval −0.209 to 0.060), and Muse Spark alone scored 2.565 to 2.671 across the F2, F3 and F4 batches. The judge belongs to the same model family as one selector. These figures were measured during the Meta hackathon (October 27 to November 4, 2026). The event repository that held the protocol and full results is no longer public.
Training data
Sources across pretraining and fine-tuning: Chordonomicon (CC BY-NC 4.0), McGill Billboard (CC0), Jazz Harmony Treebank (public), JazzStandards / iReal Pro (community redistribution), Weimar Jazz Database (ODbL), JAAH (research-use). It resumed with the Phase-0 optimizer state and ran the applied F-series schedule given on the F1 card.
Limitations
- Chord symbols, automatic scores. Chord symbols only (no melody, rhythm, or audio), and every score here is automatic, not a listening result.
- Header tokens. Small gaps between checkpoints can come from key and genre-marker predictions: on the logged metric F2 looks dominated because of them and its earlier tabulated epoch. Without the header targets the four rehearsal volumes from 1K to 10K lose pop within 0.11 points of each other at every epoch.
License
CC BY-NC 4.0 (weights; matching Chordonomicon, the dominant training corpus). Research, paper replication, portfolio, and demo use are permitted; commercial use is not.
Citation
@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},
eprint = {2606.07334},
archivePrefix = {arXiv}
}
@inproceedings{lee2026wheregenre,
title = {Where Does Genre Stop Following the Chords? A Fixed-Frame Listening Probe of Bounded Chord-Symbol Genre Identity (TheArtist)},
author = {Lee, Jinju},
booktitle = {Late-Breaking/Demo Session of the 27th International Society for Music Information Retrieval Conference (ISMIR)},
address = {Abu Dhabi, United Arab Emirates},
year = {2026},
url = {https://ismir2026program.ismir.net/lbd_571.html#details}
}