#[non_exhaustive]pub enum LoadError {
BackendInit(String),
ConfigureDevices(String),
Fit(String),
ModelLoad(String),
MmprojInit(String),
InvalidPath(String),
WorkerInitDisconnected,
WorkerNotRunning,
}Expand description
Failure modes returned when constructing or reloading a crate::Client
or crate::EmbeddingClient.
Variants are intentionally coarse-grained: each one maps to a distinct
stage of model bring-up, and the embedded String carries the underlying
llama.cpp / FFI message verbatim for diagnostic purposes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BackendInit(String)
The process-wide llama_cpp_2::llama_backend::LlamaBackend could not
be initialised. This failure is sticky for the lifetime of the
process — typically it means there is no usable GPU device for the
selected backend (e.g. no Vulkan ICD loadable, no CUDA driver, etc.).
ConfigureDevices(String)
Configuring the requested set of GPU devices failed (e.g. an invalid
device list was passed to LlamaModelParams::with_devices).
Fit(String)
Automatic parameter fitting failed — llama.cpp could not find a layer-offload allocation that fits within the supplied memory margins for the given context size.
ModelLoad(String)
Loading the GGUF model file failed (file not found, invalid format, out-of-memory during allocation, etc.).
MmprojInit(String)
Initialising the multimodal projector (mmproj) for a vision model
failed. Only produced when the mtmd feature is enabled and a
mmproj_path was supplied.
InvalidPath(String)
The model path contained an interior NUL byte and could not be
converted to a CString for the FFI call.
WorkerInitDisconnected
The inference worker thread exited before it could report the result of initialisation. This usually means the worker panicked; check the process’s stderr for a backtrace.
WorkerNotRunning
A reload was requested, but the inference worker thread is no longer accepting commands (it has either been shut down or panicked on a previous request).
Trait Implementations§
Source§impl Error for LoadError
impl Error for LoadError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for LoadError
impl RefUnwindSafe for LoadError
impl Send for LoadError
impl Sync for LoadError
impl Unpin for LoadError
impl UnsafeUnpin for LoadError
impl UnwindSafe for LoadError
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
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> 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.