File size: 3,522 Bytes
09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 59f641e 09a40a2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | ---
license: apache-2.0
language:
- en
tags:
- music
- MIDI
- piano
- representation-learning
- jepa
base_model: loubb/aria-medium
---
# MAJEPPA
`MAJEPPA` is a unified self-supervised model for piano performance that both **generates** and **understands** solo-piano MIDI in a single framework. Built on a pre-trained MIDI autoregressive backbone, it combines score-conditioned next-token prediction with a Joint-Embedding Predictive Architecture (JEPA) objective β learning to produce expressive continuations while also yielding transferable embeddings for downstream analysis.
Applications include score-conditioned generation across expertise levels, performance quality assessment, competition ranking, technique classification, mistake detection, and expressive-style analysis.
π Paper: *MAJEPPA: Morphing and Assessing in a Unified Piano Performance Space* (ISMIR 2026)
π» Code (loading, inference, generation): [github.com/anusfoil/majeppa](https://github.com/anusfoil/majeppa)
π Benchmark: [github.com/anusfoil/evpmr](https://github.com/anusfoil/evpmr)
## Model Details
- **Base model**: [`loubb/aria-medium`](https://huggingface.co/loubb/aria-medium) β 660M-parameter LLaMA-style autoregressive MIDI transformer.
- **Adaptation**: Low-Rank Adaptation (LoRA, rank 512) on attention projections; a linear projection head 1536 β 512 for global embedding output; and additional learned tokens for conditioning (`[COND_perf]`, `[COND_rec]`) and prediction (`[PRED]`).
- **Context length**: 4096 tokens (linear RoPE scaling).
`model.safetensors` contains the full set of weights (base model, LoRA adapters, projection head, and added token embeddings), ready to be loaded together.
## Quickstart
```bash
pip install torch safetensors transformers
pip install git+https://github.com/EleutherAI/aria-utils.git
```
Load via the reference implementation in the [MAJEPPA repository](https://github.com/anusfoil/majeppa):
### Understanding β global embedding
```python
from majeppa import load_model, load_tokenizer
model = load_model("anusfoil/majeppa", device="cuda")
tokenizer = load_tokenizer()
tokens = tokenizer.encode_from_file("performance.mid", return_tensors="pt")
embedding = model.encode(tokens.to("cuda")) # (1, 1536)
token_emb, ts = model.encode_tokens(tokens.to("cuda")) # (T, 1536), (T,)
```
### Generation β score-conditioned performance
```python
score_tokens = tokenizer.encode_from_file("score.mid", return_tensors="pt")
# Condition on performer type and recording context
performance = model.generate(
score_tokens.to("cuda"),
cond_performer="virtuoso", # or "child_beginner", "adult_intermediate", ...
cond_recording="concert", # or "practice", "sight_reading", "demo", ...
max_new_tokens=2048,
temperature=0.8,
top_k=50,
)
tokenizer.decode_to_file(performance, "generated.mid")
```
See the [repository](https://github.com/anusfoil/majeppa) for the full list of condition tags and advanced usage.
## Intended Use
For non-commercial research on symbolic piano performance modelling. Refer to the paper for evaluation protocols and limitations.
## Citation
```bibtex
@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}
}
```
|