Instructions to use kyutai/moshiko-pytorch-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Moshi
How to use kyutai/moshiko-pytorch-bf16 with Moshi:
# pip install moshi # Run the interactive web server python -m moshi.server --hf-repo "kyutai/moshiko-pytorch-bf16" # Then open https://localhost:8998 in your browser
# pip install moshi import torch from moshi.models import loaders # Load checkpoint info from HuggingFace checkpoint = loaders.CheckpointInfo.from_hf_repo("kyutai/moshiko-pytorch-bf16") # Load the Mimi audio codec mimi = checkpoint.get_mimi(device="cuda") mimi.set_num_codebooks(8) # Encode audio (24kHz, mono) wav = torch.randn(1, 1, 24000 * 10) # [batch, channels, samples] with torch.no_grad(): codes = mimi.encode(wav.cuda()) decoded = mimi.decode(codes) - Notebooks
- Google Colab
- Kaggle
Add missing config.json
Browse files- config.json +35 -0
config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"moshi_name": "model.safetensors",
|
| 3 |
+
"mimi_name": "tokenizer-e351c8d8-checkpoint125.safetensors",
|
| 4 |
+
"tokenizer_name": "tokenizer_spm_32k_3.model",
|
| 5 |
+
"quantize": true,
|
| 6 |
+
"dim": 4096,
|
| 7 |
+
"text_card": 32000,
|
| 8 |
+
"existing_text_padding_id": 3,
|
| 9 |
+
"n_q": 16,
|
| 10 |
+
"dep_q": 8,
|
| 11 |
+
"card": 2048,
|
| 12 |
+
"num_heads": 32,
|
| 13 |
+
"num_layers": 32,
|
| 14 |
+
"hidden_scale": 4.125,
|
| 15 |
+
"causal": true,
|
| 16 |
+
"layer_scale": null,
|
| 17 |
+
"context": 3000,
|
| 18 |
+
"max_period": 10000,
|
| 19 |
+
"gating": "silu",
|
| 20 |
+
"norm": "rms_norm_f32",
|
| 21 |
+
"positional_embedding": "rope",
|
| 22 |
+
"depformer_dim": 1024,
|
| 23 |
+
"depformer_dim_feedforward": 4224,
|
| 24 |
+
"depformer_num_heads": 16,
|
| 25 |
+
"depformer_num_layers": 6,
|
| 26 |
+
"depformer_causal": true,
|
| 27 |
+
"depformer_layer_scale": null,
|
| 28 |
+
"depformer_multi_linear": true,
|
| 29 |
+
"depformer_context": 8,
|
| 30 |
+
"depformer_max_period": 10000,
|
| 31 |
+
"depformer_gating": "silu",
|
| 32 |
+
"depformer_pos_emb": "none",
|
| 33 |
+
"depformer_weights_per_step": true,
|
| 34 |
+
"delays": [0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1]
|
| 35 |
+
}
|