pub struct ReferencedWeightBytes {
pub inline: u64,
pub external: u64,
}Expand description
Bytes of initializer payload the graph actually references, split into inline (inside the protobuf) and external (in sibling data files).
This exists because a model’s on-disk size is only an upper bound on its
weights. An external-data file may contain regions no initializer points at
— most commonly when a re-export appends fresh tensors and never truncates
the original, leaving an orphaned prefix. qwen14b-zp is exactly 50% such
dead space, which made the runtime believe it had 2.00x more weights than it
does and skewed every budget and residency decision derived from that number
(#853).
Parses only the graph protobuf. It never opens, maps, or reads the external
data files, so it stays cheap enough for the load-time budget path: the
.onnx is typically a few MB even when the weights are tens of GB.
Initializers with an explicit length contribute that; external ones
without a declared length fall back to the geometry implied by their shape
and dtype, which is what [resolve_initializer] would use.
Fields§
§inline: u64§external: u64Implementations§
Trait Implementations§
Source§impl Clone for ReferencedWeightBytes
impl Clone for ReferencedWeightBytes
Source§fn clone(&self) -> ReferencedWeightBytes
fn clone(&self) -> ReferencedWeightBytes
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReferencedWeightBytes
Source§impl Debug for ReferencedWeightBytes
impl Debug for ReferencedWeightBytes
Source§impl Default for ReferencedWeightBytes
impl Default for ReferencedWeightBytes
Source§fn default() -> ReferencedWeightBytes
fn default() -> ReferencedWeightBytes
impl Eq for ReferencedWeightBytes
Source§impl PartialEq for ReferencedWeightBytes
impl PartialEq for ReferencedWeightBytes
impl StructuralPartialEq for ReferencedWeightBytes
Auto Trait Implementations§
impl Freeze for ReferencedWeightBytes
impl RefUnwindSafe for ReferencedWeightBytes
impl Send for ReferencedWeightBytes
impl Sync for ReferencedWeightBytes
impl Unpin for ReferencedWeightBytes
impl UnsafeUnpin for ReferencedWeightBytes
impl UnwindSafe for ReferencedWeightBytes
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.