pub struct NOVAQEngine { /* private fields */ }Expand description
NOVAQ quantization engine
Implementations§
Source§impl NOVAQEngine
impl NOVAQEngine
pub fn new(config: NOVAQConfig) -> Self
Sourcepub fn normalize_weights(
&mut self,
weights: &mut WeightMatrix,
) -> Result<NormalizationMetadata>
pub fn normalize_weights( &mut self, weights: &mut WeightMatrix, ) -> Result<NormalizationMetadata>
Stage 1: Distribution Normalization
Sourcepub fn build_codebooks(
&mut self,
weights: &WeightMatrix,
) -> Result<(VectorCodebooks, QuantizationIndices)>
pub fn build_codebooks( &mut self, weights: &WeightMatrix, ) -> Result<(VectorCodebooks, QuantizationIndices)>
Stage 2: Multi-stage Vector Codebooks
Sourcepub fn refine_codebooks(
&mut self,
codebooks: &mut VectorCodebooks,
indices: &QuantizationIndices,
original_weights: &WeightMatrix,
teacher_outputs: Option<&[f32]>,
) -> Result<f32>
pub fn refine_codebooks( &mut self, codebooks: &mut VectorCodebooks, indices: &QuantizationIndices, original_weights: &WeightMatrix, teacher_outputs: Option<&[f32]>, ) -> Result<f32>
Stage 3: Teacher-guided Refinement
Sourcepub fn quantize_model_with_progress(
&mut self,
weights: Vec<WeightMatrix>,
progress: &mut QuantizationProgressTracker,
) -> Result<NOVAQModel>
pub fn quantize_model_with_progress( &mut self, weights: Vec<WeightMatrix>, progress: &mut QuantizationProgressTracker, ) -> Result<NOVAQModel>
Complete NOVAQ quantization pipeline with progress tracking
Sourcepub fn quantize_model(
&mut self,
weights: Vec<WeightMatrix>,
) -> Result<NOVAQModel>
pub fn quantize_model( &mut self, weights: Vec<WeightMatrix>, ) -> Result<NOVAQModel>
Complete NOVAQ quantization pipeline
Sourcepub fn reconstruct_weights(
&self,
model: &NOVAQModel,
weight_name: &str,
) -> Result<WeightMatrix>
pub fn reconstruct_weights( &self, model: &NOVAQModel, weight_name: &str, ) -> Result<WeightMatrix>
Reconstruct weights from NOVAQ model
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NOVAQEngine
impl RefUnwindSafe for NOVAQEngine
impl Send for NOVAQEngine
impl Sync for NOVAQEngine
impl Unpin for NOVAQEngine
impl UnsafeUnpin for NOVAQEngine
impl UnwindSafe for NOVAQEngine
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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