alt.freeweights.speech / clap2-medium-audioxl-s1B
From: laion <huggingface.co/laion>Newsgroups: alt.freeweights.speechSubject:

clap2-medium-audioxl-s1B

Date: 2026-11-14Commit: 8e299e8Signed: 2DC28CC7B26A283B ✓

Feature extraction model with 153M parameters. Safetensors weights, 1.23 GB in all. Published by laion under Apache-2.0.

153M params1.23GBclap2-medium-audioxl-s1Bsafetensorspermissive
FactsParams153MSize1.23 GBFormatssafetensorsTaskfeature extractionLicenseApache-2.0From sourcepermissive
$ fw get laion/clap2-medium-audioxl-s1B
# manifest sha256 5693331498ef… · 1.23 GB · 11 files
$ fw verify ./clap2-medium-audioxl-s1B laion/clap2-medium-audioxl-s1B
From sourceHosted (signed)laion/clap2-medium-audioxl-s1BLast check: 2026-11-14 21:33 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Evaluate with

Overview

Size
1.23 GB
Weights
1.22 GB (safetensors)
Parameters
153M
Formats
safetensors
Task
feature extraction
License
Apache-2.0 (permissive)
Files
11, each with a sha256
Publisher
laion
Added
2026-11-14
Section
alt.freeweights.speech
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:33 UTCpassed

Model card

From the publisher at commit 8e299e8. Shown as plain text with links; images open at the publisher.

CLAP2-M: contrastive language-audio model#

CLAP2-M 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

Models#

All models were trained for 1,024M samples seen (WSD learning-rate schedule, last checkpoint). Parameter counts are for both towers.

ModelRepositoryParamsMAEB-30HEAR-17MSEB
Llaion/clap2-large-audioxl-s1B340.1M53.681.930.3
M (this model)laion/clap2-medium-audioxl-s1B152.8M52.381.429.4
Slaion/clap2-small-audioxl-s1B103.9M51.881.829.8
XSlaion/clap2-xs-audioxl-s1B48.3M49.180.627.6
XXSlaion/clap2-xxs-audioxl-s1B27.3M46.279.128.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.

Quick start#

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-medium-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).

Several clips at once#

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)

Writing text prompts#

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.

Input notes#

  • The input audio can have any sample rate and any number of channels. 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.
  • The models were trained on clips of at most 30 s (length buckets of 6.9, 9.0, 13.0, 22.6 and 30.1 s). The benchmark scores above use only the first 30 s of each clip. The model accepts longer clips, but this is not evaluated. Split long recordings into segments of up to 30 s and average or compare the segment embeddings. Cost grows quadratically with length (full attention).
  • The text tower takes English text. The tokenizer is case-sensitive (GPT-2 style BPE, 256-token context) and the training captions use normal sentence case. Text written entirely in capitals (for example some speech transcripts) tokenizes into rare pieces and scores worse. The paper's evaluation lowercases a text if it is all capitals and has at least three words. Do the same for such inputs, or write captions in normal case.
  • Both towers are used in float32 here. Training used bf16 autocast.

Intended use and limitations#

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:

  • Text is English only. The corpus contains speech in many languages, but captions are English. Multilingual text queries are not supported.
  • The training data is about 45% speech and 22% music by predicted label, so speech and music are better covered than rare sound events. Sound-event scores saturated earlier in the scaling study than speech and music scores.
  • Most captions were generated by the audio-language models Qwen3-Omni and MOSS-Audio (471.2M of the 500M-sample pool before the 30 s cut, 94%), so the model inherits their wording and errors.
  • Not evaluated for audio longer than 30 s, for noisy-text or non-English queries, or for safety-critical use.

Training data#

LAION-Audio-XL contains 366,006,046 audio-text pairs with audio of at most 30 s. They were selected from 1.48B collected audio samples (316 academic datasets, internet datasets, Common Crawl, and Creative Commons YouTube videos, which make up most of the raw pool). Unreadable and silent audio, exact and near duplicates, and audio overlapping with the MAEB, HEAR and MSEB evaluation sets are removed. A taxonomy-based, coverage-aware procedure then selects the samples. The mixture is 44.8% speech, 22.4% music, 16.6% designed sound effects and 16.2% other. Samples without a source description get a short (about 12 words) and a long (about 29 words) caption from Qwen3-Omni-30B-A3B-Instruct and MOSS-Audio-8B-Thinking. Training picks one at random.

About 94% of the samples carry a Creative Commons licence. Audio from sources whose licence allows redistribution is released in laion/laion-audio-xl. The other clips are released as links with captions and metadata.

Training#

The models were trained from scratch with a standard CLIP (InfoNCE) loss, AdamW (betas 0.9/0.98, weight decay 0.2), a warmup-stable-decay learning-rate schedule, gradient clipping 1.0, bf16 autocast and a learnable logit scale (initial 1/0.07, capped at 300). Audio is batched by length bucket with a budget of 49,152 audio tokens per GPU batch. The audio tower is a NaFlex ViT with axial RoPE, RMSNorm, SwiGLU, LayerScale, one register token and attention pooling. The text tower is a bidirectional transformer with RoPE, RMSNorm, SwiGLU and QK-norm (50,260-token vocabulary).

ModelAudio tower (width x depth)Text tower (width x depth)Embedding dim
XXS224 x 12224 x 12224
XS320 x 12320 x 12320
S512 x 12512 x 11512
M640 x 12640 x 11640
L1024 x 12960 x 11960

Evaluation code#

The benchmarks (MAEB, MSEB, HEAR) are run with the audio extension of CLIP_benchmark, which loads these models with the same OpenCLIP calls as above.

License#

Apache 2.0.

Citation#

@misc{wijngaard2026laionaudioxlwebscalecorpusscaling,
      title={LAION-Audio-XL: A Web-Scale Corpus and Scaling Studies for Contrastive Language-Audio Pretraining},
      author={Gijs Wijngaard and Felix Förster and Ross Wightman and Marianna Nezhurina and Christoph Schuhmann and Jenia Jitsev and A. Sophia Koepke},
      year={2026},
      eprint={2611.11592},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2611.11592},
}

Files

11 files · 1.23 GBWeights 1.22 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 11 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md9.26 KBe5062a364f05fea999cb4516aa6687da11fd601770b97fcc3c32e3831ab5cee2
config.json1.52 KB43a2db71ea15bae21f806cc2fe1c12ee5886bee6c5253644ed6fafb30e679cc5
model.safetensors611 MB3968ca9375b87cda68845fce51fe973e99be495e18b5d931fc1eb48b84a09144
open_clip_config.json1.46 KBd0a4c65a0a9875c4eeabef2034264211958048a90aba4d8de936a08a7e6698fc
open_clip_model.safetensors611 MB126db589ed577759336e83de7517d369102da85a4d15a74d1040989a46f52225
open_clip_tiktoken/r50k_base.json213 B0172ba9f641bb36aa5741bc3263a03f157e8d4bf84daf216b7491074edf5026f
open_clip_tiktoken/r50k_base.tiktoken836 KB306cd27f03c1a714eca7108e03d66b7dc042abe8c258b44c199a7ed9838dd930
processor_config.json403 Bcd4aa7741206e2dcf95073a70168a53b3478917d3f7de855ffe4e9a6a806296d
tokenizer.json3.56 MBea41bbe8b758ffe23143019ea39cfa21b3c92223fa28b04055932f60266ff5f8
tokenizer_config.json399 B10aa2b147ea5d1129b6aa8a726f985abb94880233b93bfe82787050aab6be1b1
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
8e299e83c0 pinned now manifest updated, same commit2026-11-14 21:33 UTC11 files · 1.23 GB
8e299e83c02026-11-14 21:33 UTC11 files · 1.23 GB

Use it

$ fw get laion/clap2-medium-audioxl-s1B
# manifest sha256 5693331498ef… · 1.23 GB · 11 files
$ fw verify ./clap2-medium-audioxl-s1B laion/clap2-medium-audioxl-s1B
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/laion/clap2-medium-audioxl-s1B.json --dir ./clap2-medium-audioxl-s1B $ python3 fw.py verify ./clap2-medium-audioxl-s1B ./laion__clap2-medium-audioxl-s1B.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download laion/clap2-medium-audioxl-s1B --revision 8e299e83c08a291711490105e82a345abadb5cdb --local-dir ./clap2-medium-audioxl-s1B
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("laion/clap2-medium-audioxl-s1B", revision="8e299e83c08a291711490105e82a345abadb5cdb") model = AutoModel.from_pretrained("laion/clap2-medium-audioxl-s1B", revision="8e299e83c08a291711490105e82a345abadb5cdb", device_map="auto")

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
e5062a364f05fea999cb4516aa6687da11fd601770b97fcc3c32e3831ab5cee2
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: laion <huggingface.co/laion>Newsgroups: alt.freeweights.speechSubject: clap2-medium-audioxl-s1BDate: 2026-11-14Commit: 8e299e8Signed: 2DC28CC7B26A283B ✓
Upstream
laion/clap2-medium-audioxl-s1B
Pinned commit
8e299e83c08a291711490105e82a345abadb5cdb
Manifest
clap2-medium-audioxl-s1B.json · .minisig
Manifest sha256
5693331498ef9f15759bfebf309c374424dad3a2e9254590723b21535692866c
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:33 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/laion/clap2-medium-audioxl-s1B.json $ curl -O https://freeweights.allternit.com/manifests/laion/clap2-medium-audioxl-s1B.json.minisig $ minisign -Vm clap2-medium-audioxl-s1B.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download laion/clap2-medium-audioxl-s1B
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. clap2-medium-audioxl-s1B.json. Provenance. Takedown history: none.
From: MIT <huggingface.co/MIT>Subject: ast-finetuned-audioset-10-10-0.4593
From: onnx-community <huggingface.co/onnx-community>Subject: ast-finetuned-audioset-10-10-0.4593-ONNX
From: Edge0 <huggingface.co/Edge0>Subject: Audio8-TTS-Preview-0.6b
From: Edge0 <huggingface.co/Edge0>Subject: Audio8-TTS-Realistic-Air
From: facebook <huggingface.co/facebook>Subject: audiobox-aesthetics
From: mlx-community <huggingface.co/mlx-community>Subject: chatterbox-4bit