(
content: &candle_core::quantized::gguf_file::Content,
key: &str,
)
| 311 | } |
| 312 | |
| 313 | fn 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 | |
| 326 | fn get_f32( |
| 327 | content: &candle_core::quantized::gguf_file::Content, |