pub struct P64TensorIndex {
pub header: P64WeightHeader,
pub hparams: P64HParams,
pub entries: Vec<P64TensorEntry>,
}Expand description
Runtime reader: parses a P64 container’s header + manifest in microseconds. Tensor blobs
stay in the caller’s byte slice (zero-copy); only the small manifest is materialized. The
role/layer/blob_offset fields map directly to the resident WebGPU weight arenas.
Fields§
§header: P64WeightHeader§hparams: P64HParams§entries: Vec<P64TensorEntry>Implementations§
Source§impl P64TensorIndex
impl P64TensorIndex
Sourcepub fn prepare_native<'a>(
data: &'a [u8],
integrity: IntegrityMode,
budget: ModelPreparationBudget,
metadata: Option<ModelMetadata>,
) -> Result<PreparedP64<'a, GgufHyperparams>, PrepareModelError>
pub fn prepare_native<'a>( data: &'a [u8], integrity: IntegrityMode, budget: ModelPreparationBudget, metadata: Option<ModelMetadata>, ) -> Result<PreparedP64<'a, GgufHyperparams>, PrepareModelError>
Prepare the native inference directory while retaining authoritative P64 bytes. Metadata extensions are explicit because the fixed v4 header has no recurrent/PLE fields.
Sourcepub fn from_q42(data: &[u8]) -> Result<Self, String>
pub fn from_q42(data: &[u8]) -> Result<Self, String>
Parses a tensor index from a .q42 volume blob; Err on malformed header/directory.
Sourcepub fn from_p64(data: &[u8]) -> Result<Self, String>
pub fn from_p64(data: &[u8]) -> Result<Self, String>
Parses a tensor index from raw .p64 bytes.
Sourcepub fn from_p64_with_integrity(
data: &[u8],
integrity: IntegrityMode,
) -> Result<Self, String>
pub fn from_p64_with_integrity( data: &[u8], integrity: IntegrityMode, ) -> Result<Self, String>
Parse a P64 container with an explicit integrity policy.
Sourcepub fn hyperparams(&self) -> GgufHyperparams
pub fn hyperparams(&self) -> GgufHyperparams
Model hyperparameters decoded from the index header.
Sourcepub fn blob<'a>(&self, data: &'a [u8], entry: &P64TensorEntry) -> &'a [u8] ⓘ
pub fn blob<'a>(&self, data: &'a [u8], entry: &P64TensorEntry) -> &'a [u8] ⓘ
Zero-copy tensor byte slice for entry within data.
Sourcepub fn tokenizer_bytes<'a>(&self, data: &'a [u8]) -> &'a [u8] ⓘ
pub fn tokenizer_bytes<'a>(&self, data: &'a [u8]) -> &'a [u8] ⓘ
Zero-copy tokenizer blob within data.
Sourcepub fn manifold_coordinate(
&self,
data: &[u8],
index: u32,
) -> Result<ManifoldCoordinate10D, String>
pub fn manifold_coordinate( &self, data: &[u8], index: u32, ) -> Result<ManifoldCoordinate10D, String>
Manifold coordinate for a tensor entry (bridges neutral 64B P64 record to Q42 ManifoldCoordinate10D).
Sourcepub fn to_gguf_index(&self) -> GgufTensorIndex
pub fn to_gguf_index(&self) -> GgufTensorIndex
Build a GGUF-equivalent index for the existing inference hot path.
Sourcepub fn validate_against_gguf(
&self,
p64_data: &[u8],
gguf_data: &[u8],
) -> Result<P64RoundTripReport, String>
pub fn validate_against_gguf( &self, p64_data: &[u8], gguf_data: &[u8], ) -> Result<P64RoundTripReport, String>
Prove that a parsed P64 contains every GGUF tensor with identical shape, type and bytes. This is a cold-path validation routine and intentionally performs a complete byte comparison in addition to the stored CRCs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for P64TensorIndex
impl RefUnwindSafe for P64TensorIndex
impl Send for P64TensorIndex
impl Sync for P64TensorIndex
impl Unpin for P64TensorIndex
impl UnsafeUnpin for P64TensorIndex
impl UnwindSafe for P64TensorIndex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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