CSM-1B โ€” GGUF

Sesame's CSM-1B: conversational English speech.

Two files make one model, as with llama.cpp's multimodal projectors: the model file is the text-to-speech LM backbone, run by llama.cpp; the codec file holds the audio side (decoder / vocoder, speaker encoders and the adaptor between the two), run by codec.cpp. The runtimes below wire the two graphs together, on CPU or GPU (CUDA, Vulkan, Metal), fully offline.

Files

Every run needs one model file + one codec file from this repo.

--backbone --model (codec) Total
Recommended csm-1b-q8_0.gguf codec-q8_0.gguf 2.2 GB
Smallest csm-1b-q4_k_m.gguf codec-q8_0.gguf 1.7 GB
Best quality csm-1b-f16.gguf codec-f16.gguf 3.4 GB

The quantized codec files are barely smaller than codec-q8_0.gguf; pair any model file with it.

Other files
File Size
codec-f32.gguf 1.2 GB
codec-q4_k_m.gguf 804 MB
codec-q5_k_m.gguf 814 MB
csm-1b-bf16.gguf 2.5 GB
csm-1b-f32.gguf 5.0 GB
csm-1b-q2_k.gguf 581 MB
csm-1b-q3_k_l.gguf 733 MB
csm-1b-q3_k_m.gguf 691 MB
csm-1b-q3_k_s.gguf 642 MB
csm-1b-q4_0.gguf 771 MB
csm-1b-q4_1.gguf 832 MB
csm-1b-q4_k_s.gguf 776 MB
csm-1b-q5_0.gguf 893 MB
csm-1b-q5_1.gguf 953 MB
csm-1b-q5_k_m.gguf 911 MB
csm-1b-q5_k_s.gguf 893 MB
csm-1b-q6_k.gguf 1.0 GB

Command line (codec.cpp)

With codec.cpp's tts-cli (build it; it bundles llama.cpp), then:

hf download BricksDisplay/CSM-1B-GGUF csm-1b-q8_0.gguf codec-q8_0.gguf --local-dir CSM-1B

./build/tts-cli synthesize --backbone CSM-1B/csm-1b-q8_0.gguf --model CSM-1B/codec-q8_0.gguf \
    --text "Hello, how are you doing today?" --output out.wav

All tts-cli options (voices, voice cloning, sampling, GPU) are described in the codec.cpp README.

Python

The codec_cpp package runs the same pipeline (it builds codec.cpp with its bundled llama.cpp, so it needs CMake and a C++ compiler):

pip install "codec-cpp @ git+https://github.com/mybigday/codec.cpp" huggingface_hub soundfile
import codec_cpp, soundfile
from huggingface_hub import hf_hub_download

tts = codec_cpp.TTS(hf_hub_download("BricksDisplay/CSM-1B-GGUF", "csm-1b-q8_0.gguf"),
                    hf_hub_download("BricksDisplay/CSM-1B-GGUF", "codec-q8_0.gguf"))
audio, sr = tts.synthesize("Hello, how are you doing today?")
soundfile.write("out.wav", audio, sr)

tts.voices() lists the builtin voices; ref_audio= clones a voice where the model supports it; tts.stream(text) yields audio as it is generated. More in the Python docs.

React Native (llama.rn)

llama.rn loads the same two files on iOS and Android:

const ctx = await initLlama({ model: 'csm-1b-q8_0.gguf', embedding: true })
await ctx.initVocoder({ path: 'codec-q8_0.gguf' })
const { prompt, grammar, embedding, flow } = await ctx.getFormattedAudioCompletion({
  prompt: 'Hello world',
})
const result = await ctx.completion({ prompt, grammar, embedding })
const pcm = flow === 'continuous_embd'
  ? await ctx.decodeAudioEmbeddings(result.embeddings, result.embedding_dim)
  : await ctx.decodeAudioTokens(result.audio_tokens)

Voice cloning, saved voices and per-model notes: llama.rn TTS docs.

Sampling

The model files carry the recommended sampling as llama.cpp's general.sampling.* metadata, the settings of the original model's generation_config.json; tts-cli, tts-server, llama.rn and any llama.cpp host apply them unless you set your own.

Setting Value tts-cli flag
temperature 0.9 --temp 0.9
top-k 50 --top-k 50
top-p 1.0 (off) --top-p 1.0
min-p 0 (off) --min-p 0.0
sampler order penalties โ†’ temperature โ†’ top-k โ†’ top-p --samplers "penalties;temperature;top_k;top_p"

The backbone's codebook and every depth-decoder codebook of a frame are sampled with these settings, as in the original model.

Voices

CSM generates its own voice; there is no voice selection or cloning.

License

apache-2.0, the same as the original model.

Downloads last month
1,168
GGUF
Model size
0.5B params
Architecture
mimi
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

16-bit

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for BricksDisplay/CSM-1B-GGUF

Base model

sesame/csm-1b
Quantized
(5)
this model

Collection including BricksDisplay/CSM-1B-GGUF