#[repr(u32)]pub enum LlamaLoadMode {
None = 0,
Mmap = 1,
Mlock = 2,
MmapMlock = 3,
DirectIo = 4,
}Expand description
Exact model-file loading strategy exposed by llama.cpp.
The llama_load_mode constants are u32 under the Itanium ABI (Linux/macOS)
but i32 under MSVC, so each discriminant uses as _ to coerce to the
#[repr(u32)] type on every target (matching token_type).
Variants§
None = 0
No memory mapping, locking, or direct I/O.
Mmap = 1
Memory-map model files when supported.
Mlock = 2
Read model files normally and lock loaded pages in memory.
MmapMlock = 3
Memory-map model files and lock mapped pages in memory.
DirectIo = 4
Use direct I/O when supported.
Trait Implementations§
Source§impl Clone for LlamaLoadMode
impl Clone for LlamaLoadMode
Source§fn clone(&self) -> LlamaLoadMode
fn clone(&self) -> LlamaLoadMode
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 moreimpl Copy for LlamaLoadMode
Source§impl Debug for LlamaLoadMode
impl Debug for LlamaLoadMode
impl Eq for LlamaLoadMode
Source§impl PartialEq for LlamaLoadMode
impl PartialEq for LlamaLoadMode
impl StructuralPartialEq for LlamaLoadMode
Auto Trait Implementations§
impl Freeze for LlamaLoadMode
impl RefUnwindSafe for LlamaLoadMode
impl Send for LlamaLoadMode
impl Sync for LlamaLoadMode
impl Unpin for LlamaLoadMode
impl UnsafeUnpin for LlamaLoadMode
impl UnwindSafe for LlamaLoadMode
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