pub struct DirectCheckpoint { /* private fields */ }Expand description
A validated Hugging Face checkpoint prepared for direct runtime loading.
The object owns immutable mappings for every SafeTensors shard. Its GGUF buffer contains metadata and tensor descriptors only; tensor bytes are read from the source mappings on demand.
Implementations§
Source§impl DirectCheckpoint
impl DirectCheckpoint
Sourcepub fn open(source: &Path, buffer_size: usize) -> Result<Self>
pub fn open(source: &Path, buffer_size: usize) -> Result<Self>
Open a checkpoint directory or SafeTensors file and prepare canonical llama.cpp metadata and names.
Sourcepub fn metadata_gguf(&self) -> &[u8] ⓘ
pub fn metadata_gguf(&self) -> &[u8] ⓘ
Metadata-only GGUF consumed by the native model constructor.
Sourcepub fn tensor_count(&self) -> usize
pub fn tensor_count(&self) -> usize
Number of canonical tensors exposed by this checkpoint.
Sourcepub fn imatrix_layout(&self) -> Result<Vec<ImatrixTensorLayout>>
pub fn imatrix_layout(&self) -> Result<Vec<ImatrixTensorLayout>>
Canonical tensor names and importance-vector widths expected by llama.cpp.
Auto Trait Implementations§
impl Freeze for DirectCheckpoint
impl RefUnwindSafe for DirectCheckpoint
impl Send for DirectCheckpoint
impl Sync for DirectCheckpoint
impl Unpin for DirectCheckpoint
impl UnsafeUnpin for DirectCheckpoint
impl UnwindSafe for DirectCheckpoint
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