Views
No views yet
embed_text_tokens mapped onto the standard model.embed_tokens.weight slot, so plain llama.cpp tokenizes + embeds text natively. Runs in llama.cpp (embeddings=true mode — hidden state is read, not logits).residual_depth_ar codec_lm adaptor (32 audio embed tables + c0 head + 4-layer depth decoder + 31 codebooks_head slices). Runs in codec.cpp.codec_lm_step_* state machine (1 c0 head + 31 depth-AR steps per frame → 32 codes) → codec_lm_compose_audio_embd → fed back into backbone as the next position's input embedding. Stop on codes[0] == 0 at step > 0 (training-time audio-EOS marker).csm-1b-<quant>.gguf| File | Size |
|---|---|
csm-1b-f32.gguf | 4.61 GB |
csm-1b-f16.gguf | 2.31 GB |
csm-1b-bf16.gguf | 2.31 GB |
csm-1b-q8_0.gguf | 1.23 GB |
csm-1b-q6_k.gguf | 974 MB |
csm-1b-q5_1.gguf | 909 MB |
csm-1b-q5_k_m.gguf | 869 MB |
csm-1b-q5_k_s.gguf | 851 MB |
csm-1b-q5_0.gguf | 851 MB |
csm-1b-q4_1.gguf | 793 MB |
csm-1b-q4_k_m.gguf | 770 MB |
csm-1b-q4_k_s.gguf | 739 MB |
csm-1b-q4_0.gguf | 735 MB |
csm-1b-q3_k_l.gguf | 698 MB |
csm-1b-q3_k_m.gguf | 659 MB |
csm-1b-q3_k_s.gguf | 612 MB |
csm-1b-q2_k.gguf | 554 MB |
residual_depth_ar codec_lm)codec[-<quant>].gguf| File | Size |
|---|---|
codec-f32.gguf | 1.11 GB |
codec-f16.gguf | 871 MB |
codec-q8_0.gguf | 803 MB |
codec-q5_k_m.gguf | 776 MB |
codec-q4_k_m.gguf | 767 MB |
Mimi is mostly small conv kernels whose row sizes don't meet the K-quant block-size requirements, soQ4_K_M/Q5_K_Msave little overQ8_0. For minimum disk + RAM, pair the backbone quants withcodec-q8_0.gguf.
codec.lm.* metadata and routes through the codec_lm AR path:1import { initLlama, loadLlamaModelInfo } from 'llama.rn'
2
3const ctx = await initLlama({
4 model: 'csm-1b-q4_k_m.gguf',
5 vocoder: { path: 'codec-q4_k_m.gguf' },
6 n_ctx: 4096,
7})
8
9const fmt = await ctx.getFormattedAudioCompletion({
10 prompt: 'Hello, world!',
11 // CSM is zero-shot — `speaker: { id: 0 }` or `{ id: 1 }` picks one of the
12 // two trained speakers. Omit to default to speaker 0.
13})
14
15// fmt.flow === 'codec_lm_ar' for CSM.
16const { codes } = await ctx.generateAudioCodes({
17 prompt: fmt.prompt,
18 maxFrames: 500,
19 temperature: 0.9,
20 topP: 0.95,
21 topK: 50,
22})
23
24const pcm = await ctx.decodeAudioTokens(codes)
25// pcm is Float32-PCM at 24 kHz; feed it into your audio player of choice.examples/tts.py --model csm in codec.cpp.0 and 1); the prompt format is <|begin_of_text|>[<speaker>]<text><|end_of_text|>.[0] vs [1]); finer control isn't exposed by CSM.convert_hf_to_gguf.py versions; codec.cpp's convert-backbone-to-gguf.py prep_csm injects a runtime patch mapping unknown hashes to llama-bpe (the regex family is identical, the tokenizer isn't used at codec_lm-driven inference anyway).sesame/csm-1bmybigday/codec.cpp (scripts: convert-backbone-to-gguf.py prep_csm + convert-to-gguf.py with the auto-dispatched CsmConverter)mybigday/llama.rn (codec_lm AR path lands in cpp/rn-tts.cpp::generateAudioCodes)