pub struct ModelPackageBody {
pub name: String,
pub format: ModelFormat,
pub shards: Vec<FileRef>,
pub tokenizer_blake3: Option<String>,
pub tokenizer_path: Option<String>,
pub template_blake3: Option<String>,
pub template_path: Option<String>,
pub source: ModelSource,
pub redistributable: bool,
}Expand description
Body of a kind = "model" manifest.
Fields§
§name: StringModel name (Qwen3-Coder-Next-4bit); the model parameter of
perf.infer.tok_s.
format: ModelFormatLayout.
shards: Vec<FileRef>Weight shards, relative to the model root, sorted by path.
tokenizer_blake3: Option<String>BLAKE3 of the tokenizer file, when the model has one.
tokenizer_path: Option<String>Path of the tokenizer file relative to the model root; present
exactly when tokenizer_blake3 is, so a node that receives only the
signed manifest knows which file to check.
template_blake3: Option<String>BLAKE3 of the chat template (or the config that carries it).
template_path: Option<String>Path of the template file relative to the model root; present
exactly when template_blake3 is.
source: ModelSourceProvenance.
redistributable: boolThe signer states the weights may be handed to other nodes. Absent means false: weights are never shared unless explicitly opted in. It is part of the signed statement.
Implementations§
Source§impl ModelPackageBody
impl ModelPackageBody
Sourcepub fn validate(&self) -> Result<(), ManifestError>
pub fn validate(&self) -> Result<(), ManifestError>
Validate names, paths, hashes and bounds.
Sourcepub fn total_bytes(&self) -> u64
pub fn total_bytes(&self) -> u64
Sum of shard sizes.
Sourcepub fn shard_hashes(&self) -> impl Iterator<Item = &str>
pub fn shard_hashes(&self) -> impl Iterator<Item = &str>
Shard hashes in manifest order.
Trait Implementations§
Source§impl Clone for ModelPackageBody
impl Clone for ModelPackageBody
Source§impl Debug for ModelPackageBody
impl Debug for ModelPackageBody
Source§impl<'de> Deserialize<'de> for ModelPackageBody
impl<'de> Deserialize<'de> for ModelPackageBody
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>,
impl Eq for ModelPackageBody
Source§impl PartialEq for ModelPackageBody
impl PartialEq for ModelPackageBody
Source§impl Serialize for ModelPackageBody
impl Serialize for ModelPackageBody
impl StructuralPartialEq for ModelPackageBody
Auto Trait Implementations§
impl Freeze for ModelPackageBody
impl RefUnwindSafe for ModelPackageBody
impl Send for ModelPackageBody
impl Sync for ModelPackageBody
impl Unpin for ModelPackageBody
impl UnsafeUnpin for ModelPackageBody
impl UnwindSafe for ModelPackageBody
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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