pub struct ModelManifest {Show 19 fields
pub model_id: String,
pub name: String,
pub model_type: ModelType,
pub format: ModelFormat,
pub version: String,
pub quantization: Quantization,
pub size_bytes: u64,
pub sha256: String,
pub blob_hash: Option<String>,
pub download_url: Option<String>,
pub requirements: HardwareRequirements,
pub features: Vec<String>,
pub params_billions: Option<f32>,
pub context_length: Option<u32>,
pub classes: Option<Vec<String>>,
pub license: String,
pub source: String,
pub created_at: DateTime<Utc>,
pub metadata: HashMap<String, Value>,
}Expand description
Model manifest containing all metadata for distribution
This is the primary type for announcing and distributing models across Peat.
Fields§
§model_id: StringUnique model identifier (e.g., “ministral-3b-q4km”)
name: StringHuman-readable name
model_type: ModelTypeModel type (detector, LLM, etc.)
format: ModelFormatModel file format
version: StringVersion string (semver or date-based)
quantization: QuantizationQuantization level
size_bytes: u64Model size in bytes
sha256: StringSHA-256 hash for verification
blob_hash: Option<String>iroh-blobs content hash (for P2P distribution)
download_url: Option<String>Direct download URL (fallback if P2P unavailable)
requirements: HardwareRequirementsHardware requirements
features: Vec<String>Model capabilities/features (e.g., “chat”, “vision”, “function_calling”)
params_billions: Option<f32>Number of parameters in billions
context_length: Option<u32>Context length in tokens (for LLMs)
classes: Option<Vec<String>>Supported classes (for detectors)
license: StringLicense identifier (SPDX format)
source: StringSource/attribution
created_at: DateTime<Utc>When this manifest was created
metadata: HashMap<String, Value>Additional metadata
Implementations§
Source§impl ModelManifest
impl ModelManifest
Sourcepub fn new(
model_id: impl Into<String>,
name: impl Into<String>,
model_type: ModelType,
) -> Self
pub fn new( model_id: impl Into<String>, name: impl Into<String>, model_type: ModelType, ) -> Self
Create a new model manifest
Sourcepub fn ministral_3b(quantization: Quantization) -> Self
pub fn ministral_3b(quantization: Quantization) -> Self
Create manifest for Ministral 3B
Sourcepub fn ministral_8b(quantization: Quantization) -> Self
pub fn ministral_8b(quantization: Quantization) -> Self
Create manifest for Ministral 8B
pub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_format(self, format: ModelFormat) -> Self
pub fn with_quantization(self, quantization: Quantization) -> Self
pub fn with_size_bytes(self, size: u64) -> Self
pub fn with_sha256(self, hash: impl Into<String>) -> Self
pub fn with_blob_hash(self, hash: impl Into<String>) -> Self
pub fn with_download_url(self, url: impl Into<String>) -> Self
pub fn with_requirements(self, requirements: HardwareRequirements) -> Self
pub fn with_feature(self, feature: impl Into<String>) -> Self
pub fn with_params(self, billions: f32) -> Self
pub fn with_context_length(self, length: u32) -> Self
pub fn with_classes(self, classes: Vec<String>) -> Self
pub fn with_license(self, license: impl Into<String>) -> Self
pub fn with_source(self, source: impl Into<String>) -> Self
pub fn with_metadata(self, key: impl Into<String>, value: Value) -> Self
Sourcepub fn estimated_vram_mb(&self) -> u32
pub fn estimated_vram_mb(&self) -> u32
Get estimated VRAM usage in MB based on parameters and quantization
Trait Implementations§
Source§impl Clone for ModelManifest
impl Clone for ModelManifest
Source§fn clone(&self) -> ModelManifest
fn clone(&self) -> ModelManifest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModelManifest
impl Debug for ModelManifest
Source§impl<'de> Deserialize<'de> for ModelManifest
impl<'de> Deserialize<'de> for ModelManifest
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 ModelManifest
impl PartialEq for ModelManifest
Source§impl Serialize for ModelManifest
impl Serialize for ModelManifest
impl StructuralPartialEq for ModelManifest
Auto Trait Implementations§
impl Freeze for ModelManifest
impl RefUnwindSafe for ModelManifest
impl Send for ModelManifest
impl Sync for ModelManifest
impl Unpin for ModelManifest
impl UnsafeUnpin for ModelManifest
impl UnwindSafe for ModelManifest
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<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