pub enum ProcessError {
ContextMismatch,
TensorTransactionsUnsupported,
IncompleteEntry(i32),
NoKvCacheSlot,
NTokensZero,
Unknown(c_int),
}Expand description
Failed to run a LlamaBatchExt through a
context.
llama_process returns the same codes as llama_decode; the first two
variants are checks this crate makes before calling it.
Variants§
ContextMismatch
The batch was built for a different context. A
LlamaBatchExt captures its
context’s batch size, sequence count and memory module, so it cannot be
handed to another one.
TensorTransactionsUnsupported
The context owns tensor transactions, which are driven by hooks patched
into llama_decode. llama_process does not pass through them, so
running the batch would leave the transactions silently inert — use
LlamaContext::decode with a
llama_batch::LlamaBatch instead.
IncompleteEntry(i32)
An entry in the batch carries no input — neither a token id nor an
input embedding. See
LlamaBatchExt::has_incomplete_entry.
NoKvCacheSlot
No kv cache slot was available.
NTokensZero
The batch held no entries.
Unknown(c_int)
An unknown error occurred.
Trait Implementations§
Source§impl Debug for ProcessError
impl Debug for ProcessError
Source§impl Display for ProcessError
impl Display for ProcessError
impl Eq for ProcessError
Source§impl Error for ProcessError
impl Error for ProcessError
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()
Source§impl From<NonZero<i32>> for ProcessError
Decode an error from llama_process into a ProcessError.
impl From<NonZero<i32>> for ProcessError
Decode an error from llama_process into a ProcessError.