pub struct RawTensor {
pub source_name: String,
pub dims: Vec<usize>,
pub dtype: DType,
pub ggml_type: u32,
pub bytes: Vec<u8>,
pub stacked_slice: bool,
}Expand description
Owned raw tensor buffer: bytes + shape + dtype, no references into
the source GgufLayout.
This is an analysis result type, not a tensor abstraction:
expert extraction may slice a stacked GGUF tensor, so the result
holds expert-local dims plus owned bytes. It does not replace
TensorInfo /
Checkpoint::tensor_bytes,
which remain the core checkpoint contract. Its dtype/ggml_type
fields make this extraction path GGUF-specific; any normalized
cross-format expert tensor type is planned v0.4 work.
Fields§
§source_name: StringSource tensor name (e.g. "blk.0.ffn_gate_exps.weight").
dims: Vec<usize>Dimensions of this expert’s slice (expert dimension stripped).
dtype: DTypeDtype preserved from the GGUF directory.
ggml_type: u32Raw ggml_type code (useful for round-tripping unknown quants).
bytes: Vec<u8>Raw byte payload — length equals the byte size of one expert’s chunk within a stacked tensor, or the whole tensor if the checkpoint stores one tensor per expert.
stacked_slice: boolTrue if this buffer was sliced from a stacked [n_experts, ...]
tensor; false if the checkpoint stored a dedicated per-expert
tensor.