MCPcopy Create free account

hub / github.com/cartesia-one/csm.rs / functions

Functions91 in github.com/cartesia-one/csm.rs

↓ 8 callersMethodadd_kv
(self, key: str, value_type: int, value)
scripts/quantize.py:64
↓ 8 callersMethodforward
(&self, xs: &Tensor)
csm-core/csm_quantized_impl.rs:155
↓ 6 callersMethodforward
( &mut self, xs: &Tensor, attention_mask: Option<&Tensor>, seqlen_offset: usiz
csm-core/csm_full_impl.rs:209
↓ 6 callersMethodwrite_u32
(self, val: int)
scripts/quantize.py:50
↓ 5 callersMethodconfig
(&self)
csm-core/model.rs:109
↓ 5 callersMethodwrite_u64
(self, val: int)
scripts/quantize.py:53
↓ 3 callersMethodadd_tensor_info
(self, name: str, tensor: np.ndarray, dtype_str: str, override_shape=None)
scripts/quantize.py:67
↓ 3 callersFunctionread_string
(f)
scripts/show-gguf.py:30
↓ 3 callersFunctionrms_norm
(hidden_size: usize, eps: f64, vb: VarBuilder, tensor_name: &str)
csm-core/csm_full_impl.rs:132
↓ 3 callersMethodwrite_string
(self, val: str)
scripts/quantize.py:59
↓ 2 callersMethodclear_kv_cache
(&mut self)
csm-core/model.rs:68
↓ 2 callersMethoddecode_frames
(&mut self, frames: Vec<Vec<u32>>)
csm-core/lib.rs:467
↓ 2 callersMethodensure_kv_cache
Pre-allocate the KV cache buffers to avoid repeated concatenation.
csm-core/csm_quantized_impl.rs:216
↓ 2 callersMethodensure_kv_cache
Pre-allocate the KV cache buffers to avoid repeated concatenation.
csm-core/csm_full_impl.rs:191
↓ 2 callersFunctiongenerate_audio_blocking
( generator: &mut Generator, text: &str, speaker_id: u32, temperature: f64, top_k: usize,
csm-cli/benchmark.rs:15
↓ 2 callersMethodgenerate_stream
( &'a mut self, text: &'a str, speaker_id: u32, max_audio_len_ms: f32,
csm-core/lib.rs:260
↓ 2 callersMethodget_or_create_causal_mask
( &mut self, tgt_len: usize, seqlen_offset: usize, )
csm-core/csm_quantized_impl.rs:491
↓ 2 callersMethodget_or_create_causal_mask
( &mut self, tgt_len: usize, seqlen_offset: usize, )
csm-core/csm_full_impl.rs:488
↓ 2 callersFunctionload_model_weights
(identifier: str, model_name: str, index_file: str)
scripts/match-models.py:22
↓ 2 callersFunctionrms_norm
(eps: f64, vb: &QVarBuilder, tensor_name: &str)
csm-core/csm_quantized_impl.rs:130
↓ 1 callersMethodapply_rotary_emb_qkv_interleaved
( &self, q: &Tensor, k: &Tensor, seqlen_offset: usize, )
csm-core/csm_quantized_impl.rs:102
↓ 1 callersMethodapply_rotary_emb_qkv_interleaved
( &self, q: &Tensor, k: &Tensor, seqlen_offset: usize, )
csm-core/csm_full_impl.rs:103
↓ 1 callersMethodapply_rotary_emb_qkv_non_interleaved
( &self, q: &Tensor, k: &Tensor, seqlen_offset: usize, )
csm-core/csm_quantized_impl.rs:116
↓ 1 callersMethodapply_rotary_emb_qkv_non_interleaved
( &self, q: &Tensor, k: &Tensor, seqlen_offset: usize, )
csm-core/csm_full_impl.rs:117
↓ 1 callersMethodaudio_tokens_and_mask
(&self, frame: Vec<u32>)
csm-core/model.rs:95
↓ 1 callersFunctioncalculate_default_inv_freq
(cfg: &LlamaConfig)
csm-core/csm_quantized_impl.rs:57
↓ 1 callersFunctioncalculate_default_inv_freq
(cfg: &LlamaConfig)
csm-core/csm_full_impl.rs:58
↓ 1 callersMethodclear_kv_cache
(&mut self)
csm-core/csm_quantized_impl.rs:304
↓ 1 callersMethodclear_kv_cache
(&mut self)
csm-core/csm_full_impl.rs:280
↓ 1 callersMethodclose
(self)
scripts/quantize.py:120
↓ 1 callersFunctioncompare_by_content
(weights1: dict, weights2: dict, args)
scripts/match-models.py:158
↓ 1 callersFunctioncompare_by_name
Compares models based on matching tensor names (keys).
scripts/match-models.py:94
↓ 1 callersFunctioncreate_wav_header
(sample_rate: u32, num_channels: u16, bits_per_sample: u16)
csm-server/main.rs:268
↓ 1 callersMethodgenerate_frame
( &mut self, tokens: &Tensor, tokens_mask: &Tensor, input_pos: usize,
csm-core/model.rs:82
↓ 1 callersMethodgenerate_to_channel
Synchronous generation that sends audio chunks through a std::sync::mpsc channel. Designed to be called from a blocking thread (e.g. tokio::task::spaw
csm-core/lib.rs:356
↓ 1 callersFunctionload_model_weights
(identifier: str, model_name: str, index_file: str)
scripts/quantize.py:123
↓ 1 callersFunctionmain
()
scripts/show-gguf.py:51
↓ 1 callersFunctionmain
()
scripts/match-models.py:216
↓ 1 callersFunctionmain
()
scripts/quantize.py:285
↓ 1 callersFunctionmain
()
scripts/test-api.py:58
↓ 1 callersFunctionmain
()
scripts/show-safetensors.py:9
↓ 1 callersFunctionprint_results
( total_duration: Duration, total_ttfb: Duration, total_audio_len_s: f64, num_runs: u32, b
csm-cli/benchmark.rs:189
↓ 1 callersFunctionquantize_q4_k
(tensor: torch.Tensor)
scripts/quantize.py:223
↓ 1 callersFunctionquantize_q8_0
(tensor: torch.Tensor)
scripts/quantize.py:194
↓ 1 callersFunctionread_value
(f, value_type)
scripts/show-gguf.py:34
↓ 1 callersFunctionrun
()
csm-cli/main.rs:57
↓ 1 callersFunctiontest_blocking
(client: OpenAI, text: str, output_path: Path)
scripts/test-api.py:8
↓ 1 callersFunctiontest_streaming
(client: OpenAI, text: str, output_path: Path)
scripts/test-api.py:30
↓ 1 callersMethodtext_tokens_and_mask
(&self, ids: &[u32])
csm-core/model.rs:102
↓ 1 callersMethodtokenize_text
(&self, text: &str, speaker_id: u32, template: Option<&str>)
csm-core/lib.rs:244
↓ 1 callersMethodwarm_kv_cache
Pre-allocate KV cache buffers for all layers so the first forward pass doesn't pay allocation cost.
csm-core/csm_full_impl.rs:481
↓ 1 callersMethodwrite_f32
(self, val: float)
scripts/quantize.py:56
↓ 1 callersMethodwrite_header
(self)
scripts/quantize.py:81
↓ 1 callersMethodwrite_tensor_data
(self)
scripts/quantize.py:115
↓ 1 callersMethodwrite_tensor_info
(self)
scripts/quantize.py:101
Method__init__
(self, path: Path, arch: str)
scripts/quantize.py:43
Methodaudio_tokens_and_mask
(&self, mut frame: Vec<u32>)
csm-core/csm_quantized_impl.rs:761
Methodaudio_tokens_and_mask
(&self, mut frame: Vec<u32>)
csm-core/csm_full_impl.rs:750
Functionauth_middleware
( State(state): State<Arc<AppState>>, request: Request, next: Next, )
csm-server/main.rs:146
Methodconfig
(&self)
csm-core/csm_quantized_impl.rs:796
Methodconfig
(&self)
csm-core/csm_full_impl.rs:785
Functionconvert_tensor_to_bytes
(tensor: candle_core::Tensor)
csm-server/main.rs:250
Functiondefault_max_audio_len_ms
()
csm-server/main.rs:76
Functiondefault_temperature
()
csm-server/main.rs:74
Functiondefault_top_k
()
csm-server/main.rs:75
Methodfree_kv_cache
(&mut self)
csm-core/csm_quantized_impl.rs:309
Methodfree_kv_cache
(&mut self)
csm-core/csm_full_impl.rs:286
Methodfrom_flavor
(flavor: Flavor)
csm-core/csm_quantized_impl.rs:27
Methodfrom_flavor
(flavor: Flavor)
csm-core/csm_full_impl.rs:26
Methodfrom_gguf
( cfg: &Config, p: P, device: &Device, )
csm-core/csm_quantized_impl.rs:551
Methodfrom_vb
(prefix: String, vb: &QVarBuilder)
csm-core/csm_quantized_impl.rs:142
Methodgenerate_frame
( &mut self, tokens: &Tensor, tokens_mask: &Tensor, input_pos: usize,
csm-core/csm_quantized_impl.rs:659
Methodgenerate_frame
( &mut self, tokens: &Tensor, tokens_mask: &Tensor, input_pos: usize,
csm-core/csm_full_impl.rs:647
Functionmain
()
csm-server/main.rs:94
Functionmain
()
csm-cli/main.rs:135
Functionmain
()
csm-cli/benchmark.rs:104
Methodnew
(args: GeneratorArgs)
csm-core/lib.rs:50
Methodnew
(dtype: DType, cfg: &LlamaConfig, dev: &Device)
csm-core/csm_quantized_impl.rs:65
Methodnew
(dtype: DType, cfg: &LlamaConfig, dev: &Device)
csm-core/csm_full_impl.rs:66
Methodnew_full
(config: &Config, vb: VarBuilder, flavor: WeightMapFlavor)
csm-core/model.rs:52
Methodnew_quantized
( config: &Config, path: P, device: &Device, )
csm-core/model.rs:56
Functionparse_dtype
(s: &str)
csm-server/main.rs:84
Functionparse_dtype
(s: &str)
csm-cli/main.rs:48
Functionparse_dtype
(s: &str)
csm-cli/benchmark.rs:94
Methodresolve_model_source
(args: &GeneratorArgs, api: &Api)
csm-core/lib.rs:158
Methodsource_from_path
(path: &Path)
csm-core/lib.rs:236
Functionspeech_handler
( State(state): State<Arc<AppState>>, Json(payload): Json<SpeechRequest>, )
csm-server/main.rs:173
Methodtext_tokens_and_mask
(&self, ids: &[u32])
csm-core/csm_quantized_impl.rs:773
Methodtext_tokens_and_mask
(&self, ids: &[u32])
csm-core/csm_full_impl.rs:762
Methodwarm_kv_cache
Pre-allocate KV cache buffers for all layers.
csm-core/csm_quantized_impl.rs:484
Methodwarm_kv_cache
(&mut self)
csm-core/model.rs:75