MCPcopy Create free account

hub / github.com/evilsocket/cake / functions

Functions2,320 in github.com/evilsocket/cake

↓ 1 callersMethodencode
Encode audio waveform to latent representation. Input: (batch, 1, samples) or (batch, samples) Output: (batch, frames, vae_dim)
cake-core/src/models/vibevoice/vae_encoder.rs:304
↓ 1 callersFunctionencode_clip
Load and run the CLIP-L encoder from a safetensors file. Returns the pooled output (batch_size, 768).
cake-core/src/models/flux/clip_encoder.rs:32
↓ 1 callersMethodencode_dialog_to_prompt
(&self)
cake-core/src/models/llama3/llama.rs:30
↓ 1 callersMethodencode_dialog_to_prompt
Encode the dialog to ChatML prompt format.
cake-core/src/models/common/chatml_history.rs:33
↓ 1 callersMethodencode_streaming
Streaming encode: uses cache for correct context between frames.
cake-core/src/models/vibevoice/vae_encoder.rs:362
↓ 1 callersFunctionencode_t5
Load and run the T5-XXL encoder from a safetensors file. Returns hidden states (batch_size, seq_len, 4096). When `device` is a CUDA GPU with enough V
cake-core/src/models/flux/t5_encoder.rs:46
↓ 1 callersMethodencode_voice_from_samples
Encode voice reference from f32 PCM samples (24kHz mono). Returns: (acoustic_features, connected_embeds)
cake-core/src/models/vibevoice/vibevoice_1_5b.rs:322
↓ 1 callersMethodencode_voice_reference
Encode voice reference audio tensor to scaled acoustic features. Returns: (acoustic_features, connected_embeds)
cake-core/src/models/vibevoice/vibevoice_1_5b.rs:330
↓ 1 callersFunctionestimate_layer_size
Estimate average layer size in bytes by summing safetensors shard file sizes and dividing by number of layers.
cake-core/src/cake/sharding/api/ui.rs:306
↓ 1 callersMethodestimate_layer_vram
(&self, on_disk_bytes: u64, dtype_bytes: u64)
cake-core/src/utils/mod.rs:96
↓ 1 callersFunctionexaone4_config
()
cake-core/benches/bench_blocks.rs:24
↓ 1 callersFunctionextract_open_think
Extract the text inside an open (unclosed) `<think>` block, if any. Returns empty string if there's no open think block.
cake-cli/src/chat.rs:277
↓ 1 callersMethodf8e4m3_to_f32
(&self, x: &Tensor)
cake-core/src/backends/cpu/mod.rs:314
↓ 1 callersFunctionfetch_topology
(client: &Client, server: &str)
cake-cli/src/chat.rs:866
↓ 1 callersFunctionflatten_fm_key
Remap fm_decoder.encoders.{stack}.layers.{layer}.* to fm_decoder.layers.{flat}.* Also handle fm_decoder.encoders.{stack}.encoder.layers.{layer}.*
scripts/convert_luxtts.py:24
↓ 1 callersFunctionflux2_klein_transformer_config
FLUX.2-klein transformer configuration. Values derived from `transformer/config.json` of `black-forest-labs/FLUX.2-klein-4B`.
cake-core/src/models/flux/config.rs:89
↓ 1 callersFunctionflux2_klein_vae_config
FLUX.2-klein VAE configuration. Values from `vae/config.json` — uses KL autoencoder with 32 latent channels.
cake-core/src/models/flux/config.rs:109
↓ 1 callersFunctionflux_fp8_linear_b
(_in_d: usize, _out_d: usize, bias: bool, vb: VarBuilder)
cake-core/src/models/flux/flux1_model.rs:61
↓ 1 callersMethodforward
(&self, _: &Tensor, _: usize, _: usize, _: &mut Context)
cake-core/src/cake/sharding/client.rs:140
↓ 1 callersMethodforward
( &self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut Con
cake-core/src/models/qwen3_moe/block.rs:83
↓ 1 callersMethodforward
( &self, x: &Tensor, index_pos: usize, // used as real_len for attention mask
cake-core/src/models/flux/text_encoder.rs:270
↓ 1 callersMethodforward
Compute (cos, sin) PE for given position IDs [S, num_axes].
cake-core/src/models/flux/flux2_model.rs:58
↓ 1 callersMethodforward
( &self, x: &Tensor, _index_pos: usize, _block_idx: usize, _ctx: &mut
cake-core/src/models/flux/vae.rs:43
↓ 1 callersMethodforward
( &self, x: &Tensor, _index_pos: usize, _block_idx: usize, _ctx: &mut
cake-core/src/models/luxtts/block.rs:100
↓ 1 callersMethodforward
( &self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut Con
cake-core/src/models/exaone4/block.rs:90
↓ 1 callersMethodforward
( &self, x: &Tensor, _index_pos: usize, _block_idx: usize, ctx: &mut C
cake-core/src/models/sd/unet.rs:43
↓ 1 callersMethodforward
( &self, x: &Tensor, _index_pos: usize, _block_idx: usize, _ctx: &mut
cake-core/src/models/sd/clip.rs:63
↓ 1 callersMethodforward
( &self, x: &Tensor, _index_pos: usize, _block_idx: usize, ctx: &mut C
cake-core/src/models/sd/vae.rs:43
↓ 1 callersMethodforward
( &self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut Con
cake-core/src/models/qwen3_5/block.rs:104
↓ 1 callersMethodforward
Map acoustic VAE latent (batch, vae_dim) → LLM hidden (batch, hidden).
cake-core/src/models/vibevoice/acoustic_connector.rs:36
↓ 1 callersMethodforward
( &self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut Con
cake-core/src/models/gemma3/block.rs:103
↓ 1 callersMethodforward
Forward pass through all blocks.
cake-core/src/models/common/text_model.rs:266
↓ 1 callersMethodforward
( &self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut Con
cake-core/src/models/olmo2/block.rs:67
↓ 1 callersMethodforward
( &self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut Con
cake-core/src/models/qwen3_5_moe/block.rs:147
↓ 1 callersMethodforward_batch
( &mut self, x: &candle_core::Tensor, batch: Vec<(String, usize, usize)>, ctx:
cake-core/src/models/flux/flux1.rs:85
↓ 1 callersMethodforward_batched_fast_path
Only used when the provider is StackedResidentProvider (all experts in RAM).
cake-core/src/models/qwen3_moe/moe.rs:261
↓ 1 callersMethodforward_cached
( &self, x: &Tensor, cache: &mut super::vae_decoder::StreamingConvCache, )
cake-core/src/models/vibevoice/vae_encoder.rs:78
↓ 1 callersMethodforward_cached
Forward with streaming cache: uses cached context instead of zero-padding.
cake-core/src/models/vibevoice/vae_decoder.rs:159
↓ 1 callersMethodforward_fast
Optimized forward using pre-computed timestep embedding and projected condition. Caches silu(cond) across blocks (saves 4 silu kernels per step).
cake-core/src/models/vibevoice/prediction_head.rs:255
↓ 1 callersMethodforward_mut
( &mut self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut
cake-core/src/models/flux/flux1_model.rs:975
↓ 1 callersMethodforward_mut
( &mut self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut
cake-core/src/models/flux/transformer.rs:54
↓ 1 callersMethodforward_mut
( &mut self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut
cake-core/src/models/sd/unet.rs:66
↓ 1 callersMethodforward_mut
( &mut self, x: &Tensor, index_pos: usize, block_idx: usize, ctx: &mut
cake-core/src/models/common/transformer.rs:137
↓ 1 callersMethodforward_with_mask
attn_mask: optional (1, seq) tensor with 1 for real tokens, 0 for padding
cake-core/src/models/flux/text_encoder.rs:89
↓ 1 callersMethodgate_up_proj
Fused gate+up: (num_experts, 2*intermediate_size, hidden_size)
cake-core/src/models/common/expert_provider.rs:84
↓ 1 callersFunctiongemma3_config
()
cake-core/benches/bench_blocks.rs:6
↓ 1 callersMethodgenerate_audio
(&mut self, args: &AudioGenerationArgs)
cake-core/src/cake/sharding/master.rs:184
↓ 1 callersMethodgenerate_audio
(&mut self, _args: &AudioGenerationArgs)
cake-core/src/cake/sharding/api/test_helpers.rs:221
↓ 1 callersFunctiongenerate_image
( state: web::Data<Arc<RwLock<Master<M>>>>, req: HttpRequest, image_request: web::Json<ImageReques
cake-core/src/cake/sharding/api/image.rs:45
↓ 1 callersMethodgenerate_image
(&mut self, args: ImageGenerationArgs, callback: F)
cake-core/src/cake/sharding/master.rs:173
↓ 1 callersMethodgenerate_speech
Run the full TTS pipeline: text -> phonemes -> mel -> waveform.
cake-core/src/models/luxtts/model.rs:371
↓ 1 callersFunctiongenerate_text_blocking
( state: web::Data<Arc<RwLock<Master<M>>>>, request: ChatRequest, )
cake-core/src/cake/sharding/api/text.rs:121
↓ 1 callersFunctiongenerate_text_stream
( state: web::Data<Arc<RwLock<Master<M>>>>, request: ChatRequest, )
cake-core/src/cake/sharding/api/text.rs:182
↓ 1 callersMethodgetWorkerStatus
cake-mobile-app/shared/src/commonMain/kotlin/com/evilsocket/cake/WorkerBridge.kt:6
↓ 1 callersFunctionget_worker_status
()
cake-mobile/src/lib.rs:67
↓ 1 callersFunctiongguf_name_to_hf
Map a GGUF tensor name to the HuggingFace convention. GGUF uses `blk.{N}.attn_q.weight` style; HF uses `model.layers.{N}.self_attn.q_proj.weight` sty
cake-core/src/utils/gguf.rs:26
↓ 1 callersMethodgoodbye
clear worker kv cache
cake-core/src/cake/sharding/master.rs:100
↓ 1 callersFunctiongptq_group_size
Read the GPTQ group_size from config.json (defaults to 128).
cake-core/src/utils/gptq.rs:69
↓ 1 callersMethodgpu_gemm
( &self, buf_a: &MappedBuffer, buf_b: &MappedBuffer, m: usize, k: usiz
cake-core/src/backends/vulkan/mod.rs:944
↓ 1 callersMethodgpu_gemv
( &self, buf_x: &MappedBuffer, buf_w: &MappedBuffer, buf_w_f16: Option<&Arc<Ma
cake-core/src/backends/vulkan/mod.rs:918
↓ 1 callersMethodgpu_matmul
( &self, buf_a: &MappedBuffer, buf_b: &MappedBuffer, buf_b_f16: Option<&Arc<Ma
cake-core/src/backends/vulkan/mod.rs:970
↓ 1 callersFunctiongroup_norm
(bencher: divan::Bencher, channels: usize)
cake-core/benches/bench_backend_ops.rs:196
↓ 1 callersMethodhas_tensor
(&self, name: &str)
cake-core/src/utils/tensor_storage.rs:572
↓ 1 callersFunctionhas_valid_model_cache
Check whether a cache directory contains valid model data for the given layers. For sharded models, verifies that the cached index's weight_map refer
cake-core/src/cake/sharding/mod.rs:768
↓ 1 callersFunctionhf_cache_dir
Return the HuggingFace hub cache directory if it exists.
cake-core/src/utils/models.rs:224
↓ 1 callersFunctioninit_logging
()
cake-mobile/src/lib.rs:136
↓ 1 callersMethodinto_config
(self)
cake-core/src/models/qwen3/config.rs:55
↓ 1 callersMethodinto_config
Return a generalized Config object.
cake-core/src/models/qwen2/config.rs:69
↓ 1 callersMethodinto_config
(self)
cake-core/src/models/mistral/config.rs:56
↓ 1 callersMethodinto_config
(self)
cake-core/src/models/exaone4/config.rs:73
↓ 1 callersMethodinto_config
Return a generalized Config object.
cake-core/src/models/llama3/config.rs:61
↓ 1 callersMethodinto_config
Return a generalized Config object.
cake-core/src/models/qwen3_5/config.rs:93
↓ 1 callersMethodinto_config
Convert the LLM backbone config to cake's common Config.
cake-core/src/models/vibevoice/config_1_5b.rs:63
↓ 1 callersMethodinto_config
(self)
cake-core/src/models/gemma3/config.rs:92
↓ 1 callersMethodis_eos
Check if the given token ID is an EOS token.
cake-core/src/models/common/config.rs:13
↓ 1 callersFunctionis_fp8_quantized
Check whether a model uses FP8 block-wise quantization by looking at its config.
cake-core/src/utils/fp8.rs:20
↓ 1 callersFunctionis_gguf_file
Check whether a path points to a GGUF file.
cake-core/src/utils/gguf.rs:18
↓ 1 callersMethodis_global_layer
Returns true if `layer_idx` is a global (no-RoPE, full context) layer. Default: every 4th layer (0-indexed: 3, 7, 11, ...) is global.
cake-core/src/models/exaone4/config.rs:68
↓ 1 callersMethodis_global_layer
Returns true if `layer_idx` is a global (full attention) layer.
cake-core/src/models/gemma3/config.rs:78
↓ 1 callersFunctionis_gptq_quantized
Check whether a model uses 4-bit quantization by inspecting its config.json. Detects both standard GPTQ (`quant_method: "gptq"`) and affine 4-bit (`mo
cake-core/src/utils/gptq.rs:33
↓ 1 callersMethodistft
Inverse STFT matching Vocos's ISTFT implementation. Uses irfft semantics (half-spectrum input, norm="backward") with "same" padding.
cake-core/src/models/luxtts/vocos.rs:309
↓ 1 callersMethodlayer_name
(&self)
cake-core/src/models/common/transformer.rs:147
↓ 1 callersFunctionlayer_norm_forward
Manual layer norm (no learned params, eps=1e-6). Always computes and returns in F32.
cake-core/src/models/flux/flux2_model.rs:428
↓ 1 callersFunctionlayers_to_range
(layers: &[String])
cake-mobile/src/lib.rs:213
↓ 1 callersMethodlm_head
Compute logits from hidden states. Handles both 2D and 3D inputs.
cake-core/src/models/vibevoice/vibevoice_1_5b.rs:313
↓ 1 callersMethodload
(_: String, _: &Context)
cake-core/src/cake/sharding/client.rs:136
↓ 1 callersFunctionload_gguf_var_builder
Load a GGUF file and create a VarBuilder that serves dequantized tensors. All quantized tensors are dequantized to F32 on CPU at load time, then cast
cake-core/src/utils/gguf.rs:251
↓ 1 callersFunctionload_gptq_var_builder
Create a VarBuilder that transparently dequantizes GPTQ 4-bit weights. # Safety Inherits the mmap safety requirements from `MmapedSafetensors`.
cake-core/src/utils/gptq.rs:288
↓ 1 callersFunctionload_t5_tokenizer
Load T5 tokenizer — downloads tokenizer.json from HuggingFace.
cake-core/src/models/flux/flux1.rs:411
↓ 1 callersFunctionload_tokenizer
Load the tokenizer and resolve EOS token ID(s). `default_eos_token` is the model-specific fallback (e.g. "<|eot_id|>" for LLaMA, "<|endoftext|>" for Q
cake-core/src/models/common/text_model.rs:19
↓ 1 callersFunctionmain
()
scripts/convert_luxtts.py:136
↓ 1 callersFunctionmake_gptq_expert_safetensors
Create GPTQ-quantized expert tensors in safetensors format. Each expert has qweight (int32 packed), scales (f16), qzeros (int32 packed).
cake-core/tests/unit_tests/test_flash_moe.rs:402
↓ 1 callersFunctionmake_individual_provider
(n: usize, i: usize, h: usize)
cake-core/benches/bench_expert_provider.rs:18
↓ 1 callersMethodmake_pos_emb
Create CompactRelPositionalEncoding [1, 2*seq-1, pos_dim].
cake-core/src/models/luxtts/text_encoder.rs:97
↓ 1 callersMethodmake_pos_emb
Create CompactRelPositionalEncoding [1, 2*seq-1, pos_dim]. Matches the Python implementation: log compression -> atan -> Fourier.
cake-core/src/models/luxtts/block.rs:146
↓ 1 callersFunctionmake_prediction_head_vb
()
cake-core/src/models/vibevoice/prediction_head.rs:292
↓ 1 callersFunctionmake_sharded_expert_safetensors
Create a multi-shard safetensors model directory.
cake-core/benches/bench_flash_moe.rs:54
↓ 1 callersFunctionmake_vb_moe
Build VarBuilder for MoE (Qwen3 MoE style: gate + stacked expert weights).
cake-core/benches/bench_helpers.rs:397
↓ 1 callersFunctionmake_vb_qwen3_5_full
Build VarBuilder for a Qwen3_5 full attention block.
cake-core/benches/bench_helpers.rs:546
↓ 1 callersFunctionmake_vb_qwen3_5_moe
Build VarBuilder for Qwen3.5 MoE (per-expert linear + shared expert + sigmoid gate).
cake-core/benches/bench_helpers.rs:423
← previousnext →501–600 of 2,320, ranked by callers