pub struct ModelRef { /* private fields */ }Expand description
Reference to a GGUF model artifact.
The compact form is <org>/<repo>:<quant>, for example
LiquidAI/LFM2.5-350M-GGUF:Q4_K_M. A specific filename can be provided as
<org>/<repo>#<filename>. The filename form is useful for models whose GGUF
filenames cannot be derived from the repository name and quantization suffix.
Implementations§
Source§impl ModelRef
impl ModelRef
pub fn parse(value: impl AsRef<str>) -> Result<ModelRef, Error>
pub fn default_model() -> ModelRef
pub fn raw(&self) -> &str
pub fn repo_id(&self) -> &str
pub fn quantization(&self) -> Option<&str>
pub fn filename(&self) -> &str
pub fn revision(&self) -> &str
pub fn download_url(&self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelRef
impl<'de> Deserialize<'de> for ModelRef
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ModelRef
impl Serialize for ModelRef
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for ModelRef
impl StructuralPartialEq for ModelRef
Auto Trait Implementations§
impl Freeze for ModelRef
impl RefUnwindSafe for ModelRef
impl Send for ModelRef
impl Sync for ModelRef
impl Unpin for ModelRef
impl UnsafeUnpin for ModelRef
impl UnwindSafe for ModelRef
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.