pub struct WeightManifest {
pub version: u32,
pub model_id: String,
pub shard_files: Vec<String>,
pub shard_lens: Vec<u64>,
pub tensors: Vec<WeightTensorRecord>,
}Expand description
A staged model’s manifest: the geometry the client needs to reconstruct a
byte-identical WeightStore. Published as length-prefixed JSON right after
the client’s model request. The per-shard (base, rkey) MR handles ride the
verbs handshake separately (see the module doc).
Fields§
§version: u32§model_id: StringThe resolved model id/path the peer staged (echo for the client’s log).
shard_files: Vec<String>Shard file names, shard-indexed. shard_index in each tensor record
indexes this list; the verbs layers vector is per-shard in this order.
shard_lens: Vec<u64>Byte length of each shard file, shard-indexed (parallels shard_files).
tensors: Vec<WeightTensorRecord>Implementations§
Source§impl WeightManifest
impl WeightManifest
pub const VERSION: u32 = 1
Sourcepub fn num_shards(&self) -> usize
pub fn num_shards(&self) -> usize
Number of shard files (== the per-rail layers MR count the peer
publishes and the client validates against).
Sourcepub fn total_shard_bytes(&self) -> u64
pub fn total_shard_bytes(&self) -> u64
Total registered bytes across all shards (the whole-file MRs) — the
figure charged against the blade CommitLedger once per staged model.
Trait Implementations§
Source§impl Clone for WeightManifest
impl Clone for WeightManifest
Source§fn clone(&self) -> WeightManifest
fn clone(&self) -> WeightManifest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WeightManifest
impl Debug for WeightManifest
Source§impl<'de> Deserialize<'de> for WeightManifest
impl<'de> Deserialize<'de> for WeightManifest
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 WeightManifest
impl PartialEq for WeightManifest
Source§impl Serialize for WeightManifest
impl Serialize for WeightManifest
impl Eq for WeightManifest
impl StructuralPartialEq for WeightManifest
Auto Trait Implementations§
impl Freeze for WeightManifest
impl RefUnwindSafe for WeightManifest
impl Send for WeightManifest
impl Sync for WeightManifest
impl Unpin for WeightManifest
impl UnwindSafe for WeightManifest
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.