Instructions to use mlboydaisuke/Mimi-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use mlboydaisuke/Mimi-LiteRT with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
# No code snippets available yet for this library.
# To use this model, check the repository files and the library's documentation.
# Want to help? PRs adding snippets are welcome at:
# https://github.com/huggingface/huggingface.jsMimi (Kyutai 2024) β LiteRT on-device (hybrid GPU/CPU)
On-device LiteRT conversion of kyutai/mimi,
the Kyutai/Moshi streaming neural audio codec (24 kHz, 12.5 Hz frame rate). The heavy SEANet
convolutional halves run on the CompiledModel GPU (ML Drift / LITERT_CL); the two 8-layer
Transformers and the split RVQ run on CPU. Device-verified on a Pixel 8a (Tensor G3): full
round-trip at RTF β 0.35 (faster than real-time), reconstruction at the codec's quality floor.
Files
| File | Size | Placement | Input β Output |
|---|---|---|---|
mimi_enc_conv_fp16.tflite |
24 MB | GPU | audio [1,1,L] β feat [1,512,Se] |
mimi_enc_tx_fp16.tflite |
50 MB | CPU | feat [1,Se,512] β emb [1,512,Tc] |
mimi_dec_tx_fp16.tflite |
48 MB | CPU | emb [1,512,Tc] β conv_in [1,512,seq] |
mimi_deconly_fp16.tflite |
28 MB | GPU | conv_in [1,512,seq] β audio [1,1,L] |
mimi_rvq.bin |
69 MB | CPU | codes β emb (32 codebooks, float32 LE) |
Graphs are fixed-length (built per duration). The example set is for a 2 s clip (Se=50, Tc=25, seq=50).
Pipeline
audio β[GPU enc_conv]β feat β[CPU enc_tx]β emb β[CPU RVQ.encode]β codes
β[CPU RVQ.decode]β emb β[CPU dec_tx]β conv_in β[GPU deconly]β audio
Why hybrid
Every op in all four graphs is GPU-clean (re-authored), and the convs are fp16-exact on Mali (decoder-only fed the exact transformer output = 48 dB SNR). But the decoder transformer's residual stream reaches |x|=27, where the Mali GPU delegate's internal fp16 compute loses precision β full-GPU decode drops to ~12 dB on real speech. The transformer behaves identically standalone and fused on device, so this is fp16 precision, not a fusion collapse. The transformers are tiny (8 layers Γ 512, seq ~50), so CPU is trivial and exact; the heavy SEANet convs stay on GPU. The split RVQ (1 semantic + 31 acoustic, Euclidean argmin + int64 indices) runs on CPU.
Re-authoring (litert-torch, parity ~1.0)
tanh-GELU Β· baked RoPE cos/sin + rotate_half Β· baked causal additive bias Β· MimiLayerScaleβLinear Β·
grouped ZeroStuffConvT1d (depthwise upsample, no TRANSPOSE_CONV) Β· baked constant conv pad Β·
nn.ELUβrelu(x)βrelu(1βexp(min(x,0))) Β· replicate-padβSLICE+CONCAT.
Usage
Sample app + conversion scripts: LiteRT-Models / mimi.
Push the files to the app's filesDir with mimi/scripts/install_to_device.sh.
This conversion uses model-op rewrites + a GPU/CPU placement split, so it is hosted in a personal namespace (not a patch-free "clean" sample). License follows upstream Mimi (CC-BY-4.0).
Want a different model on-device? Open a request β free, open weights only; the export and its measured numbers get published publicly.
- Downloads last month
- 100
Model tree for mlboydaisuke/Mimi-LiteRT
Base model
kyutai/mimi