/ Модель

Характеристики

Параметры
403 млн
Лицензия
CC BY-NC 4.0
Архитектура
mert2 · dense
Библиотека
transformers
Опубликована
9 сен 2026

MERT-v2-30s

ЭмбеддингиТекст → embedding3 профессии

MERT-v2-30s извлекает представления из коротких музыкальных аудиофрагментов для анализа жанра, ритма, тональности и других музыкальных характеристик.

2 790скачиваний за 30 дней20лайковвеса обновлены29 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

MERT-v2-30s — двунаправленный музыкальный аудиоэнкодер проекта YuE2, предварительно обученный на 30-секундных музыкальных фрагментах. Он извлекает универсальные представления музыки на уровне отдельных кадров или всей записи; модель можно загружать через библиотеку Hugging Face Transformers по привычному для MERT сценарию.

Модель принимает монофонический звук с частотой дискретизации 24 кГц и формирует последовательность признаков с размерностью 1 024 и частотой 25 кадров в секунду. В README указаны 632 млн параметров и 24 слоя, тогда как метаданные Hugging Face указывают 402,7 млн параметров. В оценках на MARBLE энкодер показал сильные результаты на задачах музыкального понимания, включая жанровую классификацию, определение ритма, тональности и тегирование; также приведена оценка распознавания аккордов.

Модель предназначена для извлечения признаков, которые можно использовать в последующих задачах анализа музыки. Для обработки полных песен авторы рекомендуют MERT-v2-FullSong. Лицензия CC BY-NC 4.0 разрешает использование с указанием авторства, но ограничивает коммерческое применение.

Сценарии применения

  • извлечение признаков из музыкальных фрагментов
  • классификация музыкального жанра
  • определение ритмических долей
  • оценка тональности музыкальной записи
  • тегирование музыки по инструментам и настроению
  • анализ эмоциональной окраски музыки

Ограничения

Модель обучена на 30-секундных фрагментах; для полных песен авторы рекомендуют MERT-v2-FullSong. Лицензия CC BY-NC 4.0 не разрешает коммерческое использование.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

MERT-v2-30s is a bidirectional music encoder pretrained on 30-second excerpts. Extract general-purpose music representations at the frame or recording level. Load with standard Hugging Face Transformers, using the familiar MERT workflow.

For complete recordings, use MERT-v2-FullSong, which continues pretraining on full songs.

MERT2 architecture and training

MERT-v2-30s uses the bidirectional backbone in (B); MERT-v2-FullSong continues through the full-song branch in (C). The causal branch is used for YuE2 tokenization.

🚀 Quick start

Install the matching PyTorch packages:

python -m pip install torch==2.6.0 torchaudio==2.6.0 transformers==4.53.2 huggingface-hub safetensors soundfile
import soundfile as sf
import torch
import torchaudio.functional as AF
from transformers import AutoFeatureExtractor, AutoModel

repo = "m-a-p/MERT-v2-30s"
device = "cuda" if torch.cuda.is_available() else "cpu"
processor = AutoFeatureExtractor.from_pretrained(repo, trust_remote_code=True)
model = AutoModel.from_pretrained(repo, trust_remote_code=True).eval().to(device)

audio, sr = sf.read("music.wav", dtype="float32", always_2d=True)
audio = audio[:30 * sr].mean(axis=1)  # First 30 seconds, mixed to mono.
waveform = AF.resample(torch.from_numpy(audio), sr, processor.sampling_rate)
inputs = processor(
    waveform.numpy(), sampling_rate=processor.sampling_rate, return_tensors="pt",
).to(device)

with torch.inference_mode():
    output = model(**inputs, output_hidden_states=True)

frames = output.last_hidden_state         # [batch, frames, 1024], 25 Hz
layers = output.hidden_states             # 24 tensors, one per block
mask = output.feature_attention_mask[..., None]
embedding = (frames * mask).sum(1) / mask.sum(1).clamp_min(1)  # [batch, 1024]

hidden_states[0] is block 1; hidden_states[23] is block 24. For full songs, switch to MERT-v2-FullSong and remove the audio slice.

📊 MARBLE

Reported frozen-encoder results on MARBLE. All scores are multiplied by 100; higher is better. Bold marks the best displayed value in each column, including ties.

MERT2-30s leads on 14 of 15 metrics; MERT2-FS (full-song) leads on 13 of 15. Each count compares one encoder against the strongest external baseline on each metric; the two MERT2 encoders are not counted as baselines for each other. The model IDs below are MERT-v2-30s and MERT-v2-FullSong, respectively.

Reported values are the best observed results across representations and probe settings. Each ROC-AUC / AP pair uses the same representation.

Baseline scores and parameter counts are reproduced from Tables III and V of PupuJEPA; the baselines were not rerun for this release. Evaluation protocols may differ across sources.

Naming note: the authors renamed PupuJEPA to PupuM2D after the paper’s initial release. We retain PupuJEPA in this comparison.

General music understanding. MTT = MagnaTagATune; key = GiantSteps refined key accuracy; genre and beat = GTZAN; valence and arousal = EmoMusic. ROC = ROC-AUC; AP = average precision.

ModelParamsMTT ROCMTT APKey acc.Genre acc.Beat F1Valence R²Arousal R²
MERT-Large330M90.637.964.177.686.856.776.1
Dasheng-1.2B1.2B91.540.458.081.487.757.475.0
MuQ310M90.538.563.283.890.158.376.4
MusicFM330M90.938.363.084.190.257.274.4
AudioMAE++307M91.239.561.780.390.059.075.7
MATPAC++307M90.638.263.781.490.157.874.7
A-JEPA307M91.039.265.083.890.057.474.8
PupuJEPA-Large307M91.740.866.186.991.062.576.8
PupuJEPA-Huge632M91.339.764.885.990.562.078.5
MERT-v2-30s632M91.9141.2966.9791.7290.5963.2380.01
MERT-v2-FullSong632M91.7441.2067.0590.6990.5763.5278.14

MTG-Jamendo tagging. Mood denotes mood/theme tags.

ModelParamsInstrument ROCInstrument APMood ROCMood APGenre ROCGenre APTop-50 ROCTop-50 AP
MERT-Large330M75.518.875.313.586.118.082.629.1
Dasheng-1.2B1.2B75.019.076.115.585.518.882.429.6
MuQ310M74.819.173.713.285.419.183.030.2
MusicFM330M74.618.574.914.185.319.481.929.7
AudioMAE++307M77.119.975.614.086.318.983.131.1
MATPAC++307M77.219.775.114.185.719.682.530.2
A-JEPA307M76.619.374.614.385.519.282.529.6
PupuJEPA-Large307M78.421.276.215.386.120.182.830.5
PupuJEPA-Huge632M77.620.575.914.785.920.183.130.7
MERT-v2-30s632M80.2722.8979.4416.6888.0121.2284.1832.17
MERT-v2-FullSong632M80.2723.5178.7415.7487.9820.6684.1331.62

Supplemental: Chords1217 frame accuracy is 78.48 for MERT-v2-30s and 77.79 for MERT-v2-FullSong.

HF reproduction verified: Both models reproduce all ten MARBLE tasks with the fixed evaluation settings. Scores and best settings.

🎛️ Layer guide

Recommended probe settings with the encoder frozen. L1 = hidden_states[0]; All-layer MLP uses all 24 layers.

Task / datasetMERT-v2-30s layerProbe LRMERT-v2-FullSong layerProbe LR
Genre · GTZANL235e-3L245e-4
Beat · GTZANL211e-3L231e-3
Key · GiantStepsL41e-3L231e-3
Emotion · EmoMusicAll-layer MLP5e-5L245e-4
Chords · Chords1217All-layer MLP1e-4All-layer MLP5e-4
Tagging · MagnaTagATuneL221e-3L231e-3
Instrument · MTG-JamendoL141e-3L121e-3
Mood/theme · MTG-JamendoL161e-3L131e-3
Genre · MTG-JamendoL191e-3L161e-3
Top-50 · MTG-JamendoL131e-3L221e-3

📚 Citation

Please cite the YuE2 paper when using MERT-v2-30s in your research:

@article{yuan2026yue2,
  title = {{YuE2}: Unifying Symbolic and Audio Music Generation at Frontier Quality},
  author = {Yuan, Ruibin and Pan, Jiahao and Jiang, Junyan and Wu, Zhiyue and Zhou, Ziya and Sun, Jiankai and Li, Yizhi and Zhang, Ge and Gu, Yicheng and Tian, Zeyue and Dai, Junyu and Lin, Hanfeng and Li, Kai and Wu, Shangda and Liu, Xuanjie and Wang, Jiaming and Liu, Zihan and Wang, Yue and Ma, Yinghao and Yin, Hanzhi and Chen, Kangrui and Zhang, Xinyue and Ma, Ziyang and Liao, Mengqi and Zhao, Hejia and Huang, Guowei and Yan, Chao and Ke, Lei and Yu, Jianwei and Liu, Bei and Guo, Joe and Xue, Liumeng and Xia, Gus and Xue, Wei and Guo, Yike},
  journal = {arXiv preprint arXiv:2609.33757},
  year = {2026},
  eprint = {2609.33757},
  archivePrefix = {arXiv},
  primaryClass = {eess.AS},
  url = {https://arxiv.org/abs/2609.33757}
}

For the original MERT model and the MARBLE benchmark, please also cite the relevant work:

@inproceedings{li2024mert,
  title = {MERT: Acoustic Music Understanding Model with Large-Scale Self-supervised Training},
  author = {Li, Yizhi and Yuan, Ruibin and Zhang, Ge and Ma, Yinghao and Chen, Xingran and Yin, Hanzhi and Xiao, Chenghao and Lin, Chenghua and Ragni, Anton and Benetos, Emmanouil and Gyenge, Norbert and Dannenberg, Roger and Liu, Ruibo and Chen, Wenhu and Xia, Gus and Shi, Yemin and Huang, Wenhao and Wang, Zili and Guo, Yike and Fu, Jie},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://proceedings.iclr.cc/paper_files/paper/2024/hash/33dffa2e3d2ab74a783d1a8c292f66d9-Abstract-Conference.html}
}

@inproceedings{yuan2023marble,
  title = {MARBLE: Music Audio Representation Benchmark for Universal Evaluation},
  author = {Yuan, Ruibin and Ma, Yinghao and Li, Yizhi and Zhang, Ge and Chen, Xingran and Yin, Hanzhi and Zhuo, Le and Liu, Yiqi and Huang, Jiawen and Tian, Zeyue and Deng, Binyue and Wang, Ningzhi and Lin, Chenghua and Benetos, Emmanouil and Ragni, Anton and Gyenge, Norbert and Dannenberg, Roger and Chen, Wenhu and Xia, Gus and Xue, Wei and Liu, Si and Wang, Shi and Liu, Ruibo and Guo, Yike and Fu, Jie},
  booktitle = {Advances in Neural Information Processing Systems},
  volume = {36},
  pages = {39626--39647},
  year = {2023},
  doi = {10.52202/075280-1722},
  url = {https://proceedings.neurips.cc/paper_files/paper/2023/hash/7cbeec46f979618beafb4f46d8f39f36-Abstract-Datasets_and_Benchmarks.html}
}

Weights: CC BY-NC 4.0. Dependency notices.

YuE2 family: Song generation · Audio decoder · Benchmark decoder.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
MERT2Model
Ревизия весов
0c0c8c6

0 моделей