Instructions to use kyutai/moshika-rag-pytorch-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Moshi
How to use kyutai/moshika-rag-pytorch-bf16 with Moshi:
# pip install moshi # Run the interactive web server python -m moshi.server --hf-repo "kyutai/moshika-rag-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/moshika-rag-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
Do you provide the dataset schema for fine-tune the moshi RAG model?
I am interested on observing this model, however I can't find the fine-tuning schema or script. Could you please release it atleast the dataset schema?
The MoshiRAG paper lists the stats of the fine-tuning dataset in the appendix. As the audio data was created by Kyutai's internal conversational TTS model, the release of this dataset will be subject to Kyutai's plan of releasing the conversational TTS model. However, there are some open-sourced conversational TTS models available on HuggingFace which may be useful if you would like to re-construct the training set on your own.
As for the training recipe, I would encourage you to look into the moshi-finetune repo. Training of MoshiRAG follows a very similar pipeline. The only major difference is the added ARC-Encoder reference encoder -- the detailed model architecture is defined in this script.