Model reference · open weights
clap2-small-audioxl-s1B is an open-weight embedding model from laion. clap2-small-audioxl-s1B (FP32) weighs 416 MB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the laion/clap2-small-audioxl-s1B model card, 2026-11-18
What it is
| Released by | laion |
|---|---|
| Released | 2026-10-26 |
| Parameters | 104M |
| VRAM | 416 MB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
From the model card
CLAP2-S is one of the five CLAP2 contrastive audio-text models (27M to 340M parameters), in OpenCLIP and Transformers format. An audio tower and a text tower map audio clips and English text into a shared embedding space, so the models can be used for zero-shot audio classification, audio-text retrieval, and as general audio embeddings. All models were trained from scratch on LAION-Audio-XL, a corpus of 366M audio-text pairs.
The audio tower is a NaFlex vision transformer over log-mel patches. It takes audio of any length (no fixed-size crop or padding to a fixed length) and produces one embedding per clip.
Each model size is a separate repository (see the table below).
Paper: arXiv:2611.11592 · Code: LAION-AI/clap2 · Project page: projects.laion.ai/clap2
All models were trained for 1,024M samples seen (WSD learning-rate schedule, last checkpoint). Parameter counts are for both towers.
| Model | Repository | Params | MAEB-30 | HEAR-17 | MSEB |
|---|---|---|---|---|---|
| L | laion/clap2-large-audioxl-s1B | 340.1M | 53.6 | 81.9 | 30.3 |
| M | laion/clap2-medium-audioxl-s1B | 152.8M | 52.3 | 81.4 | 29.4 |
| S (this model) | laion/clap2-small-audioxl-s1B | 103.9M | 51.8 | 81.8 | 29.8 |
| XS | laion/clap2-xs-audioxl-s1B | 48.3M | 49.1 | 80.6 | 27.6 |
| XXS | laion/clap2-xxs-audioxl-s1B | 27.3M | 46.2 | 79.1 | 28.0 |
Scores are in %, higher is better. MAEB-30 is the mean over the 30 tasks of the Massive Audio Embedding Benchmark. The tasks cover speech, music and sound, and the task types classification, zero-shot classification, pair classification, clustering and retrieval. HEAR-17 is the mean over 17 HEAR tasks (all except Beehive and Maestro 5h). MSEB is the mean over 62 English MSEB scores. For the exact protocol, per-domain and per-task-type scores, and comparisons with other audio-text models, see the paper.
pip install "open_clip_torch>=4.2.1" soundfile
import torch, open_clip
from open_clip.audio.io import load_audio
hub = "hf-hub:laion/clap2-small-audioxl-s1B"
model, preprocess = open_clip.create_model_from_pretrained(hub)
tokenizer = open_clip.get_tokenizer(hub)
audio = preprocess()(load_audio("dog.wav")) # any sample rate and channel count
texts = ["A dog barks.", "A door slams shut.", "People are applauding."]
with torch.no_grad():
logits, _ = model.get_logits({k: v[None] for k, v in audio.items()}, tokenizer(texts))
print({t: round(p, 3) for t, p in zip(texts, logits.softmax(-1)[0].tolist())})
Output for an FSD50K clip of a dog barking: {'A dog barks.': 1.0, 'A door slams shut.': 0.0, 'People are applauding.': 0.0}. For embeddings, use model.encode_audio({k: v[None] for k, v in audio.items()}, normalize=True) and model.encode_text(tokenizer(texts), normalize=True).
Pad the patch dictionaries to the longest clip. patch_valid masks the padding, so the embeddings are the same as when each clip is encoded alone:
from torch.nn.utils.rnn import pad_sequence
items = [preprocess()(load_audio(f)) for f in ["dog.wav", "rain.wav"]]
batch = {k: pad_sequence([x[k] for x in items], batch_first=True) for k in items[0]}
with torch.no_grad():
audio_embeds = model.encode_audio(batch, normalize=True)
For zero-shot classification, describe each class with several short captions in full sentences, in the style of the training captions. For example, "A cello plays a slow melody." or "A man gives a lecture." Cover the different kinds of sound in the class. Avoid bare labels ("speech", "dog") and negations ("no background music"). Average the prompt embeddings of each class. Before taking the top class, subtract each class's mean score over the clips.
preprocess averages multi-channel audio to mono and resamples it to 32 kHz. The front end is a 128-bin log-mel spectrogram (50 Hz to 16 kHz, 320-sample hop), cut into non-overlapping 16x16 patches. This gives 50 tokens per second of audio.Intended use: zero-shot audio tagging and classification, audio-text retrieval, audio embeddings for downstream classifiers, and data curation (for example filtering or ranking audio by text queries). The small models are meant to be cheap to run.
Limitations:
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.