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

Function get_u32

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

Source from the content-addressed store, hash-verified

311}
312
313fn get_u32(
314 content: &candle_core::quantized::gguf_file::Content,
315 key: &str,
316) -> Option<u32> {
317 use candle_core::quantized::gguf_file::Value;
318 match content.metadata.get(key)? {
319 Value::U32(v) => Some(*v),
320 Value::U64(v) => Some(*v as u32),
321 Value::I32(v) => Some(*v as u32),
322 _ => None,
323 }
324}
325
326fn get_f32(
327 content: &candle_core::quantized::gguf_file::Content,

Callers 1

config_from_ggufFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected