pub struct TensorEntryMeta {
pub name: String,
pub shape: Vec<usize>,
pub bits: u8,
pub scale_count: usize,
pub scale_bytes: usize,
pub scale_dtype: Option<String>,
pub value_bytes: usize,
}Expand description
Metadata header for a single tensor stored in an archive.
Fields§
§name: StringCanonical parameter name.
shape: Vec<usize>Tensor dimensions.
bits: u8Quantization bit width (1, 2, 4, 8, or 16).
scale_count: usizeNumber of float16 row/tensor scales (0 when bits == 16).
scale_bytes: usizeByte length of the serialized scale section (scale_count * 2).
scale_dtype: Option<String>Scale storage dtype (typically "float16").
value_bytes: usizeByte length of the packed quantized values.
Trait Implementations§
Source§impl Clone for TensorEntryMeta
impl Clone for TensorEntryMeta
Source§impl Debug for TensorEntryMeta
impl Debug for TensorEntryMeta
Source§impl<'de> Deserialize<'de> for TensorEntryMeta
impl<'de> Deserialize<'de> for TensorEntryMeta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TensorEntryMeta
Source§impl PartialEq for TensorEntryMeta
impl PartialEq for TensorEntryMeta
Source§impl Serialize for TensorEntryMeta
impl Serialize for TensorEntryMeta
impl StructuralPartialEq for TensorEntryMeta
Auto Trait Implementations§
impl Freeze for TensorEntryMeta
impl RefUnwindSafe for TensorEntryMeta
impl Send for TensorEntryMeta
impl Sync for TensorEntryMeta
impl Unpin for TensorEntryMeta
impl UnsafeUnpin for TensorEntryMeta
impl UnwindSafe for TensorEntryMeta
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