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
pub fn from_q42(data: &[u8]) -> Result<Self, String>
pub fn from_p64(data: &[u8]) -> Result<Self, String>
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.
pub fn hyperparams(&self) -> GgufHyperparams
pub fn blob<'a>(&self, data: &'a [u8], entry: &P64TensorEntry) -> &'a [u8] ⓘ
pub fn tokenizer_bytes<'a>(&self, data: &'a [u8]) -> &'a [u8] ⓘ
pub fn manifold_coordinate( &self, data: &[u8], index: u32, ) -> Result<ManifoldCoordinate10D, String>
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§
Source§impl Clone for P64TensorIndex
impl Clone for P64TensorIndex
Source§fn clone(&self) -> P64TensorIndex
fn clone(&self) -> P64TensorIndex
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 moreAuto 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>,
Aggregate shares in an MPC protocol.
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
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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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