Struct HybridDecomposition
pub struct HybridDecomposition {
pub rows: usize,
pub cols: usize,
pub rank: usize,
pub base_q: Vec<f32>,
pub low_rank_a: Vec<f32>,
pub low_rank_b: Vec<f32>,
pub sparse_entries: Vec<SparseEntry>,
pub escape_tiles: Vec<DenseEscapeTile>,
}Expand description
Representation of a fitted hybrid operator candidate $W \approx Q + A B + S$.
Fields§
§rows: usize§cols: usize§rank: usize§base_q: Vec<f32>Base quantized weights (flattened row-major).
low_rank_a: Vec<f32>Low-rank left factor A: shape rows × rank (row-major).
low_rank_b: Vec<f32>Low-rank right factor B: shape rank × cols (row-major).
sparse_entries: Vec<SparseEntry>Sparse outlier entries.
escape_tiles: Vec<DenseEscapeTile>Dense escape tiles.
Implementations§
§impl HybridDecomposition
impl HybridDecomposition
pub fn apply_gemv(&self, x: &[f32], y: &mut [f32]) -> Result<(), ConverterError>
pub fn apply_gemv(&self, x: &[f32], y: &mut [f32]) -> Result<(), ConverterError>
Evaluate matrix-vector multiplication $y = (Q + A B + S) x$.
pub fn reconstruct_dense(&self) -> Vec<f32>
pub fn reconstruct_dense(&self) -> Vec<f32>
Reconstruct the full dense matrix $\hat{W} = Q + A B + S$.
Trait Implementations§
§impl Clone for HybridDecomposition
impl Clone for HybridDecomposition
§fn clone(&self) -> HybridDecomposition
fn clone(&self) -> HybridDecomposition
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 more§impl Debug for HybridDecomposition
impl Debug for HybridDecomposition
§impl PartialEq for HybridDecomposition
impl PartialEq for HybridDecomposition
impl StructuralPartialEq for HybridDecomposition
Auto Trait Implementations§
impl Freeze for HybridDecomposition
impl RefUnwindSafe for HybridDecomposition
impl Send for HybridDecomposition
impl Sync for HybridDecomposition
impl Unpin for HybridDecomposition
impl UnsafeUnpin for HybridDecomposition
impl UnwindSafe for HybridDecomposition
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
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> ⓘ
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