MAJEPPA
MAJEPPA generates and embeds solo-piano performance MIDI. It adapts the pre-trained MIDI model Aria-medium with LoRA. Training combines score-conditioned next-token prediction with contrastive losses between score and performance embeddings.
- Paper: MAJEPPA: Morphing and Assessing in a Unified Piano Performance Space (ISMIR 2026, arXiv 2608.11026)
- Demo and code: interactive generation Space
- Benchmark: EVPMR
- Data: MAJEPPA dataset
Model details
- Base model:
loubb/aria-medium, 660M parameters, frozen. The loader pins commit5a1ef36. - LoRA: rank 128, alpha 32, rank-stabilised scaling, on
mixed_qkvandatt_proj_linear. - New tokens with trained embeddings: 6 performer tags, 7 recording tags, 2 "unknown" tags and 1
[PRED]token. The LM head keeps the base vocabulary, so the model does not sample these tokens. - Projection head: linear, 1536 to 512. Only the contrastive losses use it.
- Losses: γ=1, λ=8, β=1, α=1, τ=0.07.
- Training data: 74,060 score-performance segment pairs from the MAJEPPA dataset, of which 1,486 form the validation set. Each view holds at most 1,200 tokens.
- Training: 120 epochs, 2× H100 80 GB, batch 16 per GPU, gradient accumulation 4. This file holds the weights after the last epoch.
majeppa.safetensors (79 MB) holds the LoRA weights, the 16 new token rows and the projection head. Its metadata holds the configuration. The loader adds the tensors to the base model, checks that every tensor matches a parameter, and merges the LoRA weights.
Use
The loading and generation code is in the demo Space.
git clone https://huggingface.co/spaces/anonymous-music/majeppa-jepa-demo majeppa-demo
cd majeppa-demo
pip install torch==2.8.0 transformers==4.49.0 peft==0.18.1 safetensors huggingface_hub "numpy<2" mido
Run Python from that folder. It holds a copy of the Aria tokenizer package (ariautils).
from huggingface_hub import hf_hub_download
from inference import MajeppaInference
engine = MajeppaInference(hf_hub_download("anusfoil/majeppa", "majeppa.safetensors"))
# Embedding: mean of the last-block states (before the final layer norm) over the tokens of the file.
emb = engine.model.embed_file("examples/05_burgmuller_consolation.mid", max_content_len=4096) # (1536,)
# Generation: score MIDI in, performance MIDI out.
path = engine.generate("examples/04_czerny_op740_no8.mid", "piano_teacher", "slow_demo", seed=0)
- The embedding leaves out Aria's
<D>token, which the tokenizer otherwise puts at a random place. So the embedding is deterministic.embed_filetruncates a file tomax_content_lentokens. - Performer types:
child_beginner,adult_beginner,adult_intermediate,child_professional,piano_teacher,virtuoso. - Recording types:
practice,sight_read,performance,demo_class,slow_demo,concert_performance. - Generation uses the training prompt
[score; EOS; COND_performer; COND_recording; PRED; prefix; <S>], temperature 0.8 and top-k 50. An end token is rejected until the output holds 80% of the score's notes.
Versions
- November 2026: current weights.
- August 2026: earlier weights, at tag
v1-2026-08.
Intended use
Non-commercial research on symbolic piano performance. See the paper for the evaluation protocol and limitations.
Citation
@inproceedings{zhou2026majeppa,
title = {MAJEPPA: Morphing and Assessing in a Unified Piano Performance Space},
author = {Zhou, Jinwen and Zhang, Huan and Zhai, Weixi and Liang, Jinhua and Hogg, Aidan O. T. and Dixon, Simon},
booktitle = {Proc. International Society for Music Information Retrieval Conference (ISMIR)},
year = {2026}
}
Model tree for anusfoil/majeppa
Base model
loubb/aria-medium-base