pub enum MatrixQuantizationError<E> {
ExpectedMatrix {
rank: usize,
},
EmptyOutputChannel {
shape: Vec<usize>,
},
OutputChannelTooWide {
width: usize,
limit: usize,
},
SourceRowUnavailable {
row: usize,
},
Quantization {
row: usize,
source: QuantizationError,
},
Sink {
row: usize,
source: E,
},
}Expand description
Failure while streaming a matrix through the canonical Q8 quantizer.
Variants§
ExpectedMatrix
Q8 weights are defined here only for matrices, never by accidentally flattening vectors.
EmptyOutputChannel
An empty trailing dimension cannot represent an output channel for a GEMM weight matrix.
OutputChannelTooWide
One output channel would exceed the adapter’s bounded scratch-space contract.
Fields
A validated view could not provide a complete source row.
This is defensive: a TensorView created by crate::safetensors::SafetensorsIndex
should make it unreachable, but conversion must refuse rather than emit a partial row.
Quantization
A source value cannot be represented by the deterministic Q8 recipe.
Fields
§
source: QuantizationErrorThe underlying numerical refusal.
Sink
The caller’s streaming destination rejected a complete quantized row.
Trait Implementations§
Source§impl<E: Clone> Clone for MatrixQuantizationError<E>
impl<E: Clone> Clone for MatrixQuantizationError<E>
Source§fn clone(&self) -> MatrixQuantizationError<E>
fn clone(&self) -> MatrixQuantizationError<E>
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 moreSource§impl<E: Debug> Debug for MatrixQuantizationError<E>
impl<E: Debug> Debug for MatrixQuantizationError<E>
Source§impl<E: Display> Display for MatrixQuantizationError<E>
impl<E: Display> Display for MatrixQuantizationError<E>
Source§impl<E> Error for MatrixQuantizationError<E>where
E: Error + 'static,
impl<E> Error for MatrixQuantizationError<E>where
E: Error + 'static,
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<E: PartialEq> PartialEq for MatrixQuantizationError<E>
impl<E: PartialEq> PartialEq for MatrixQuantizationError<E>
impl<E: PartialEq> StructuralPartialEq for MatrixQuantizationError<E>
Auto Trait Implementations§
impl<E> Freeze for MatrixQuantizationError<E>where
E: Freeze,
impl<E> RefUnwindSafe for MatrixQuantizationError<E>where
E: RefUnwindSafe,
impl<E> Send for MatrixQuantizationError<E>where
E: Send,
impl<E> Sync for MatrixQuantizationError<E>where
E: Sync,
impl<E> Unpin for MatrixQuantizationError<E>where
E: Unpin,
impl<E> UnsafeUnpin for MatrixQuantizationError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for MatrixQuantizationError<E>where
E: UnwindSafe,
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