Mindket

MERT-v2-FullSong

Newversion 1 · updated

Overview

A music encoder that turns whole songs of 30 to 360 seconds into numeric features at frame or recording level. It suits music AI researchers and developers working with frozen embeddings.

MERT-v2-FullSong is a kit in the Research category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • Python with pip
  • The pinned torch, torchaudio and transformers packages
  • The soundfile package to read an audio file
  • An audio file such as music.wav
Runs in
  • Python with transformers, torch and torchaudio
  • A GPU if you have one, otherwise the CPU
  • Windows, macOS or Linux with Python
Start with
python -m pip install torch==2.6.0 torchaudio==2.6.0 transformers==4.53.2 huggingface-hub safetensors soundfile

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

About

What it is

MERT-v2-FullSong is a two-way music encoder from m-a-p that handles entire songs, from 30 up to 360 seconds. It turns audio into general-purpose music representations, either per frame or for the whole recording. It continues pretraining from MERT-v2-30s and keeps the same feature interface. It has 632 million parameters, 24 layers and 1,024 dimensions, and it reads 24 kHz mono audio at 25 Hz.

Who it suits

It suits music AI researchers and developers who want ready-made song features instead of training an audio model from scratch. The card reports results with a frozen encoder, so it fits work that trains small models on top.

Who might use it
IndustryWho uses itHow they use itExample
Music researchMusic information retrieval researchersExtract features and train small models on topBuild a classifier on frozen song embeddings
Audio softwareDevelopersTurn a track into one embedding vectorCompare songs by their recording-level embeddings
AcademiaStudents of audio machine learningStudy layer by layer what the encoder learnsRead the hidden state of each of the 24 blocks

If you need a commercial license, you can skip it. The license on the record is non-commercial.

Where to use it

It loads through the standard Hugging Face transformers library in Python, with the same workflow as the earlier MERT models.

  • Python with transformers, torch and torchaudio
  • A GPU if you have one, otherwise the CPU
  • Windows, macOS or Linux with Python
Jobs it does
Use caseWhoWhat they get back
Frame-level featuresResearchersA 1,024-number vector for each 25 Hz frame
Recording-level embeddingDevelopersOne 1,024-number vector for a clip or song
Layer inspectionStudentsA separate hidden state from each of the 24 blocks

How to set it up

You need Python with pip. The card pins versions of torch, torchaudio and transformers, so install the matching set.

  • Python with pip
  • The pinned torch, torchaudio and transformers packages
  • The soundfile package to read an audio file
  • An audio file such as music.wav
  1. Install the matching PyTorch packages with the card's command.
  2. Optionally fetch the model files with the Hugging Face tools.
  3. Put a music file named music.wav next to your script.
python -m pip install torch==2.6.0 torchaudio==2.6.0 transformers==4.53.2 huggingface-hub safetensors soundfile
pip install -U huggingface_hub
hf download m-a-p/MERT-v2-FullSong

How to use it

Run the script below. It reads the first 30 seconds of your file, mixes it to mono, resamples it, and runs the model with hidden states switched on. Delete the slicing step if you want the whole song processed.

import soundfile as sf
import torch
import torchaudio.functional as AF
from transformers import AutoFeatureExtractor, AutoModel
repo = "m-a-p/MERT-v2-FullSong"
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]
What the script returns
ToolWhat it does
last_hidden_stateFrame features at 25 Hz with 1,024 dimensions
hidden_states24 tensors, one for each block
embeddingOne averaged vector per recording
AutoFeatureExtractorPrepares audio at the sampling rate the model expects

Example

You point the script at a song file named music.wav. The model returns a stack of frame features for the first 30 seconds, one hidden state per block, and a single 1,024-number embedding you can save or feed to a classifier.

For newcomers and experts

If you are new, an encoder turns sound into lists of numbers that describe it. The first small thing to try is the script above on a short music file. Then print the shape of the embedding.

If you know the field, this is a bidirectional encoder that continues pretraining from the 30-second version, so full-song context comes with the same feature interface. Block 1 is the first hidden state and block 24 is the last. The card's MARBLE comparison uses a frozen encoder.

  1. A music file is read and made mono
  2. It is resampled to the model's rate
  3. The encoder produces frame features
  4. Frames are averaged into one embedding

Good to know

The card counts the metrics where each MERT2 encoder beats the strongest outside baseline on MARBLE. All scores there are multiplied by 100, and higher is better.

MARBLE metrics led, out of 15
MERT2-30s14 metrics
MERT2-FS full-song13 metrics
  • License: CC BY-NC 4.0, which is non-commercial
  • Cost to run: none named
  • Data it reaches: your audio files and the model files from Hugging Face
  • Not for: commercial use under this license

README and files

README

MERT-v2-FullSong

A music encoder that turns whole songs of 30 to 360 seconds into numeric features at frame or recording level. It suits music AI researchers and developers working with frozen embeddings.

Made by m-a-p on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

About

What it is: MERT-v2-FullSong is a two-way music encoder from m-a-p that handles entire songs, from 30 up to 360 seconds. It turns audio into general-purpose music representations, either per frame or for the whole recording. It continues pretraining from MERT-v2-30s and keeps the same feature interface. It has 632 million parameters, 24 layers and 1,024 dimensions, and it reads 24 kHz mono audio at 25 Hz.

Who it suits: It suits music AI researchers and developers who want ready-made song features instead of training an audio model from scratch. The card reports results with a frozen encoder, so it fits work that trains small models on top.

Title: Who might use it
Industry | Who uses it | How they use it | Example
Music research | Music information retrieval researchers | Extract features and train small models on top | Build a classifier on frozen song embeddings
Audio software | Developers | Turn a track into one embedding vector | Compare songs by their recording-level embeddings
Academia | Students of audio machine learning | Study layer by layer what the encoder learns | Read the hidden state of each of the 24 blocks

If you need a commercial license, you can skip it. The license on the record is non-commercial.

Where to use it: It loads through the standard Hugging Face transformers library in Python, with the same workflow as the earlier MERT models.

  • Python with transformers, torch and torchaudio
  • A GPU if you have one, otherwise the CPU
  • Windows, macOS or Linux with Python
Title: Jobs it does
Use case | Who | What they get back
Frame-level features | Researchers | A 1,024-number vector for each 25 Hz frame
Recording-level embedding | Developers | One 1,024-number vector for a clip or song
Layer inspection | Students | A separate hidden state from each of the 24 blocks

How to set it up: You need Python with pip. The card pins versions of torch, torchaudio and transformers, so install the matching set.

  • Python with pip
  • The pinned torch, torchaudio and transformers packages
  • The soundfile package to read an audio file
  • An audio file such as music.wav
  1. Install the matching PyTorch packages with the card's command.
  2. Optionally fetch the model files with the Hugging Face tools.
  3. Put a music file named music.wav next to your script.
python -m pip install torch==2.6.0 torchaudio==2.6.0 transformers==4.53.2 huggingface-hub safetensors soundfile
pip install -U huggingface_hub
hf download m-a-p/MERT-v2-FullSong

How to use it: Run the script below. It reads the first 30 seconds of your file, mixes it to mono, resamples it, and runs the model with hidden states switched on. Delete the slicing step if you want the whole song processed.

import soundfile as sf
import torch
import torchaudio.functional as AF
from transformers import AutoFeatureExtractor, AutoModel
repo = "m-a-p/MERT-v2-FullSong"
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]
Title: What the script returns
Tool | What it does
last_hidden_state | Frame features at 25 Hz with 1,024 dimensions
hidden_states | 24 tensors, one for each block
embedding | One averaged vector per recording
AutoFeatureExtractor | Prepares audio at the sampling rate the model expects

Example: You point the script at a song file named music.wav. The model returns a stack of frame features for the first 30 seconds, one hidden state per block, and a single 1,024-number embedding you can save or feed to a classifier.

For newcomers and experts: If you are new, an encoder turns sound into lists of numbers that describe it. The first small thing to try is the script above on a short music file. Then print the shape of the embedding.

If you know the field, this is a bidirectional encoder that continues pretraining from the 30-second version, so full-song context comes with the same feature interface. Block 1 is the first hidden state and block 24 is the last. The card's MARBLE comparison uses a frozen encoder.

A music file is read and made mono
It is resampled to the model's rate
The encoder produces frame features
Frames are averaged into one embedding

Good to know: The card counts the metrics where each MERT2 encoder beats the strongest outside baseline on MARBLE. All scores there are multiplied by 100, and higher is better.

Title: MARBLE metrics led, out of 15
MERT2-30s: 14 metrics
MERT2-FS full-song: 13 metrics
  • License: CC BY-NC 4.0, which is non-commercial
  • Cost to run: none named
  • Data it reaches: your audio files and the model files from Hugging Face
  • Not for: commercial use under this license

On Hugging Face, 13 November 2026

  • Task: feature extraction
  • Library: transformers
  • Parameters: 632M
  • Weights: about 2.5 GB in F32; about 316 MB at 4-bit (estimate)
  • Formats: Safetensors
  • Downloads in the last 30 days: 13,790
  • Likes: 57
  • License: cc-by-nc-4.0
  • Quantized versions: 2
  • Fine-tunes: 3
  • Tags: transformers, safetensors, mert2, feature-extraction, audio, music, music-understanding, representation-learning

Links

Get the model

Download its files with Hugging Face's command line:

pip install -U huggingface_hub
hf download m-a-p/MERT-v2-FullSong

Then follow the usage in its model card. Nothing in this kit runs by itself.

Files
README.md  7 KB

1 file, 7 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-13

Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

ProductDownloads, last 30 daysLikesParametersLicenseLast change
MERT-v2-FullSong This page13,79057632Mcc-by-nc-4.0
caramel-1 by naklechaShares audio · safetensors8914413Mapache-2.0
VideoJev-4BShares feature-extraction · transformers · safetensors8,518314.5Bapache-2.0
MOSS-VL-RealtimeShares feature-extraction · transformers · safetensors1,93411711.3Bapache-2.0
LeVJEPA 1.5 LargeShares feature-extraction · transformers · safetensors26918303Mcc-by-nc-4.0
MANTA-27BShares feature-extraction · transformers · safetensors46427.5Bapache-2.0
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Nanosaur2-670M

well9472 · Kit

Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…

New

Reads handwritten Arabic text from images and returns it as text. A fine-tuned PaddleOCR-VL model for people digitizing Arabic handwriting.

New

Makes video clips from a text prompt or an image plus text, at up to 720P and 24 frames per second, in the Diffusers format for a single consumer GPU.

New

Similar in Research

See all in Research

REMEND

udiboy1209 · Kit

Recovers math equations from compiled binary code with a small neural decompiler, and ships the datasets and trained models from its paper. For reverse enginee…

New

Drishya Tiny

udgamlabs · Kit

Turns a text prompt, or a prompt plus a first frame, into a 2-second 256×256 video clip with a 212M-parameter generator. A small research release that does bes…

New

monoyield-predictor

Tsuboyama-Lab · Kit

Predicts how much of a protein sequence E. coli will make as a single-unit monomer, in log10 mg/L. Trained LoRA adapters and regression heads for ESMC-6B and S…

New