pub struct ProductionModelSourceBundle { /* private fields */ }Expand description
Non-serialized product source lease shared by tokenizer, model preparation, plan resolution, and the executor. Source roles remain distinct even when all three happen to resolve to one Hugging Face snapshot.
Implementations§
Source§impl ProductionModelSourceBundle
impl ProductionModelSourceBundle
pub fn open( semantic_root: impl AsRef<Path>, tokenizer_root: impl AsRef<Path>, weights: ProductionWeightArtifact, original_sources: OriginalModelSources, ) -> Result<Self>
Sourcepub fn open_colocated_safetensors(model_dir: impl AsRef<Path>) -> Result<Self>
pub fn open_colocated_safetensors(model_dir: impl AsRef<Path>) -> Result<Self>
Compatibility constructor for existing co-located safetensors callers. Product entrypoints should construct explicit role-specific sources.
pub fn semantic_root(&self) -> &Path
pub fn tokenizer_root(&self) -> &Path
pub fn tokenizer_file(&self) -> PathBuf
pub fn weights(&self) -> &ProductionWeightArtifact
pub fn original_sources(&self) -> &OriginalModelSources
pub fn resolved_sources(&self) -> &ResolvedModelSources
pub fn config_json(&self) -> &[u8] ⓘ
pub fn tokenizer_json(&self) -> &[u8] ⓘ
Sourcepub fn weight_config_json(&self) -> Option<&[u8]>
pub fn weight_config_json(&self) -> Option<&[u8]>
Physical checkpoint metadata retained independently from the semantic model config. Quantized safetensors commonly repeat semantic fields in this file, but only physical format metadata may be selected from it.
pub fn tokenizer_config_json(&self) -> Option<&[u8]>
pub fn generation_config_json(&self) -> Option<&[u8]>
pub fn chat_template_json(&self) -> Option<&[u8]>
pub fn chat_template_jinja(&self) -> Option<&[u8]>
pub fn fingerprint( &self, role: ModelArtifactSourceRole, relative_path: &str, ) -> Option<&FileFingerprint>
pub fn weight_payload_bytes(&self) -> Result<u64>
pub fn product_source_identity( &self, requested_model: impl Into<String>, resolved_model: impl Into<String>, template_source_file: &str, template_content: &str, ) -> Result<ProductModelSourceIdentity>
Trait Implementations§
Source§impl Clone for ProductionModelSourceBundle
impl Clone for ProductionModelSourceBundle
Source§fn clone(&self) -> ProductionModelSourceBundle
fn clone(&self) -> ProductionModelSourceBundle
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 ProductionModelSourceBundle
impl RefUnwindSafe for ProductionModelSourceBundle
impl Send for ProductionModelSourceBundle
impl Sync for ProductionModelSourceBundle
impl Unpin for ProductionModelSourceBundle
impl UnsafeUnpin for ProductionModelSourceBundle
impl UnwindSafe for ProductionModelSourceBundle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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