pub struct InferenceConfig {
pub backend: Backend,
pub model_path: String,
pub n_gpu_layers: i32,
pub n_ctx: u32,
pub app_name: String,
pub explicit_dll_path: Option<PathBuf>,
pub dll_version: Option<String>,
pub cache_dir: Option<PathBuf>,
pub chat_template: Option<String>,
}Expand description
Configuration for loading a model.
Fields§
§backend: BackendCompute backend.
model_path: StringPath to the GGUF model file.
n_gpu_layers: i32Number of layers to offload to GPU (-1 = all).
n_ctx: u32Context window size in tokens (default for contexts created from this engine).
app_name: StringApplication name (used for DLL cache directory).
explicit_dll_path: Option<PathBuf>Explicit DLL path (skips auto-download).
dll_version: Option<String>DLL version tag to download.
cache_dir: Option<PathBuf>DLL cache directory.
chat_template: Option<String>Optional chat template (Jinja). If not provided, uses model metadata.
Trait Implementations§
Source§impl Clone for InferenceConfig
impl Clone for InferenceConfig
Source§fn clone(&self) -> InferenceConfig
fn clone(&self) -> InferenceConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 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
Mutably borrows from an owned value. Read more