pub struct PleNvmeReader { /* private fields */ }Implementations§
Source§impl PleNvmeReader
impl PleNvmeReader
Sourcepub fn open_from_native_descriptor(
descriptor: &Qwen4ExpNativeDescriptor,
) -> Result<Self, PleNvmeError>
pub fn open_from_native_descriptor( descriptor: &Qwen4ExpNativeDescriptor, ) -> Result<Self, PleNvmeError>
Open the extracted PLE payload from the .hmc contract. This file is
deliberately a raw C:-resident table: its byte zero is the PLE tensor’s
first byte, so decode never seeks through or maps the E:-resident GGUF.
pub fn open_from_index( path: &Path, index: &GgufTensorIndex, ) -> Result<Self, PleNvmeError>
pub fn open( path: &Path, tensor_data_start: u64, info: GgufTensorInfo, ) -> Result<Self, PleNvmeError>
Methods from Deref<Target = PleNvmeReader>§
pub fn io_stats(&self) -> PleIoStats
pub fn io_stats(&self) -> PleIoStats
Cumulative physical I/O performed by this reader.
pub fn raw_row_bytes(&self) -> usize
pub fn raw_row_bytes(&self) -> usize
Bytes per row.
pub fn row_range(&self, row: u64) -> Result<(u64, usize), PleNvmeError>
pub fn row_range(&self, row: u64) -> Result<(u64, usize), PleNvmeError>
Return the exact file byte span for one PLE row without reading it.
pub fn read_row_into(
&mut self,
row: u64,
raw_scratch: &mut [u8],
out: &mut [f32],
) -> Result<usize, PleNvmeError>
pub fn read_row_into( &mut self, row: u64, raw_scratch: &mut [u8], out: &mut [f32], ) -> Result<usize, PleNvmeError>
Read and dequantize exactly one selected n-gram row.
raw_scratch is normally a small stack/arena buffer (the qwen4exp PLE
row width is 160). This avoids both whole-table mapping and per-row
allocation. Multi-row gathers call this once per elected hash row.
pub fn gather_rows_into(
&mut self,
row_ids: &[u64],
raw_scratch: &mut [u8],
out: &mut [f32],
) -> Result<PleGatherReceipt, PleNvmeError>
pub fn gather_rows_into( &mut self, row_ids: &[u64], raw_scratch: &mut [u8], out: &mut [f32], ) -> Result<PleGatherReceipt, PleNvmeError>
Gather selected PLE rows into a tightly packed caller buffer.
row_ids must already be the deterministic, deduplicated selection for
the micro-batch. Keeping selection separate from I/O lets the model’s
exact n-gram hash routine decide IDs without allocating in this layer.
Trait Implementations§
Source§impl Deref for PleNvmeReader
impl Deref for PleNvmeReader
Auto Trait Implementations§
impl Freeze for PleNvmeReader
impl RefUnwindSafe for PleNvmeReader
impl Send for PleNvmeReader
impl Sync for PleNvmeReader
impl Unpin for PleNvmeReader
impl UnsafeUnpin for PleNvmeReader
impl UnwindSafe for PleNvmeReader
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more