Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/evilsocket/cake
/ functions
Functions
2,320 in github.com/evilsocket/cake
⨍
Functions
2,320
◇
Types & classes
325
↓ 288 callers
Method
clone
(&self)
cake-core/src/utils/fp8.rs:173
↓ 269 callers
Method
clone
(&self)
cake-core/src/models/common/disk_expert_provider.rs:720
↓ 219 callers
Method
get
( &self, filename: Option<String>, version: StableDiffusionVersion, use_f16: b
cake-core/src/models/sd/sd.rs:30
↓ 208 callers
Function
make_tensor
Create a deterministic F32 tensor on CPU from a seed.
cake-core/tests/unit_tests/helpers.rs:75
↓ 188 callers
Method
dtype
(&self)
cake-core/src/utils/split.rs:38
↓ 180 callers
Method
push
(&mut self, msg: Message)
cake-core/src/models/phi4/history.rs:17
↓ 162 callers
Function
make_tensor
Create a deterministic F32 tensor on CPU from a seed.
cake-core/benches/bench_helpers.rs:124
↓ 121 callers
Method
shape
(&self)
cake-core/src/utils/split.rs:42
↓ 85 callers
Method
forward
Forward pass: dequantizes weight if needed, computes matmul in weight dtype. The cached weight is already transposed and contiguous for optimal matmul
cake-core/src/utils/fp8.rs:232
↓ 85 callers
Method
linear_forward
(&self, x: &Tensor, weight: &Tensor, bias: Option<&Tensor>)
cake-core/src/backends/metal/mod.rs:794
↓ 78 callers
Method
matmul
(&self, a: &Tensor, b: &Tensor)
cake-core/src/backends/rocm/mod.rs:365
↓ 77 callers
Method
device
(&self)
cake-core/src/backends/cpu/mod.rs:40
↓ 68 callers
Method
get
Download and return the primary file path for this component.
cake-core/src/models/flux/config.rs:35
↓ 62 callers
Method
get
(&self, idx: usize)
cake-core/src/models/vibevoice/vae_decoder.rs:46
↓ 52 callers
Method
forward_mut
( &mut self, _x: &Tensor, _index_pos: usize, _block_idx: usize, _ctx:
cake-core/src/models/mod.rs:361
↓ 48 callers
Function
test_config
Small Config for testing. hidden=64, heads=4 (GQA: 2 kv heads), head_dim=16, intermediate=128.
cake-core/tests/unit_tests/helpers.rs:8
↓ 47 callers
Function
create_backend
Create the appropriate backend for the given device.
cake-core/src/backends/mod.rs:688
↓ 46 callers
Method
rms_norm
(&self, x: &Tensor, weight: &Tensor, eps: f32)
cake-core/src/backends/metal/mod.rs:922
↓ 45 callers
Function
log_mobile
(msg: &str)
cake-mobile/src/lib.rs:119
↓ 45 callers
Method
to_vec
(self)
cake-core/src/utils/tensor_storage.rs:140
↓ 44 callers
Function
backend
()
cake-core/tests/unit_tests/test_backend_ops.rs:6
↓ 42 callers
Method
to_writer
Write a Message with the provided writer.
cake-core/src/cake/sharding/proto/message.rs:363
↓ 41 callers
Method
get_expert
(&self, idx: usize)
cake-core/src/models/common/expert_provider.rs:90
↓ 41 callers
Function
make_gpu_tensor
(shape: &[usize], seed: u64)
cake-core/benches/bench_utils.rs:17
↓ 39 callers
Method
as_slice
(&self)
cake-core/src/utils/tensor_storage.rs:136
↓ 33 callers
Function
make_cache
Create a Cache for testing.
cake-core/tests/unit_tests/helpers.rs:215
↓ 31 callers
Function
cpu_tensor
(shape: &[usize], seed: u64)
cake-core/benches/bench_vulkan.rs:15
↓ 31 callers
Method
get
( &self, s: Shape, name: &str, _h: Init, dtype: DType, dev: &D
cake-core/src/utils/fp8.rs:71
↓ 31 callers
Function
make_context
(cfg: Config, vb: VarBuilder<'static>)
cake-core/tests/unit_tests/test_blocks.rs:24
↓ 29 callers
Function
make_tensor
(shape: &[usize], seed: u64)
cake-core/benches/bench_vibevoice.rs:9
↓ 28 callers
Function
f32_tensor
Helper: create a 1-D F32 tensor from a slice.
cake-core/src/models/common/text_model.rs:537
↓ 27 callers
Method
to_bytes
Serializes the message to raw bytes.
cake-core/src/cake/sharding/proto/message.rs:289
↓ 26 callers
Method
as_ptr
(&self)
cake-core/src/backends/rocm/mod.rs:64
↓ 26 callers
Function
test_config
Small Config for benchmarking. hidden=64, heads=4 (GQA: 2 kv heads), head_dim=16, intermediate=128.
cake-core/benches/bench_helpers.rs:13
↓ 25 callers
Function
make_worker
(gpus: Vec<GpuInfo>)
cake-core/src/cake/sharding/discovery.rs:802
↓ 24 callers
Function
assert_close
(cpu: &Tensor, metal: &Tensor, tol: f32, label: &str)
cake-core/tests/unit_tests/test_backends.rs:164
↓ 23 callers
Function
assert_close
(a: &Tensor, b: &Tensor, tol: f32)
cake-core/tests/unit_tests/test_backend_ops.rs:10
↓ 23 callers
Function
try_metal_backend
()
cake-core/tests/unit_tests/test_backends.rs:155
↓ 22 callers
Function
make_vb_standard_block
Build a VarBuilder for a standard pre-norm block with CausalSelfAttention + MLP. Works for Gemma3, OLMo2, EXAONE4, and Qwen3MoeBlock patterns.
cake-core/tests/unit_tests/test_blocks.rs:51
↓ 22 callers
Method
set
(&mut self, idx: usize, state: Tensor)
cake-core/src/models/vibevoice/vae_decoder.rs:50
↓ 21 callers
Function
compute_layer_assignments
Helper to call DefaultStrategy with concrete workers
cake-core/src/cake/sharding/default.rs:334
↓ 21 callers
Function
pack_tensors
(tensors: Vec<Tensor>, device: &Device)
cake-core/src/models/sd/util.rs:8
↓ 21 callers
Function
rms_norm
(bencher: divan::Bencher, hidden: usize)
cake-core/benches/bench_backend_ops.rs:49
↓ 21 callers
Method
silu
(&self, x: &Tensor)
cake-core/src/backends/cpu/mod.rs:300
↓ 20 callers
Method
device
(&self)
cake-core/src/backends/metal/mod.rs:724
↓ 20 callers
Method
push
(&mut self, msg: Message)
cake-core/src/models/llama3/llama.rs:24
↓ 20 callers
Method
silu_mul
(&self, gate: &Tensor, up: &Tensor)
cake-core/src/backends/cpu/mod.rs:87
↓ 20 callers
Method
to_tensor
Convert the raw tensor in a Tensor allocated on the given device.
cake-core/src/cake/sharding/proto/message.rs:121
↓ 19 callers
Method
device
(&self)
cake-core/src/backends/cuda/mod.rs:30
↓ 19 callers
Function
linear_matched
Linear projection that ensures inputs match weight dtype. This is needed because modulate() returns in the input dtype which might be F32 from layer_n
cake-core/src/models/flux/flux2_model.rs:122
↓ 19 callers
Function
silu
(bencher: divan::Bencher, size: usize)
cake-core/benches/bench_backend_ops.rs:75
↓ 19 callers
Function
unpack_tensors
(tensor: &Tensor)
cake-core/src/models/sd/util.rs:29
↓ 18 callers
Function
backend
()
cake-core/benches/bench_backend_ops.rs:8
↓ 18 callers
Method
load
()
cake-core/src/backends/rocm/ffi.rs:65
↓ 17 callers
Function
create_logits_processor
Create the logit sampling logic from the context.
cake-core/src/models/common/text_model.rs:102
↓ 17 callers
Method
get_node_for_layer
Return the node serving the specified layer, or None if not found.
cake-core/src/cake/sharding/topology.rs:184
↓ 17 callers
Method
get_or_create
( &self, device: &candle_core::MetalDevice, kernel_name: &'static str, )
cake-core/src/backends/metal/mod.rs:62
↓ 17 callers
Method
softmax
(&self, x: &Tensor, dim: usize)
cake-core/src/backends/metal/mod.rs:840
↓ 16 callers
Method
clear
(&mut self)
cake-core/src/models/phi4/history.rs:21
↓ 16 callers
Function
cluster_hash
Compute the first 8 hex chars of SHA-256(cluster_key) for filtering.
cake-core/src/cake/sharding/discovery.rs:75
↓ 16 callers
Method
embedding
Embedding lookup: select rows from weight matrix by token IDs.
cake-core/src/backends/mod.rs:513
↓ 16 callers
Method
get
( &self, s: Shape, name: &str, _h: Init, dtype: DType, dev: &D
cake-core/src/utils/gptq.rs:248
↓ 16 callers
Function
make_test_context
Helper to build a minimal Context for testing create_logits_processor.
cake-core/src/models/common/text_model.rs:688
↓ 15 callers
Function
apply_repeat_penalty_gpu
Apply repeat penalty entirely on GPU to avoid costly GPU↔CPU round-trips. The upstream `candle_transformers::utils::apply_repeat_penalty` copies the
cake-core/src/models/common/text_model.rs:60
↓ 15 callers
Function
make_tensor
(shape: &[usize], seed: u64)
cake-core/src/models/vibevoice/prediction_head.rs:284
↓ 15 callers
Method
parse
cake-mobile-app/shared/src/commonMain/kotlin/com/evilsocket/cake/WorkerStatusInfo.kt:20
↓ 14 callers
Method
dispatch_compute
Core dispatch: bind pipeline, bind buffers, dispatch workgroups, fence wait, read output.
cake-core/src/backends/vulkan/mod.rs:692
↓ 14 callers
Method
encode_dialog_to_prompt
(&self)
cake-core/src/models/phi4/history.rs:25
↓ 14 callers
Method
get_unchecked
(&self, name: &str, dtype: DType, _dev: &Device)
cake-core/src/models/vibevoice/vibevoice_1_5b.rs:42
↓ 14 callers
Function
gpu_device
()
cake-core/benches/bench_utils.rs:4
↓ 14 callers
Function
make_tensor
(shape: &[usize], seed: u64)
cake-core/benches/bench_flux.rs:8
↓ 14 callers
Method
rms_norm_channel
(&self, x: &Tensor, weight: &Tensor, eps: f32)
cake-core/src/backends/cpu/mod.rs:133
↓ 13 callers
Method
add_scaled
(&self, a: &Tensor, b: &Tensor, c: &Tensor)
cake-core/src/backends/cpu/mod.rs:264
↓ 13 callers
Method
data
(&self)
cake-core/src/utils/split.rs:46
↓ 13 callers
Function
flux_fp8_linear
Load an Fp8Linear from VarBuilder using get_unchecked (for native-dtype loading).
cake-core/src/models/flux/flux1_model.rs:55
↓ 13 callers
Function
load_rms_norm_weight
Load an RMS norm weight tensor, optionally applying the residual pattern `(1 + weight)`. When `residual` is true (Qwen3.5), the stored weight is treat
cake-core/src/models/common/config.rs:155
↓ 13 callers
Function
make_cache
Create a Cache for benchmarking.
cake-core/benches/bench_helpers.rs:197
↓ 13 callers
Method
process_kv
Process the input k and v by either generating their cache entry or applying a previously cached one.
cake-core/src/models/common/cache.rs:163
↓ 13 callers
Method
push
(&mut self, msg: Message)
cake-core/src/models/gemma3/history.rs:28
↓ 13 callers
Method
take_slot
Take the next cache slot, returning (index, is_first_use).
cake-core/src/models/vibevoice/vae_decoder.rs:36
↓ 12 callers
Method
conv1d
( &self, x: &Tensor, weight: &Tensor, bias: Option<&Tensor>, padding:
cake-core/src/backends/mod.rs:610
↓ 12 callers
Function
encode_wav_bytes
Encode PCM f32 samples as WAV bytes (16-bit PCM, mono).
cake-core/src/utils/wav.rs:11
↓ 12 callers
Function
make_context
Build a minimal Context from a Config + VarBuilder.
cake-core/benches/bench_helpers.rs:377
↓ 12 callers
Function
make_f16_tensor
(shape: &[usize])
cake-core/src/cake/sharding/proto/message.rs:408
↓ 12 callers
Function
make_node
(host: &str, vram_gb: f64, tflops: f64, description: &str)
cake-core/tests/unit_tests/test_topology.rs:156
↓ 12 callers
Function
make_tensor
(shape: &[usize], seed: u64)
cake-core/src/models/qwen3_5_moe/moe.rs:382
↓ 12 callers
Function
make_tensor
(shape: &[usize], seed: u64)
cake-core/tests/unit_tests/test_flux.rs:10
↓ 12 callers
Method
prepare_prompt
Tokenize a prompt string and set up token state for generation.
cake-core/src/models/common/text_model.rs:371
↓ 12 callers
Method
to_writer_buf
Write a Message, reusing `buf` to avoid per-message heap allocation.
cake-core/src/cake/sharding/proto/message.rs:372
↓ 12 callers
Function
update_status
(stage: &str, message: &str, progress: f64)
cake-mobile/src/lib.rs:37
↓ 11 callers
Method
preprocess_linear_weight
(&self, weight: &Tensor)
cake-core/src/backends/rocm/mod.rs:359
↓ 11 callers
Method
run
(mut self)
cake-core/src/cake/sharding/master.rs:26
↓ 11 callers
Function
timestep_embedding
(t: &Tensor, dim: usize, dtype: DType)
cake-core/src/models/flux/flux1_model.rs:346
↓ 10 callers
Method
addr
(&self)
cake-core/tests/protocol.rs:58
↓ 10 callers
Method
as_mut_ptr
(&self)
cake-core/src/backends/rocm/mod.rs:65
↓ 10 callers
Function
cpu_backend
()
cake-core/tests/unit_tests/test_attention.rs:7
↓ 10 callers
Function
encode_packet
(payload: &[u8])
cake-core/src/cake/sharding/discovery.rs:393
↓ 10 callers
Method
gelu
(&self, x: &Tensor)
cake-core/src/backends/metal/mod.rs:828
↓ 10 callers
Method
get_or_upload
(&self, tensor: &Tensor)
cake-core/src/backends/vulkan/mod.rs:593
↓ 10 callers
Method
handle_one
Handle exactly one client connection, then return.
cake-core/tests/protocol.rs:63
next →
1–100 of 2,320, ranked by callers