Instructions to use mlx-community/MOSS-Audio-Tokenizer-v2-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/MOSS-Audio-Tokenizer-v2-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir MOSS-Audio-Tokenizer-v2-bf16 mlx-community/MOSS-Audio-Tokenizer-v2-bf16
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
mlx-community/MOSS-Audio-Tokenizer-v2-bf16
MLX conversion of OpenMOSS-Team/MOSS-Audio-Tokenizer-v2
(OpenMOSS) โ the 48 kHz stereo neural audio codec behind MOSS-TTS-Local-Transformer-v1.5:
causal windowed transformer encoder/decoder with a residual LFQ quantizer (32 codebooks ร 1024,
12.5 frames/s, downsample_rate 3840 per channel).
Precision: bf16 (the upstream compute_dtype; the upstream file is fp32, 8.5 GB โ 4.3 GB
here). Single model.safetensors with the key names mlx-audio's MossAudioTokenizer loads
directly (linear1/2 โ ffn.0/2, in_projs.0 โ in_proj, โฆ); config.json is the upstream
config minus auto_map. Round-trip verified with mlx-audio (encode โ decode of a 10 s clip).
Use with mlx-audio
from mlx_audio.codec.models.moss_audio_tokenizer import MossAudioTokenizer
tok = MossAudioTokenizer.from_pretrained("mlx-community/MOSS-Audio-Tokenizer-v2-bf16")
codes = tok.encode_audio("speech.wav", num_quantizers=12) # [frames, nq] int32
audio = tok.decode_audio_codes(codes, num_quantizers=12) # [samples, 2] float32 @ 48 kHz
Pass audio_tokenizer_source="mlx-community/MOSS-Audio-Tokenizer-v2-bf16" to
MOSS-TTS-Local-Transformer-v1.5 generation to use this mirror instead of the upstream fp32 repo.
License
Apache-2.0 (upstream weights and this conversion). Please credit OpenMOSS for the model.
- Downloads last month
- -
Quantized
Model tree for mlx-community/MOSS-Audio-Tokenizer-v2-bf16
Base model
OpenMOSS-Team/MOSS-Audio-Tokenizer-v2