Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SesameAILabs/csm
/ functions
Functions
29 in github.com/SesameAILabs/csm
⨍
Functions
29
◇
Types & classes
4
↓ 2 callers
Function
_create_causal_mask
(seq_len: int, device: torch.device)
models.py:55
↓ 2 callers
Method
_embed_audio
(self, codebook: int, tokens: torch.Tensor)
models.py:190
↓ 2 callers
Function
_index_causal_mask
Args: mask: (max_seq_len, max_seq_len) input_pos: (batch_size, seq_len) Returns: (batch_size, seq_len, max_seq_len)
models.py:59
↓ 2 callers
Function
_prepare_transformer
(model)
models.py:48
↓ 2 callers
Method
_tokenize_text_segment
(self, text: str, speaker: int)
generator.py:60
↓ 2 callers
Function
load_watermarker
(device: str = "cuda")
watermarking.py:20
↓ 2 callers
Function
prepare_prompt
(text: str, speaker: int, audio_path: str, sample_rate: int)
run_csm.py:55
↓ 2 callers
Method
reset_caches
(self)
models.py:186
↓ 2 callers
Function
sample_topk
(logits: torch.Tensor, topk: int, temperature: float)
models.py:77
↓ 1 callers
Method
_embed_tokens
(self, tokens: torch.Tensor)
models.py:193
↓ 1 callers
Function
_multinomial_sample_one_no_sync
(probs)
models.py:72
↓ 1 callers
Method
_tokenize_audio
(self, audio: torch.Tensor)
generator.py:75
↓ 1 callers
Method
_tokenize_segment
Returns: (seq_len, 33), (seq_len, 33)
generator.py:98
↓ 1 callers
Function
check_audio_from_file
(audio_path: str)
watermarking.py:62
↓ 1 callers
Function
cli_check_audio
()
watermarking.py:12
↓ 1 callers
Method
generate
( self, text: str, speaker: int, context: List[Segment], max_audio_len
generator.py:109
↓ 1 callers
Method
generate_frame
Args: tokens: (batch_size, seq_len, audio_num_codebooks+1) tokens_mask: (batch_size, seq_len, audio_num_codebooks+1)
models.py:132
↓ 1 callers
Function
load_audio
(audio_path: str)
watermarking.py:72
↓ 1 callers
Function
load_csm_1b
(device: str = "cuda")
generator.py:171
↓ 1 callers
Function
load_llama3_tokenizer
https://github.com/huggingface/transformers/issues/22794#issuecomment-2092623992
generator.py:22
↓ 1 callers
Function
load_prompt_audio
(audio_path: str, target_sample_rate: int)
run_csm.py:46
↓ 1 callers
Function
main
()
run_csm.py:59
↓ 1 callers
Method
setup_caches
Setup KV caches and return a causal mask.
models.py:120
↓ 1 callers
Function
verify
( watermarker: silentcipher.server.Model, watermarked_audio: torch.Tensor, sample_rate: int, w
watermarking.py:44
↓ 1 callers
Function
watermark
( watermarker: silentcipher.server.Model, audio_array: torch.Tensor, sample_rate: int, waterma
watermarking.py:29
Method
__init__
(self, config: ModelArgs)
models.py:106
Method
__init__
( self, model: Model, )
generator.py:40
Function
llama3_2_100M
()
models.py:26
Function
llama3_2_1B
()
models.py:10