pub struct UqffModelConfig {
pub model_id: String,
pub files: Vec<String>,
pub display_name: String,
pub approx_memory: String,
pub chat_template: Option<String>,
}Expand description
Configuration for loading a UQFF model via mistral.rs
UqffTextModelBuilder.
UQFF files store pre-quantised weights and load directly
without the runtime memory spike of in-situ quantisation. model_id points
at the UQFF export — the directory or repository holding the shards
alongside residual.safetensors, config.json, and the tokenizer — and
files identifies the first UQFF shard or explicit UQFF shard files.
Note that model_id is not the original unquantised model repository:
mistral.rs resolves the shards, the residual weights, and the JSON assets by
sibling lookup next to model_id, so pointing it at the source repo fails
with a missing-file error. A UQFF export is self-contained by design.
Fields§
§model_id: StringHuggingFace repository ID or local directory of the UQFF export, e.g.
"mistralrs-community/gemma-4-E4B-it-UQFF".
files: Vec<String>UQFF filename(s) within the repository. For sharded UQFFs, passing the
first shard, e.g. ["q4k-0.uqff"], is enough for mistral.rs to discover
siblings. Numeric and ISQ-name shorthands such as "4" and "q4k" are
also accepted by the underlying loader.
display_name: StringHuman-friendly display name, e.g. "Gemma 4 E4B (UQFF Q4K)".
approx_memory: StringApproximate memory footprint description, e.g. "~2.5 GB (UQFF Q4K)".
chat_template: Option<String>Optional Jinja chat template string. When set, this overrides the template resolved from the base model.
Trait Implementations§
Source§impl Clone for UqffModelConfig
impl Clone for UqffModelConfig
Source§fn clone(&self) -> UqffModelConfig
fn clone(&self) -> UqffModelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for UqffModelConfig
impl<UT> ConvertError<UT> for UqffModelConfig
Source§impl Debug for UqffModelConfig
impl Debug for UqffModelConfig
Source§impl<'de> Deserialize<'de> for UqffModelConfig
impl<'de> Deserialize<'de> for UqffModelConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UqffModelConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UqffModelConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<UT> FfiConverter<UT> for UqffModelConfig
impl<UT> FfiConverter<UT> for UqffModelConfig
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: UqffModelConfig) -> RustBuffer
fn lower(v: UqffModelConfig) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<UqffModelConfig, Error>
fn try_lift(buf: RustBuffer) -> Result<UqffModelConfig, Error>
Source§impl<UT> Lift<UT> for UqffModelConfig
impl<UT> Lift<UT> for UqffModelConfig
type FfiType = <UqffModelConfig as FfiConverter<UT>>::FfiType
fn try_lift( v: <UqffModelConfig as Lift<UT>>::FfiType, ) -> Result<UqffModelConfig, Error>
fn try_read(buf: &mut &[u8]) -> Result<UqffModelConfig, Error>
Source§fn try_lift_from_rust_buffer(v: RustBuffer) -> Result<Self, Error>
fn try_lift_from_rust_buffer(v: RustBuffer) -> Result<Self, Error>
Source§impl<UT> LiftRef<UT> for UqffModelConfig
impl<UT> LiftRef<UT> for UqffModelConfig
type LiftType = UqffModelConfig
Source§impl<UT> LiftReturn<UT> for UqffModelConfig
impl<UT> LiftReturn<UT> for UqffModelConfig
Source§type ReturnType = <UqffModelConfig as Lift<UT>>::FfiType
type ReturnType = <UqffModelConfig as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(
v: <UqffModelConfig as LiftReturn<UT>>::ReturnType,
) -> Result<UqffModelConfig, Error>
fn try_lift_successful_return( v: <UqffModelConfig as LiftReturn<UT>>::ReturnType, ) -> Result<UqffModelConfig, Error>
Source§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
Source§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
Source§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for UqffModelConfig
impl<UT> Lower<UT> for UqffModelConfig
type FfiType = <UqffModelConfig as FfiConverter<UT>>::FfiType
fn lower(obj: UqffModelConfig) -> <UqffModelConfig as Lower<UT>>::FfiType
fn write(obj: UqffModelConfig, buf: &mut Vec<u8>)
Source§fn lower_into_rust_buffer(obj: Self) -> RustBuffer
fn lower_into_rust_buffer(obj: Self) -> RustBuffer
Source§impl<UT> LowerError<UT> for UqffModelConfig
impl<UT> LowerError<UT> for UqffModelConfig
Source§fn lower_error(obj: UqffModelConfig) -> RustBuffer
fn lower_error(obj: UqffModelConfig) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for UqffModelConfig
impl<UT> LowerReturn<UT> for UqffModelConfig
Source§type ReturnType = <UqffModelConfig as Lower<UT>>::FfiType
type ReturnType = <UqffModelConfig as Lower<UT>>::FfiType
Source§fn lower_return(
v: UqffModelConfig,
) -> Result<<UqffModelConfig as LowerReturn<UT>>::ReturnType, RustCallError>
fn lower_return( v: UqffModelConfig, ) -> Result<<UqffModelConfig as LowerReturn<UT>>::ReturnType, RustCallError>
Source§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl Serialize for UqffModelConfig
impl Serialize for UqffModelConfig
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,
Source§impl<UT> TypeId<UT> for UqffModelConfig
impl<UT> TypeId<UT> for UqffModelConfig
Auto Trait Implementations§
impl Freeze for UqffModelConfig
impl RefUnwindSafe for UqffModelConfig
impl Send for UqffModelConfig
impl Sync for UqffModelConfig
impl Unpin for UqffModelConfig
impl UnsafeUnpin for UqffModelConfig
impl UnwindSafe for UqffModelConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for T
impl<T> Downcast for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
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> ⓘ
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> ⓘ
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.