Add README
Browse files
README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- music
|
| 7 |
+
- MIDI
|
| 8 |
+
- piano
|
| 9 |
+
- representation-learning
|
| 10 |
+
- jepa
|
| 11 |
+
base_model: loubb/aria-medium
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# MAJEPPA
|
| 15 |
+
|
| 16 |
+
`MAJEPPA` is a self-supervised model for piano performance representation learning. It adapts a pre-trained MIDI autoregressive backbone with a Joint-Embedding Predictive Architecture (JEPA) objective, learning to predict abstract performance representations from score representations in a shared latent space.
|
| 17 |
+
|
| 18 |
+
The model is designed for downstream tasks such as performance quality assessment, competition ranking, technique classification, mistake detection, and expressive-style analysis of solo piano MIDI.
|
| 19 |
+
|
| 20 |
+
📖 Paper: *MAJEPPA: Morphing and Assessing in a Unified Piano Performance Space* (ISMIR 2026)
|
| 21 |
+
💻 Code, evaluation, and loading utilities: [github.com/anusfoil/majeppa](https://github.com/anusfoil/majeppa)
|
| 22 |
+
📊 Benchmark: [github.com/anusfoil/evpmr](https://github.com/anusfoil/evpmr)
|
| 23 |
+
|
| 24 |
+
## Model Details
|
| 25 |
+
|
| 26 |
+
- **Base model**: [`loubb/aria-medium`](https://huggingface.co/loubb/aria-medium) (660M-parameter LLaMA-style autoregressive transformer pre-trained on symbolic MIDI)
|
| 27 |
+
- **Adaptation**: Low-Rank Adaptation (LoRA, rank 512) applied to attention projections; a linear projection head 1536 → 512; and additional learned tokens for conditioning and prediction (`[COND_perf]`, `[COND_rec]`, `[PRED]`).
|
| 28 |
+
- **Context length**: 4096 tokens (via linear RoPE scaling).
|
| 29 |
+
|
| 30 |
+
The published `model.safetensors` contains the full set of weights (base model, LoRA adapters, projection head, and added token embeddings) ready to be loaded together.
|
| 31 |
+
|
| 32 |
+
## Quickstart
|
| 33 |
+
|
| 34 |
+
Install dependencies:
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
pip install torch safetensors
|
| 38 |
+
pip install git+https://github.com/EleutherAI/aria-utils.git
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
Load the model via the loader script in the [MAJEPPA repository](https://github.com/anusfoil/majeppa):
|
| 42 |
+
|
| 43 |
+
```python
|
| 44 |
+
from majeppa import load_model, load_tokenizer
|
| 45 |
+
|
| 46 |
+
model = load_model("anusfoil/majeppa-embedding", device="cuda")
|
| 47 |
+
tokenizer = load_tokenizer()
|
| 48 |
+
|
| 49 |
+
# Encode a piano MIDI file to a global embedding
|
| 50 |
+
tokens = tokenizer.encode_from_file("path/to/performance.mid", return_tensors="pt")
|
| 51 |
+
embedding = model.encode(tokens.to("cuda"))
|
| 52 |
+
print(embedding.shape) # (1, 1536)
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Token-level embeddings for finer-grained analysis:
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
token_emb, timestamps = model.encode_tokens(tokens.to("cuda"))
|
| 59 |
+
# token_emb: (T, 1536); timestamps: (T,) in seconds
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
## Intended Use
|
| 63 |
+
|
| 64 |
+
This model is released for non-commercial research purposes. It is designed for MIDI-based downstream analysis and is not intended as a general-purpose generative model. Please refer to the paper for benchmark protocols and evaluation guidelines.
|
| 65 |
+
|
| 66 |
+
## Citation
|
| 67 |
+
|
| 68 |
+
```bibtex
|
| 69 |
+
@inproceedings{zhou2026majeppa,
|
| 70 |
+
title = {MAJEPPA: Morphing and Assessing in a Unified Piano Performance Space},
|
| 71 |
+
author = {Zhou, Jinwen and Zhang, Huan and Zhai, Weixi and Liang, Jinhua and Hogg, Aidan O. T. and Dixon, Simon},
|
| 72 |
+
booktitle = {Proc. International Society for Music Information Retrieval Conference (ISMIR)},
|
| 73 |
+
year = {2026}
|
| 74 |
+
}
|
| 75 |
+
```
|