pub struct InferenceConfig {
pub models_dir: PathBuf,
pub state_root: PathBuf,
pub device: Option<Device>,
pub generation_model: String,
pub preferred_generation_model: Option<String>,
pub embedding_model: String,
pub preferred_embedding_model: Option<String>,
pub classification_model: String,
pub preferred_classification_model: Option<String>,
}Expand description
Configuration for the inference engine.
Fields§
§models_dir: PathBufWhere to store downloaded models. Defaults to ~/.car/models/
This is a machine-global weight cache, NOT per-daemon state: it stays
shared even when CAR_HOME relocates a daemon. Anything CAR writes
about itself belongs under state_root instead.
state_root: PathBufCAR state root: $CAR_HOME, else ~/.car.
Everything the engine persists about itself — the routing outcome
profiles, the receipt ledger, key-pool stats, the signed-catalog cache,
the discovery cache, the user models.json — hangs off this. Two
daemons with different roots therefore keep separate bookkeeping while
still sharing the multi-gigabyte weights in models_dir. With CAR_HOME
unset this is ~/.car, exactly where all of those files already are.
device: Option<Device>Device override. None = auto-detect.
generation_model: StringDefault model for generation tasks.
preferred_generation_model: Option<String>Optional preferred model override for generation tasks.
embedding_model: StringDefault model for embedding tasks.
preferred_embedding_model: Option<String>Optional preferred model override for embedding tasks.
classification_model: StringDefault model for classification tasks.
preferred_classification_model: Option<String>Optional preferred model override for classification tasks.
Implementations§
Source§impl InferenceConfig
impl InferenceConfig
Sourcepub fn state_models_dir(&self) -> PathBuf
pub fn state_models_dir(&self) -> PathBuf
Engine state that has always lived beside the weights, kept at the same
relative path (models/) but anchored at
state_root: the outcome profiles, the receipt
ledger, key-pool stats, benchmark priors, the discovery cache.
Identical to models_dir whenever CAR_HOME is
unset — which is why no existing install’s files move — and a separate,
per-daemon directory once it is set.
Trait Implementations§
Source§impl Clone for InferenceConfig
impl Clone for InferenceConfig
Source§fn clone(&self) -> InferenceConfig
fn clone(&self) -> InferenceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InferenceConfig
impl Debug for InferenceConfig
Auto Trait Implementations§
impl Freeze for InferenceConfig
impl RefUnwindSafe for InferenceConfig
impl Send for InferenceConfig
impl Sync for InferenceConfig
impl Unpin for InferenceConfig
impl UnsafeUnpin for InferenceConfig
impl UnwindSafe for InferenceConfig
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> 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> ⓘ
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 more