pub struct SafeTensorsLoader;Expand description
Parses SafeTensors (Hugging Face) model files. See the module docs for the format and its dtype coverage.
Trait Implementations§
Source§impl ModelLoader for SafeTensorsLoader
impl ModelLoader for SafeTensorsLoader
Source§fn format_name(&self) -> &'static str
fn format_name(&self) -> &'static str
A short, lowercase name for the format this loader parses — always
one of the
format strings this loader’s errors carry.Source§fn probe(&self, bytes: &[u8]) -> bool
fn probe(&self, bytes: &[u8]) -> bool
Cheap, non-destructive sniff: does
bytes (the start of the file)
look like this loader’s format? Used by load_model to pick a
loader by content rather than by file extension. Read moreSource§fn load(&self, path: &Path) -> Result<LoadedModel>
fn load(&self, path: &Path) -> Result<LoadedModel>
Parses the file at
path into a LoadedModel.Auto Trait Implementations§
impl Freeze for SafeTensorsLoader
impl RefUnwindSafe for SafeTensorsLoader
impl Send for SafeTensorsLoader
impl Sync for SafeTensorsLoader
impl Unpin for SafeTensorsLoader
impl UnsafeUnpin for SafeTensorsLoader
impl UnwindSafe for SafeTensorsLoader
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