pub struct WeightTensorRecord {
pub name: String,
pub dtype: String,
pub shape: Vec<u64>,
pub offset_in_shard: u64,
pub len: u64,
pub shard_index: u32,
pub extra: bool,
}Expand description
One tensor’s placement inside a staged model, mirroring the safetensors
header exactly: offset_in_shard is the ABSOLUTE file offset (8-byte size
prefix + header + the tensor’s data-section start), len is the raw
contiguous byte count (data_offsets[1] - data_offsets[0]). The client
RDMA-READs exactly [shard_base + offset_in_shard .. + len).
Fields§
§name: StringHuggingFace tensor name — the WeightStore key, verbatim.
dtype: StringRaw safetensors dtype string ("BF16", "F8_E4M3", "I8", …). The
client maps it via WeightDtype::from_safetensors_str — the same closed
mapping the disk loaders use.
shape: Vec<u64>§offset_in_shard: u64Absolute byte offset of the tensor’s first byte within its shard file.
len: u64Tensor byte length (authoritative — do NOT recompute from shape; packed
NVFP4 lengths differ from numel * byte_size).
shard_index: u32Index into WeightManifest::shard_files.
extra: boolTrue for tensors from extra_weights.safetensors (grafted MTP etc.):
loaded with NO expert-skip filter, exactly like the disk loaders.
Trait Implementations§
Source§impl Clone for WeightTensorRecord
impl Clone for WeightTensorRecord
Source§fn clone(&self) -> WeightTensorRecord
fn clone(&self) -> WeightTensorRecord
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WeightTensorRecord
impl Debug for WeightTensorRecord
Source§impl<'de> Deserialize<'de> for WeightTensorRecord
impl<'de> Deserialize<'de> for WeightTensorRecord
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>,
Source§impl PartialEq for WeightTensorRecord
impl PartialEq for WeightTensorRecord
Source§impl Serialize for WeightTensorRecord
impl Serialize for WeightTensorRecord
impl Eq for WeightTensorRecord
impl StructuralPartialEq for WeightTensorRecord
Auto Trait Implementations§
impl Freeze for WeightTensorRecord
impl RefUnwindSafe for WeightTensorRecord
impl Send for WeightTensorRecord
impl Sync for WeightTensorRecord
impl Unpin for WeightTensorRecord
impl UnwindSafe for WeightTensorRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.