pub enum ModelFormat {
Gguf(GgufInfo),
SafeTensors(SafeTensorsInfo),
Apr(AprInfo),
Onnx(OnnxInfo),
PyTorch,
Unknown,
}Expand description
Detected model format
Variants§
Gguf(GgufInfo)
GGUF format (llama.cpp)
SafeTensors(SafeTensorsInfo)
SafeTensors format (HuggingFace)
Apr(AprInfo)
Aprender native format
Onnx(OnnxInfo)
ONNX format
PyTorch
PyTorch format (limited detection)
Unknown
Unknown format
Implementations§
Source§impl ModelFormat
impl ModelFormat
Sourcepub fn is_quantized(&self) -> bool
pub fn is_quantized(&self) -> bool
Check if format is quantized
Sourcepub fn quantization(&self) -> Option<&str>
pub fn quantization(&self) -> Option<&str>
Get quantization type if available
Sourcepub fn parameters(&self) -> Option<u64>
pub fn parameters(&self) -> Option<u64>
Get parameter count if available
Trait Implementations§
Source§impl Clone for ModelFormat
impl Clone for ModelFormat
Source§fn clone(&self) -> ModelFormat
fn clone(&self) -> ModelFormat
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 moreSource§impl Debug for ModelFormat
impl Debug for ModelFormat
Source§impl<'de> Deserialize<'de> for ModelFormat
impl<'de> Deserialize<'de> for ModelFormat
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ModelFormat
impl PartialEq for ModelFormat
Source§fn eq(&self, other: &ModelFormat) -> bool
fn eq(&self, other: &ModelFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ModelFormat
impl Serialize for ModelFormat
impl StructuralPartialEq for ModelFormat
Auto Trait Implementations§
impl Freeze for ModelFormat
impl RefUnwindSafe for ModelFormat
impl Send for ModelFormat
impl Sync for ModelFormat
impl Unpin for ModelFormat
impl UnsafeUnpin for ModelFormat
impl UnwindSafe for ModelFormat
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