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

Function get_f32

cake-core/src/utils/gguf.rs:326–336  ·  view source on GitHub ↗
(
    content: &candle_core::quantized::gguf_file::Content,
    key: &str,
)

Source from the content-addressed store, hash-verified

324}
325
326fn get_f32(
327 content: &candle_core::quantized::gguf_file::Content,
328 key: &str,
329) -> Option<f32> {
330 use candle_core::quantized::gguf_file::Value;
331 match content.metadata.get(key)? {
332 Value::F32(v) => Some(*v),
333 Value::F64(v) => Some(*v as f32),
334 _ => None,
335 }
336}
337
338#[cfg(test)]
339mod tests {

Callers 1

config_from_ggufFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected