AI SeedbankHelp preserve open and free AI for humanity's future

← All models

sesame_csm-1b

sesame · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: 1 · Leechers: 0

Observed 2026-09-02T13:56:39Z via announce.aitorrent.org:7070.

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


license: apache-2.0 language:

  • en pipeline_tag: text-to-speech tags:
  • text-to-speech library_name: transformers

CSM 1B

2025/05/20 - CSM is availabile natively in Hugging Face Transformers 🤗 as of version 4.52.1

2025/03/13 - We are releasing the 1B CSM variant. The checkpoint is hosted on Hugging Face.


CSM (Conversational Speech Model) is a speech generation model from Sesame that generates RVQ audio codes from text and audio inputs. The model architecture employs a Llama backbone and a smaller audio decoder that produces Mimi audio codes.

A fine-tuned variant of CSM powers the interactive voice demo shown in our blog post.

A hosted HuggingFace space is also available for testing audio generation.

Usage

Generate a sentence

import torch
from transformers import CsmForConditionalGeneration, AutoProcessor

model_id = "sesame/csm-1b"
device = "cuda" if torch.cuda.is_available() else "cpu"

# load the model and the processor
processor = AutoProcessor.from_pretrained(model_id)
model = CsmForConditionalGeneration.from_pretrained(model_id, device_map=device)

# prepare the inputs
text = "[0]Hello from Sesame." # `[0]` for speaker id 0
inputs = processor(text, add_special_tokens=True).to(device)

# another equivalent way to prepare the inputs
conversation = [
    {"role": "0", "content": [{"type": "text", "text": "Hello from Sesame."}]},
]
inputs = processor.apply_chat_template(
    conversation,
    tokenize=True,
    return_dict=True,
).to(device)

# infer the model
audio = model.generate(**inputs, output_audio=True)
processor.save_audio(audio, "example_without_context.wav")

CSM sounds best when provided with context

import torch
from transformers import CsmForConditionalGeneration, AutoProcessor
from datasets import load_dataset, Audio

model_id = "sesame/csm-1b"
device = "cuda" if torch.cuda.is_available() else "cpu"

# load the model and the processor
processor = AutoProcessor.from_pretrained(model_id)
model = CsmForConditionalGeneration.from_pretrained(model_id, device_map=device)

# prepare the inputs
ds = load_dataset("hf-internal-testing/dailytalk-dummy", split="train")
# ensure the audio is 24kHz
ds = ds.cast_column("audio", Audio(sampling_rate=24000))
conversation = []

# 1. context
for text, audio, speaker_id in zip(ds[:4]["text"], ds[:4]["audio"], ds[:4]["speaker_id"]):
    conversation.append(
        {
            "role": f"{speaker_id}",
            "content": [{"type": "text", "text": text}, {"type": "audio", "path": audio["array"]}],
        }
    )

# 2. text prompt
conversation.append({"role": f"{ds[4]['speaker_id']}", "content": [{"type": "text", "text": ds[4]["text"]}]})

inputs = processor.apply_chat_template(
    conversation,
    tokenize=True,
    return_dict=True,
).to(device)

# infer the model
audio = model.generate(**inputs, output_audio=True)
processor.save_audio(audio, "example_with_context.wav")

Batched Inference 📦

CSM supports batched inference:

code snippet
import torch
from transformers import CsmForConditionalGeneration, AutoProcessor
from datasets import load_dataset, Audio

model_id = "sesame/csm-1b"
device = "cuda" if torch.cuda.is_available() else "cpu"

# load the model and the processor
processor = AutoProcessor.from_pretrained(model_id)
model = CsmForConditionalGeneration.from_pretrained(model_id, device_map=device)

# prepare the inputs 
ds = load_dataset("hf-internal-testing/dailytalk-dummy", split="train")
# ensure the audio is 24kHz
ds = ds.cast_column("audio", Audio(sampling_rate=24000))
# here a batch with two prompts
conversation = [
    [
        {
            "role": f"{ds[0]['speaker_id']}",
            "content": [
                {"type": "text", "text": ds[0]["text"]},
                {"type": "audio", "path": ds[0]["audio"]["array"]},
            ],
        },
        {
            "role": f"{ds[1]['speaker_id']}",
            "content": [
                {"type": "text", "text": ds[1]["text"]},
            ],
        },
    ],
    [
        {
            "role": f"{ds[0]['speaker_id']}",
            "content": [
                {"type": "text", "text": ds[0]["text"]},
            ],
        }
    ],
]
inputs = processor.apply_chat_template(
    conversation,
    tokenize=True,
    return_dict=True,
).to(device)

audio = model.generate(**inputs, output_audio=True)
processor.save_audio(audio, [f"speech_batch_idx_{i}.wav" for i in range(len(audio))])

Making The Model Go Brrr 🏎️

CSM supports full-graph compilation with CUDA graphs!

code snippet
import torch
import copy
from transformers import CsmForConditionalGeneration, AutoProcessor
from datasets import load_dataset

model_id = "sesame/csm-1b"
device = "cuda"

# set logs to ensure no recompilation and graph breaks
torch._logging.set_logs(graph_breaks=True, recompiles=True, cudagraphs=True)

# load the model and the processor
processor = AutoProcessor.from_pretrained(model_id)
model = CsmForConditionalGeneration.from_pretrained(model_id, device_map=device)

# use static cache, enabling automatically torch compile with fullgraph and reduce-overhead
model.generation_config.max_length = 250 # big enough to avoid recompilation
model.generation_config.max_new_tokens = None # would take precedence over max_length
model.generation_config.cache_implementation = "static"
model.depth_decoder.generation_config.cache_implementation = "static"

# generation kwargs
gen_kwargs = {
    "do_sample": False,
    "depth_decoder_do_sample": False,
    "temperature": 1.0,
    "depth_decoder_temperature": 1.0,
}

# Define a timing decorator
class TimerContext:
    def __init__(self, name="Execution"):
        self.name = name
        self.start_event = None
        self.end_event = None
        
    def __enter__(self):
        # Use CUDA events for more accurate GPU timing
        self.start_event = torch.cuda.Event(enable_timing=True)
        self.end_event = torch.cuda.Event(enable_timing=True)
        self.start_event.record()
        return self

    def __exit__(self, *args):
        self.end_event.record()
        torch.cuda.synchronize()
        elapsed_time = self.start_event.elapsed_time(self.end_event) / 1000.0
        print(f"{self.name} time: {elapsed_time:.4f} seconds")

# prepare the inputs 
ds = load_dataset("hf-internal-testing/dailytalk-dummy", split="train")

conversation = [
    {
        "role": f"{ds[0]['speaker_id']}",
        "content": [
            {"type": "text", "text": ds[0]["text"]},
            {"type": "audio", "path": ds[0]["audio"]["array"]},
        ],
    },
    {
        "role": f"{ds[1]['speaker_id']}",
        "content": [
            {"type": "text", "text": ds[1]["text"]},
            {"type": "audio", "path": ds[1]["audio"]["array"]},
        ],
    },
    {
        "role": f"{ds[2]['speaker_id']}",
        "content": [
            {"type": "text", "text": ds[2]["text"]},
        ],
    },
]

padded_inputs_1 = processor.apply_chat_template(
    conversation,
    tokenize=True,
    return_dict=True,
).to(device)

print("\n" + "="*50)
print("First generation - compiling and recording CUDA graphs...")
with TimerContext("First generation"):
    _ = model.generate(**padded_inputs_1, **gen_kwargs)
print("="*50)

print("\n" + "="*50)
print("Second generation - fast !!!")
with TimerContext("Second generation"):
    _ = model.generate(**padded_inputs_1, **gen_kwargs)
print("="*50)

# now with different inputs
conversation = [
    {
        "role": f"{ds[0]['speaker_id']}",
        "content": [
            {"type": "text", "text": ds[2]["text"]},
            {"type": "audio", "path": ds[2]["audio"]["array"]},
        ],
    },
    {
        "role": f"{ds[1]['speaker_id']}",
        "content": [
            {"type": "text", "text": ds[3]["text"]},
            {"type": "audio", "path": ds[3]["audio"]["array"]},
        ],
    },
    {
        "role": f"{ds[2]['speaker_id']}",
        "content": [
            {"type": "text", "text": ds[4]["text"]},
        ],
    },
]
padded_inputs_2 = processor.apply_chat_template(
    conversation,
    tokenize=True,
    return_dict=True,
).to(device)

print("\n" + "="*50)
print("Generation with other inputs!")
with TimerContext("Generation with different inputs"):
    _ = model.generate(**padded_inputs_2, **gen_kwargs)
print("="*50)

Fine-tuning & training 📉

CSM can be fine-tuned using Transformers' Trainer.

code snippet
from datasets import load_dataset, Audio
from transformers import (
    CsmForConditionalGeneration,
    TrainingArguments,
    CsmProcessor,
    Trainer
)

processor = CsmProcessor.from_pretrained("sesame/csm-1b")
model = CsmForConditionalGeneration.from_pretrained("sesame/csm-1b")
model.train()
model.codec_model.eval()

ds = load_dataset("eustlb/dailytalk-conversations-grouped", split="train")
ds = ds.cast_column("audio", Audio(sampling_rate=processor.feature_extractor.sampling_rate))

def data_collator(samples):
    conversations = [] 

    for sample in samples:
        concatenated_audio_array = sample["audio"]["array"]
        audio = [concatenated_audio_array[s: e] for s, e in sample["audio_cut_idxs"]]
            
        conversation = []
        for speaker_id, text, audio in zip(sample["speaker_ids"], sample["texts"], audio):
            conversation.append({
                "role": f"{speaker_id}",
                "content": [
                    {"type": "text", "text": text},
                    {"type": "audio", "audio": audio}
                ]
            })
            
        conversations.append(conversation)

    inputs = processor.apply_chat_template(
        conversations,
        tokenize=True,
        return_dict=True,
        output_labels=True,
    )
    return inputs

training_args = TrainingArguments(
    "test-trainer",
    remove_unused_columns=False,
    gradient_checkpointing=True,
)

trainer = Trainer(
    model, 
    training_args,
    train_dataset=ds,
    data_collator=data_collator,
)

trainer.train()

FAQ

Does this model come with any voices?

The model open sourced here is a base generation model. It is capable of producing a variety of voices, but it has not been fine-tuned on any specific voice.

Can I converse with the model?

CSM is trained to be an audio generation model and not a general purpose multimodal LLM. It cannot generate text. We suggest using a separate LLM for text generation.

Does it support other languages?

The model has some capacity for non-English languages due to data contamination in the training data, but it likely won't do well.

Misuse and abuse ⚠️

This project provides a high-quality speech generation model for research and educational purposes. While we encourage responsible and ethical use, we explicitly prohibit the following:

  • Impersonation or Fraud: Do not use this model to generate speech that mimics real individuals without their explicit consent.
  • Misinformation or Deception: Do not use this model to create deceptive or misleading content, such as fake news or fraudulent calls.
  • Illegal or Harmful Activities: Do not use this model for any illegal, harmful, or malicious purposes.

By using this model, you agree to comply with all applicable laws and ethical guidelines. We are not responsible for any misuse, and we strongly condemn unethical applications of this technology.

Authors Johan Schalkwyk, Ankit Kumar, Dan Lyth, Sefik Emre Eskimez, Zack Hodari, Cinjon Resnick, Ramon Sanabria, Raven Jiang, and the Sesame team.

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:9f1963853bbc66b81d6edaa9921efc7611bcfd56&dn=sesame_csm-1b

Open magnet in torrent client · infohash 9f1963853bbc66b81d6edaa9921efc7611bcfd56

Files & hashes

PathSizesha1sha256
README.md11.9 KB (12,140 B)bd0f394147727f843e2abd0c2d3f57ce736bdb91f45b5ea019e71b0a45e4c036ff24e81ac623b00f5781980c192b607af2adb0af
chat_template.jinja2.0 KB (2,002 B)d75309f235b5e74612dd78c18862213b610cc325b43753fbbc23be93160cccf825d2cf97dec39538cb274350216940e7acbc0fe7
ckpt.pt5.79 GB (6,219,618,714 B)cf089f9a365df697dd5b6f633c1a3b04f6fa0f47d22447f22bbc74d17dbe8912a29bd5b46cdc6b4a9b18e94c3065fcd267689f0e
config.json3.2 KB (3,280 B)eb34392016242d345cec269e1623413f9071d910b203c014cb5a2f7b4f98d2e945f091182aceb17fa530ce968e8c3437e01a9b70
generation_config.json264 B (264 B)e7beaf68e64dcd17fee50190107117d29c357ec07e8155f5846542bb15f8910a8dff0724d2961b28f10e4d98c58327825239b452
model.safetensors5.78 GB (6,211,186,784 B)47009414972744ef903fc7d3e5fd7494be22da692e7721144afe38b906d4f1048671da639fe142423f4a26283606ecebe894f4bf
preprocessor_config.json271 B (271 B)42c2fd79770898fbd32fc3e04bd36b88512237008648040cda0469976874c733acbec88c0ef094cd95628ab63b32950f01872af9
prompts/conversational_a.wav2.5 MB (2,646,044 B)bbafee480ddfb9465f0b408acdeb26bfff58f27f356648c1bc6c1da7883004557e9b21a2ef7d01682d8b9d02d6dcb950b348b04f
prompts/conversational_b.wav2.5 MB (2,646,044 B)1dfb6885c5c5f1c048d77a20b1c3d06a7cc0e7edc247153011385d33aaeed193adfec562c32182e2facd30cc8cd0b3e820e94afb
prompts/read_speech_a.wav811.9 KB (831,412 B)fff7ab5e25adee4246a57160510d8aab8db6d93b59480708f84c77ab2967d14d821c2ccade9d7761685d060575121f49a149005b
prompts/read_speech_b.wav562.6 KB (576,052 B)b2a8df478d0471f45fd8f4ebea28933208ee8a13f582640265864499cbe6a8c687ea0f9e08e7fa41eeb2caa923d0a3bada55fcef
prompts/read_speech_c.wav376.9 KB (385,964 B)e1eb0375d705751c81b78246d6a5b30d68cb96f97da15ab3ee7f8bbc8abfce73ce65936a80a535ae4a86db2d9c4756caba69e9c3
prompts/read_speech_d.wav425.7 KB (435,884 B)df9e17800ee8ccc04c2e15d4b329a15252a1dee409cad0494f9d0038b0f0eb039f47d752c45e56d92679f96587e20f67b2c1b7d8
special_tokens_map.json449 B (449 B)e5b39b6305d89284b04934011c68dbb26bf588ca03d62862d41de30db9e05cb4865de4f36c48ab3032327139fcdfacc5798a4828
tokenizer.json16.4 MB (17,209,980 B)f2e86c94b11e1213d274a4fb8496a354056137c380f511469b4aceda8c17ccafef2310eceeda9dd4589cf2c062bd0279eef5646d
tokenizer_config.json49.4 KB (50,563 B)9efdba317a3f1ea9acf0a99ad77e2451ecfa220c250bef77ad6788610c416ccf4e0f6466607a12c0dc3156cca1031c2269170311
transformers-00001-of-00002.safetensors4.60 GB (4,944,026,784 B)ad6f411b12208f860cfbf08d0e857ea466a5899bf2dac3b296f50609f57addb82a25bf75f5de2232967d78f5375da3c71fd596d4
transformers-00002-of-00002.safetensors2.04 GB (2,189,474,180 B)ac09089956e266302027f9bfca9868cc4716fbb1fdb68548b7422bc623c83885e78802c2c4cc6fc3f864f4fabdd715f94abca4ef
transformers.safetensors.index.json58.3 KB (59,730 B)6bd497e812938dc53a500a7fc941f4f04c3adecd212855a8d01ca62763af1aa0ab31c7d263cf4c4be79ffedf2dfd636aa77480a2

Cite this release

Canonical URL
https://aiseedbank.org/models/sesame_csm-1b/
Slug
sesame_csm-1b
Infohash
9f1963853bbc66b81d6edaa9921efc7611bcfd56
License
apache-2.0
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: sesame_csm-1b.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositorysesame/csm-1b
Revision (pinned)c92a71e1c419772e25be7dc14d952c2521a740ab
Fetched at2026-09-02T12:11:58Z
License at fetchapache-2.0
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-02T12:16:06Z

apache-2.018.24 GB (19,589,166,541 bytes)transformerssafetensorscsmtext-to-audiotext-to-speechendpoints_compatible1 language (en)