pub struct TensorEntry {
pub name: String,
pub shape: Vec<u64>,
pub quant_type_id: u32,
pub offset: u64,
pub size_bytes: u64,
}Expand description
A loaded tensor entry — contains metadata only; no weight bytes are held here.
Use load_tensor_metadata to obtain a collection of these, then open the
file and seek to offset to read the actual data.
Fields§
§name: StringTensor name as stored in the GGUF file (e.g. "blk.0.attn_q.weight").
shape: Vec<u64>Shape dimensions (e.g. [4096, 4096]).
quant_type_id: u32Raw GGUF quantisation type ID.
offset: u64Byte offset of this tensor’s data from the start of the tensor data section.
size_bytes: u64Number of bytes occupied by this tensor in the data section.
Implementations§
Source§impl TensorEntry
impl TensorEntry
Sourcepub fn element_count(&self) -> u64
pub fn element_count(&self) -> u64
Total number of elements across all dimensions.
Sourcepub fn quant_name(&self) -> &'static str
pub fn quant_name(&self) -> &'static str
Human-readable name for the quantisation type, or "UNKNOWN".
Sourcepub fn is_known_quant(&self) -> bool
pub fn is_known_quant(&self) -> bool
Returns true when the quantisation type ID is one Pictor recognises.
Trait Implementations§
Source§impl Clone for TensorEntry
impl Clone for TensorEntry
Source§fn clone(&self) -> TensorEntry
fn clone(&self) -> TensorEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TensorEntry
impl RefUnwindSafe for TensorEntry
impl Send for TensorEntry
impl Sync for TensorEntry
impl Unpin for TensorEntry
impl UnsafeUnpin for TensorEntry
impl UnwindSafe for TensorEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more