alt.freeweights.embed / MOSS-Audio-Tokenizer-v2
From: OpenMOSS-Team <huggingface.co/OpenMOSS-Team>Newsgroups: alt.freeweights.embedSubject:

MOSS-Audio-Tokenizer-v2

Date: 2026-11-15Commit: f6e20e5Signed: 2DC28CC7B26A283B ✓

Feature extraction model with 2.1B parameters. Safetensors weights, 8.50 GB in all. Published by OpenMOSS-Team under Apache-2.0.

2.1B params8.50GBMOSS-Audio-Tokenizer-v2safetensorspermissive
FactsParams2.1BSize8.50 GBFormatssafetensorsTaskfeature extractionLicenseApache-2.0From sourcepermissive
$ fw get OpenMOSS-Team/MOSS-Audio-Tokenizer-v2
# manifest sha256 cd5dc4058ddb… · 8.50 GB · 15 files
$ fw verify ./MOSS-Audio-Tokenizer-v2 OpenMOSS-Team/MOSS-Audio-Tokenizer-v2
From sourceHosted (signed)OpenMOSS-Team/MOSS-Audio-Tokenizer-v2Last check: 2026-11-15 02:36 UTC

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

Works with

Evaluate with

Overview

Size
8.50 GB
Weights
8.50 GB (safetensors)
Parameters
2.1B
Formats
safetensors
Task
feature extraction
License
Apache-2.0 (permissive)
Files
15, each with a sha256
Publisher
OpenMOSS-Team
Added
2026-11-15
Section
alt.freeweights.embed
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-15 02:36 UTCpassed

Model card

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

MOSS-Audio-Tokenizer-v2#

This is the code for the 48khz stereo version of MOSS-Audio-Tokenizer presented in MOSS-Audio-Tokenizer: Scaling Audio Tokenizers for Future Audio Foundation Models.

MOSS-Audio-Tokenizer-v2 is a unified discrete audio tokenizer based on the Cat (Causal Audio Tokenizer with Transformer) architecture. Scaling to 2 billion parameters, it functions as a unified discrete interface, delivering both lossless-quality reconstruction and high-level semantic alignment.

Key Features:

  • Extreme Compression & Variable Bitrate: It compresses 48kHz stereo audio into a remarkably low frame rate of 12.5Hz. Utilizing a 32-layer Residual Vector Quantization stack, it supports high-fidelity reconstruction across a wide range of bitrates.
  • Pure Transformer Architecture: The model features a "CNN-free" homogeneous architecture built entirely from Causal Transformer blocks. With 2B combined parameters (Encoder + Decoder), it ensures exceptional scalability and supports low-latency streaming inference.
  • Large-Scale General Audio Training: Trained on 3 million hours of diverse audio data, the model excels at encoding and reconstructing all audio domains, including speech, sound effects, and music.
  • Unified Semantic-Acoustic Representation: While achieving state-of-the-art reconstruction quality, Cat produces discrete tokens that are "semantic-rich," making them ideal for downstream tasks like speech understanding (ASR) and generation (TTS).
  • Fully Trained From Scratch: Cat does not rely on any pretrained encoders (such as HuBERT or Whisper) or distillation from teacher models. All representations are learned autonomously from raw data.
  • End-to-End Joint Optimization: All components—including the encoder, quantizer, decoder, discriminator, and a decoder-only LLM for semantic alignment—are optimized jointly in a single unified training pipeline.

Summary: By combining a simple, scalable architecture with massive-scale data, the Cat architecture overcomes the bottlenecks of traditional audio tokenizers. It provides a robust, high-fidelity, and semantically grounded interface for the next generation of native audio foundation models.

This repository contains a lightweight remote-code implementation that mirrors the current 🤗 Transformers transformers.models.moss_audio_tokenizer module. It is hosted as a Hugging Face Hub model repository and should be loaded with trust_remote_code=True.

Image: image

Architecture of MossAudioTokenizer

Usage#

Quickstart#
import torch
from transformers import AutoModel
import torchaudio

repo_id = "OpenMOSS-Team/MOSS-Audio-Tokenizer-v2"
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).eval().to(device)

audio_path = "demo/demo_gt.wav"  # replace with your own 48 kHz stereo audio path if needed
wav, sr = torchaudio.load(audio_path)
if sr != model.sampling_rate:
    wav = torchaudio.functional.resample(wav, sr, model.sampling_rate)
if wav.shape[0] == 1:
    wav = wav.repeat(model.config.number_channels, 1)
else:
    wav = wav[: model.config.number_channels]
wav = wav.unsqueeze(0).to(device)
enc = model.encode(wav, return_dict=True)
print(f"enc.audio_codes.shape: {enc.audio_codes.shape}")
dec = model.decode(enc.audio_codes, return_dict=True)
print(f"dec.audio.shape: {dec.audio.shape}")
wav = dec.audio.squeeze(0)
torchaudio.save("demo/demo_rec.wav", wav.cpu(), sample_rate=model.sampling_rate)

# Decode using only the first 8 layers of the RVQ
dec_rvq8 = model.decode(enc.audio_codes[:8], return_dict=True)
wav_rvq8 = dec_rvq8.audio.squeeze(0)
torchaudio.save("demo/demo_rec_rvq8.wav", wav_rvq8.cpu(), sample_rate=model.sampling_rate)

For production use with trust_remote_code=True, pin revision to a reviewed commit hash.

Attention Backend And Compute Dtype#

config.attention_implementation controls whether transformer layers prefer sdpa or flash_attention_2. config.compute_dtype controls the non-quantizer autocast dtype and supports fp32, bf16. config.codec_weight_dtype controls encoder/decoder parameter dtype and defaults to fp32. The quantizer is always kept in fp32.

GPU bf16 loading:

import torch
from transformers import AutoModel

repo_id = "OpenMOSS-Team/MOSS-Audio-Tokenizer-v2"
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True, low_cpu_mem_usage=True, codec_weight_dtype="bf16").eval().to(device)

Passing codec_weight_dtype="bf16" at load time avoids first materializing encoder/decoder weights as fp32 on GPU and then converting them to bf16, which would increase peak GPU memory.

You can also switch an already loaded model:

model.set_attention_implementation("flash_attention_2")
model.set_compute_dtype("bf16")
model.set_codec_weight_dtype("bf16")  # encoder/decoder bf16, quantizer fp32

Avoid calling plain model.to(torch.bfloat16) on the whole codec; that also casts quantizer weights and can cause dtype mismatches or serious precision loss.

Streaming#

MossAudioTokenizerModel.encode, decode, batch_encode, and batch_decode all support streaming through a chunk_duration argument.

  • chunk_duration is expressed in seconds.
  • chunk_duration * MossAudioTokenizerConfig.sampling_rate must be divisible by MossAudioTokenizerConfig.downsample_rate.
  • Streaming batch inference is supported.
  • The public waveform interface expects stereo inputs shaped (2, T) or batched stereo inputs shaped (B, 2, T).
import torch
from transformers import AutoModel

repo_id = "OpenMOSS-Team/MOSS-Audio-Tokenizer-v2"
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).eval().to(device)
audio = torch.randn(2, 48000 * 6).to(device)  # dummy stereo waveform

# 6.0s @ 48kHz = 288000 samples, divisible by downsample_rate=3840
enc = model.encode(audio.unsqueeze(0), return_dict=True, chunk_duration=0.08)
dec = model.decode(enc.audio_codes, return_dict=True, chunk_duration=0.08)

batch_enc = model.batch_encode([audio, audio[:, : 48000 * 3]], chunk_duration=0.08)
codes_list = [
    batch_enc.audio_codes[:, i, : batch_enc.audio_codes_lengths[i]]
    for i in range(batch_enc.audio_codes.shape[1])
]
batch_dec = model.batch_decode(codes_list, chunk_duration=0.08)

Repository layout#

  • configuration_moss_audio_tokenizer.py
  • modeling_moss_audio_tokenizer.py
  • __init__.py
  • config.json
  • model.safetensors.index.json
  • sharded model weights: model-00001-of-00003.safetensors, model-00002-of-00003.safetensors, model-00003-of-00003.safetensors
  • demo/demo_gt.wav

Evaluation Metrics#

The table below compares the reconstruction quality of open-source audio tokenizers with MOSS-Audio-Tokenizer-v2 on speech and audio/music data.

  • Speech metrics are evaluated on LibriSpeech test-clean (English) and AISHELL-2 (Chinese), reported as EN/ZH.
  • Audio metrics are evaluated on the AudioSet evaluation subset, while music metrics are evaluated on MUSDB, reported as audio/music.
  • STFT-Dist. denotes the STFT distance.
  • Higher is better for speech metrics, while lower is better for audio/music metrics (Mel-Loss, STFT-Dist.).
  • Nq denotes the number of quantizers.
ModelbpsFrame rateNqSpeech: SIM ↑ (EN/ZH)Speech: STOI ↑ (EN/ZH)Speech: PESQ-NB ↑ (EN/ZH)Speech: PESQ-WB ↑ (EN/ZH)Audio/Music: Mel-Loss ↓Audio/Music: STFT-Dist. ↓
XCodec2.08005010.82 / 0.740.92 / 0.863.04 / 2.462.43 / 1.96-- / ---- / --
MiMo Audio Tokenizer8502540.80 / 0.740.91 / 0.872.94 / 2.622.39 / 2.140.82 / 0.812.33 / 2.23
Higgs Audio Tokenizer10002540.77 / 0.680.83 / 0.823.03 / 2.612.48 / 2.140.83 / 0.802.20 / 2.05
SpeechTokenizer10005020.36 / 0.250.77 / 0.681.59 / 1.381.25 / 1.17-- / ---- / --
XY-Tokenizer100012.580.85 / 0.790.92 / 0.873.10 / 2.632.50 / 2.12-- / ---- / --
BigCodec10408010.84 / 0.690.93 / 0.883.27 / 2.552.68 / 2.06-- / ---- / --
Mimi110012.580.74 / 0.590.91 / 0.852.80 / 2.242.25 / 1.781.24 / 1.192.62 / 2.49
MOSS-Audio-Tokenizer-v2 (Ours)75012.560.82 / 0.750.92 / 0.883.14 / 2.682.59 / 2.190.93 / 0.912.28 / 2.14
MOSS-Audio-Tokenizer-v2 (Ours)100012.580.88 / 0.800.94 / 0.903.39 / 2.932.88 / 2.430.88 / 0.862.22 / 2.07
——————————
DAC15007520.48 / 0.410.83 / 0.791.87 / 1.671.48 / 1.37-- / ---- / --
Encodec15007520.60 / 0.450.85 / 0.811.94 / 1.801.56 / 1.481.12 / 1.042.60 / 2.42
Higgs Audio Tokenizer20002580.90 / 0.830.85 / 0.853.59 / 3.223.11 / 2.730.74 / 0.702.07 / 1.92
SpeechTokenizer20005040.66 / 0.500.88 / 0.802.38 / 1.791.92 / 1.49-- / ---- / --
Qwen3 TTS Tokenizer220012.5160.95 / 0.880.96 / 0.933.66 / 3.103.19 / 2.62-- / ---- / --
MiMo Audio Tokenizer225025120.89 / 0.830.95 / 0.923.57 / 3.253.05 / 2.710.70 / 0.682.21 / 2.10
Mimi247512.5180.89 / 0.760.94 / 0.913.49 / 2.902.97 / 2.351.10 / 1.062.45 / 2.32
MOSS-Audio-Tokenizer-v2 (Ours)150012.5120.93 / 0.860.95 / 0.923.66 / 3.243.23 / 2.770.83 / 0.792.15 / 1.98
MOSS-Audio-Tokenizer-v2 (Ours)200012.5160.95 / 0.890.96 / 0.943.80 / 3.443.45 / 3.010.79 / 0.752.10 / 1.93
——————————
DAC30007540.74 / 0.670.90 / 0.882.76 / 2.472.31 / 2.070.86 / 0.832.23 / 2.10
MiMo Audio Tokenizer365025200.91 / 0.850.95 / 0.933.73 / 3.443.25 / 2.890.66 / 0.652.17 / 2.06
SpeechTokenizer40005080.85 / 0.690.92 / 0.853.05 / 2.202.60 / 1.87-- / ---- / --
Mimi440012.5320.94 / 0.830.96 / 0.943.80 / 3.313.43 / 2.781.02 / 0.982.34 / 2.21
Encodec45007560.86 / 0.750.92 / 0.912.91 / 2.632.46 / 2.150.91 / 0.842.33 / 2.17
DAC60007580.89 / 0.840.95 / 0.943.75 / 3.573.41 / 3.200.65 / 0.631.97 / 1.87
MOSS-Audio-Tokenizer-v2 (Ours)300012.5240.96 / 0.920.97 / 0.953.94 / 3.643.66 / 3.280.75 / 0.712.04 / 1.87
MOSS-Audio-Tokenizer-v2 (Ours)400012.5320.97 / 0.930.97 / 0.963.98 / 3.723.75 / 3.390.73 / 0.692.02 / 1.84
LibriSpeech Speech Metrics (MOSS-Audio-Tokenizer-v2 vs. Open-source Tokenizers)#

The plots below compare our MOSS-Audio-Tokenizer-v2 model with other open-source speech tokenizers on the LibriSpeech dataset, evaluated with SIM, STOI, PESQ-NB, and PESQ-WB (higher is better). We control the bps of the same model by adjusting the number of RVQ codebooks used during inference.

| Image: image

Citation#

If you use this code or result in your paper, please cite our work as:

@misc{gong2026mossaudiotokenizerscaling,
  title={MOSS-Audio-Tokenizer: Scaling Audio Tokenizers for Future Audio Foundation Models},
  author={Yitian Gong and Kuangwei Chen and Zhaoye Fei and Xiaogui Yang and Ke Chen and Yang Wang and Kexin Huang and Mingshu Chen and Ruixiao Li and Qingyuan Cheng and Shimin Li and Xipeng Qiu},
  year={2026},
  eprint={2602.10934},
  archivePrefix={arXiv},
  primaryClass={cs.SD},
  url={https://arxiv.org/abs/2602.10934}
}

License#

MOSS-Audio-Tokenizer-v2 is released under the Apache 2.0 license. See LICENSE for the full license text.

Files

15 files · 8.50 GBWeights 8.50 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 15 files with their sha256
FileSizesha256
.gitattributes2.16 KBfcb6f23f2902ca00ae60e75c53b9cb718bfea427e44ed9311ac0415cec3d99ae
.gitignore36 B88b07aa0fbec7301d5483828a396bfbaaefa627c9a2d0f3a25b1389bb92c58e6
LICENSE11.3 KB50e6751797c50dedd75ef1b8a0d9e42f5f8472e9fbce91f34718e9f97b0c780a
README.md13.0 KBf491cd9d124156d854d6a3401dc1f227d5d70373b6584b1a5f8adb908a5f7a70
__init__.py52 Bed0b4910a5e53b1dfc3234cfcf96e2c6890d339f9134a3dfed8481d01b3768fd
config.json10.2 KBaeb9a0e9d88c74bf9fbaa81ee54443d463e09b5f335b3306bb798e282a10e564
configuration_moss_audio_tokenizer.py19.8 KBf87a7a975868ce3f0077f374f46ebd2aab610fd7a26cd7569d16827a14e29529
demo/demo_gt.wav243 KB631608f5c8b931ece1d45adc7f40a3b3b0ae2ec056a8a08a3565b04cc5750a4b
images/arch.png215 KB6a7108429fc230ead608a22837a27615aae3458f86e5e47d12fd3bd5d95c7058
images/metric.png2.35 MB8908818d76057ed665f2e2406c6fc2e8e62eb75e8f63e2d189847a608396ca91
model-00001-of-00003.safetensors3.98 GB2d9f9182f17b143a23937feb87c63c08221bd28e685e4bc2fa55dcdce17fcde7
model-00002-of-00003.safetensors3.99 GBd4e48106d0254fe3b00ea0707e88fc6aee076993825e108dd9cef847f9db236e
model-00003-of-00003.safetensors524 MBd0449fe1b0ef1f6045946867148d8166b9a91a58d0feca4a18b641494d0b22da
model.safetensors.index.json192 KB912f52f053e04ff7e9abc8f05aa75dfbb40b31c86a0f4ad5c5a36e4aa28a624f
modeling_moss_audio_tokenizer.py106 KB7f807e6ee77a60d512e5aa4a8f58a1d5af4e3722f4ab350d70dd538429391cb9
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
f6e20e543b pinned now2026-11-15 02:36 UTC15 files · 8.50 GB

Use it

$ fw get OpenMOSS-Team/MOSS-Audio-Tokenizer-v2
# manifest sha256 cd5dc4058ddb… · 8.50 GB · 15 files
$ fw verify ./MOSS-Audio-Tokenizer-v2 OpenMOSS-Team/MOSS-Audio-Tokenizer-v2
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/OpenMOSS-Team/MOSS-Audio-Tokenizer-v2.json --dir ./MOSS-Audio-Tokenizer-v2 $ python3 fw.py verify ./MOSS-Audio-Tokenizer-v2 ./OpenMOSS-Team__MOSS-Audio-Tokenizer-v2.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download OpenMOSS-Team/MOSS-Audio-Tokenizer-v2 --revision f6e20e543b33d2c252a7ef71bdf8aa71e5ff9169 --local-dir ./MOSS-Audio-Tokenizer-v2
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("OpenMOSS-Team/MOSS-Audio-Tokenizer-v2", revision="f6e20e543b33d2c252a7ef71bdf8aa71e5ff9169") model = AutoModel.from_pretrained("OpenMOSS-Team/MOSS-Audio-Tokenizer-v2", revision="f6e20e543b33d2c252a7ef71bdf8aa71e5ff9169", 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-15
Text in
LICENSE
Text sha256
50e6751797c50dedd75ef1b8a0d9e42f5f8472e9fbce91f34718e9f97b0c780a
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: OpenMOSS-Team <huggingface.co/OpenMOSS-Team>Newsgroups: alt.freeweights.embedSubject: MOSS-Audio-Tokenizer-v2Date: 2026-11-15Commit: f6e20e5Signed: 2DC28CC7B26A283B ✓
Upstream
OpenMOSS-Team/MOSS-Audio-Tokenizer-v2
Pinned commit
f6e20e543b33d2c252a7ef71bdf8aa71e5ff9169
Manifest
MOSS-Audio-Tokenizer-v2.json · .minisig
Manifest sha256
cd5dc4058ddba381ad3cc756f645c8be1f89dbf1050dfb2ec6aa00840cc0026c
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:36 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/OpenMOSS-Team/MOSS-Audio-Tokenizer-v2.json $ curl -O https://freeweights.allternit.com/manifests/OpenMOSS-Team/MOSS-Audio-Tokenizer-v2.json.minisig $ minisign -Vm MOSS-Audio-Tokenizer-v2.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 OpenMOSS-Team/MOSS-Audio-Tokenizer-v2
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. MOSS-Audio-Tokenizer-v2.json. Provenance. Takedown history: none.
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-MiniLM-L6-v1
From: unsloth <huggingface.co/unsloth>Subject: all-MiniLM-L6-v2
From: mlx-community <huggingface.co/mlx-community>Subject: all-MiniLM-L6-v2-4bit
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens