#[repr(u32)]pub enum LlamaContextType {
Default = 0,
Mtp = 1,
}Expand description
A rusty wrapper around llama_context_type.
Variants§
Default = 0
Default context (standard inference).
Mtp = 1
Multi-token-prediction draft context, used as the draft side of
speculative decoding. Pair with crate::mtp::MtpSession.
Trait Implementations§
Source§impl Clone for LlamaContextType
impl Clone for LlamaContextType
Source§fn clone(&self) -> LlamaContextType
fn clone(&self) -> LlamaContextType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LlamaContextType
impl Debug for LlamaContextType
Source§impl From<LlamaContextType> for llama_context_type
impl From<LlamaContextType> for llama_context_type
Source§fn from(value: LlamaContextType) -> Self
fn from(value: LlamaContextType) -> Self
Converts to this type from the input type.
Source§impl From<u32> for LlamaContextType
impl From<u32> for LlamaContextType
Source§fn from(value: llama_context_type) -> Self
fn from(value: llama_context_type) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LlamaContextType
impl PartialEq for LlamaContextType
Source§fn eq(&self, other: &LlamaContextType) -> bool
fn eq(&self, other: &LlamaContextType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for LlamaContextType
impl Eq for LlamaContextType
impl StructuralPartialEq for LlamaContextType
Auto Trait Implementations§
impl Freeze for LlamaContextType
impl RefUnwindSafe for LlamaContextType
impl Send for LlamaContextType
impl Sync for LlamaContextType
impl Unpin for LlamaContextType
impl UnsafeUnpin for LlamaContextType
impl UnwindSafe for LlamaContextType
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