(vb: VarBuilder, backend: Arc<dyn ComputeBackend>)
| 22 | |
| 23 | impl 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. |
nothing calls this directly
no test coverage detected