pub struct StreamingConversionPlan { /* private fields */ }Expand description
Metadata, pinned source digest, and per-tensor policy for one bounded conversion.
A real model recipe supplies one TensorConversion for every tensor named by its
WeightsManifest. The plan contains no source payload and no machine-specific packing; it
can therefore be reviewed before a multi-gigabyte conversion opens an output file.
Implementations§
Source§impl StreamingConversionPlan
impl StreamingConversionPlan
Sourcepub fn new(
model_family: impl Into<String>,
source_sha256: impl Into<String>,
) -> Self
pub fn new( model_family: impl Into<String>, source_sha256: impl Into<String>, ) -> Self
Starts a portable conversion plan tied to the expected source SHA-256.
Sourcepub fn license_notice(self, notice: impl Into<String>) -> Self
pub fn license_notice(self, notice: impl Into<String>) -> Self
Sets the required Apache-2.0 attribution and change notice.
Sourcepub fn model_config(self, config: Value) -> Self
pub fn model_config(self, config: Value) -> Self
Records the frozen source model configuration in the artifact directory.
Sourcepub fn quantization_manifest(self, manifest: Value) -> Self
pub fn quantization_manifest(self, manifest: Value) -> Self
Records the reviewed per-tensor quantization recipe in the artifact directory.
Sourcepub fn tensor(self, tensor: TensorConversion) -> Self
pub fn tensor(self, tensor: TensorConversion) -> Self
Adds one explicit source-to-artifact tensor conversion.
Trait Implementations§
Source§impl Clone for StreamingConversionPlan
impl Clone for StreamingConversionPlan
Source§fn clone(&self) -> StreamingConversionPlan
fn clone(&self) -> StreamingConversionPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StreamingConversionPlan
impl RefUnwindSafe for StreamingConversionPlan
impl Send for StreamingConversionPlan
impl Sync for StreamingConversionPlan
impl Unpin for StreamingConversionPlan
impl UnsafeUnpin for StreamingConversionPlan
impl UnwindSafe for StreamingConversionPlan
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
Mutably borrows from an owned value. Read more