MCPcopy Create free account
hub / github.com/evilsocket/cake / load

Method load

cake-core/src/models/vibevoice/eos_classifier.rs:24–31  ·  view source on GitHub ↗
(vb: VarBuilder, backend: Arc<dyn ComputeBackend>)

Source from the content-addressed store, hash-verified

22
23impl EosClassifier {
24 pub fn load(vb: VarBuilder, backend: Arc<dyn ComputeBackend>) -> Result<Self> {
25 // Weight shapes inferred from safetensors: fc1 + fc2
26 let fc1_weight = vb.pp("fc1").get_unchecked("weight")?;
27 let fc1_bias = Some(vb.pp("fc1").get_unchecked("bias")?);
28 let fc2_weight = vb.pp("fc2").get_unchecked("weight")?;
29 let fc2_bias = Some(vb.pp("fc2").get_unchecked("bias")?);
30 Ok(Self { fc1_weight, fc1_bias, fc2_weight, fc2_bias, backend })
31 }
32
33 /// Predict EOS probability.
34 /// Input: (batch, hidden_size) LLM hidden state.

Callers

nothing calls this directly

Calls 1

get_uncheckedMethod · 0.45

Tested by

no test coverage detected