Speech as a language model's tokens
CSM, Sesame's Conversational Speech Model, writes speech the way a language model writes text: one token after another, each conditioned on everything before. Its tokens are the codes of Mimi, the codec on the Tokenization Explainer's Mimi tab: 12.5 frames a second, each frame 32 codes from codebooks of 2,048 vectors. What it conditions on is the conversation so far, text and audio of every turn, so that the same sentence can be said differently depending on what was said before and how.
The released checkpoint is the smallest of three sizes in Sesame's post, a 1B backbone with a 100M decoder; the recorded checkpoint has 1,107.6 M parameters in the backbone (its audio embedding table included), 178.4 M in the depth decoder (its 31 output matrices included), 262.7 M in the text embedding table and 79.3 M in its own copy of Mimi. The page records one exchange: speaker 0 says the Kokoro tab's line, with Kokoro's own recording of it, and CSM says the reply as speaker 1.
The conversation as one sequence
Each turn becomes Llama 3 text tokens, <|begin_of_text|>[0]Have you seen…<|end_of_text|>, where the bracketed number names the speaker, followed by that turn's audio frames and one frame of 0s that ends it. The last turn has text only: generation continues it with audio. The One sequence strip draws all 81 prompt positions: text tokens as wide cells, the context's 45 frames as narrow cells coloured by their first code, then each generated frame as it is appended.
A text position is a row of the text embedding table. An audio position is the sum of its 32 codes' rows from one audio table in which codebook has its own block of 2,051 rows:
The Context frames stack shows the context's codes. CSM's Mimi has the same weights as kyutai/mimi (the recorder compares all 350 tensors), so these are the codes the Mimi tab's quantizer would give; unlike Moshi, which keeps 8 codes a frame, CSM models all 32.
The backbone predicts codebook 0
The backbone is a Llama 3.2-style transformer: 16 layers 2,048 wide, RMSNorm before attention and the SwiGLU feed-forward, rotary positions with Llama 3's frequency scaling, and grouped-query attention in which 32 query heads share 8 key and value heads. Its last state at the end of the sequence goes through one linear head to logits over codebook 0, Mimi's semantic code, which carries most of what is being said.
The Attention map shows one head's weights: a row per generated frame, a column per position, in decibels. The bars over the One sequence strip are the selected row, the Dense explainer's attention row stretched over text and audio. Heads can be compared for how much weight they put on the reply's own text as the frames advance, on the context's audio, or on the frames just generated.
The depth decoder fills in the frame
Predicting all 32 codes of a frame at once would ignore how they depend on one another, and running the 1B backbone 32 times a frame would be slow. CSM factors each frame the way the RQ-Transformer factors residual codes: the backbone runs once per frame, and a small depth decoder, 4 layers 1,024 wide, runs across the frame's codebooks:
Its position 0 is the backbone's state , projected to 1,024; position is the embedding of code from the backbone's audio table, also projected; and each codebook has its own output matrix. The p(sampled code) map shows how likely every drawn code was: across the reply's frames the median was 0.64 for codebook 0 and 0.04 for codebooks 1–31, and 555 of the 768 codes drawn were not the most likely candidate. The closing frame of 0s was all but certain: 0.994 for codebook 0, above 0.9999 for every other. Sesame's post says the decoder is trained on a random 1/16 of the frames while codebook 0 is trained on all of them, to save compute.
Sampling and stopping
Every code is drawn from the top 50 candidates at temperature 0.9, the checkpoint's generation settings. The recorder draws by inverse CDF: with the candidates sorted most likely first and a seeded uniform number , it takes the first whose cumulative probability exceeds , so each choice on the Codebook panels can be checked from the stored probabilities. The turn ends when the backbone and depth decoder produce a frame whose codes are all 0, the same frame that closes each context turn; here that came after 24 frames, 1.92 s. Because sampling is random, another seed gives a different reading of the same line.
Mimi turns codes into sound
Mimi's decoder turns each frame back into 1,920 samples at 24 kHz. The Audio strip plays Kokoro's clip, the same clip after Mimi's encoder and decoder (what the backbone actually reads), and CSM's reply. Measured as on the Mimi tab, the clip after Mimi is 7.5 dB SNR and 3.3 dB of mean log-mel distance from Kokoro's. As a rough check of intelligibility the recorder ran Whisper base, from the Audio Explainer's Whisper tab, on the reply: it heard “He went down to the river an hour ago.”, the line CSM was given, word for word.
Where it came from
Codec language models began with AudioLM and VALL-E, which generated speech as neural codec tokens, VALL-E conditioned on a three-second prompt of the target voice. Codecs with residual vector quantizers such as SoundStream make several codes per frame, which led to delay patterns (MusicGen) and to stacked transformers that predict a frame's codes one by one (RQ-Transformer, Moshi's depth transformer). CSM applies the stacked design to conversation, conditioning on several turns of text and audio; Sesame's post reports training on about one million hours of mostly English audio with a 2,048-token context, about two minutes. The Kokoro tab takes the other route: phonemes, explicit durations and pitch, and a vocoder, in one pass.
Papers
- Crossing the uncanny valley of conversational voice Introduces CSM: the backbone for codebook 0 and the decoder for the rest, model sizes, training data and the 1/16 compute amortisation.
- Moshi: a speech-text foundation model for real-time dialogue Introduces Mimi, the codec CSM speaks in, and a depth transformer over a frame's codes.
- Autoregressive Image Generation using Residual Quantization The RQ-Transformer: one transformer across positions and a small one across each position's residual codes, the split CSM uses.
- Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers VALL-E: speech synthesis as language modelling over codec codes, conditioned on an audio prompt.
- AudioLM: a Language Modeling Approach to Audio Generation Generates audio as discrete tokens with a language model, the starting point of codec language models.
- SoundStream: An End-to-End Neural Audio Codec The residual vector quantizer codec that gives several codes per frame, as Mimi does.
- The Llama 3 Herd of Models The tokenizer, block design and rotary scaling of CSM's backbone and depth decoder.