-
Notifications
You must be signed in to change notification settings - Fork 0
Tensor and DType
Raul Montoya Cardenas edited this page Jul 29, 2026
·
2 revisions

Generated with Grok Build: Grok 4.5 · xAI Imagine (/imagine)
src/gguf/tensor.rs
Metadata only — no owned weights. Payload via GgufLayout::tensor_bytes.
Typical fields: name, dims, dtype, ggml_type, n_elements, byte_len, relative_offset, absolute_offset.
| Variant | GGML note |
|---|---|
F32 |
type 0 |
F16 |
type 1 |
BF16 |
type 30 (layout only) |
Q8_0 |
type 8 |
Q4_K / Q5_K / Q6_K
|
k-quants |
IQ3_S |
type 21 (opaque) |
Other(u32) |
catch-all |
Numeric accessors: only F32/F16 have in-crate readers (read_f32_values / read_u16_values style safe APIs — no unsafe slice casts). Everything else stays raw Vec<u8>.
f16_bits_to_f32 — optional bit conversion helper (not a full dequant pipeline).
Last updated: July 29, 2026
Updated by: Grok Build: Grok 4.5
Package tip reference: 07a5558 (main)