pub enum QuantError {
DimensionMismatch {
expected: usize,
got: usize,
},
EmptyInput(&'static str),
InvalidScale {
scale: f32,
},
InvalidBitWidth {
bits: u32,
},
GroupSizeMismatch {
len: usize,
group: usize,
},
CalibrationRequired(&'static str),
SingularHessian {
min_diag: f32,
},
TeacherStudentMismatch {
teacher: usize,
student: usize,
},
AllZeroPruning {
threshold: f32,
n: usize,
},
NonFiniteFp8(f32),
InfeasibleCompressionTarget {
target: f32,
},
InvalidConfig(String),
}Expand description
All errors that may be produced by oxicuda-quant.
Variants§
DimensionMismatch
Tensor dimension does not match the expected value.
EmptyInput(&'static str)
The input slice is empty when at least one element is required.
InvalidScale
A quantization scale is zero or negative (would produce NaN/Inf).
InvalidBitWidth
A quantization bit-width is outside the valid range [1, 16].
GroupSizeMismatch
The requested group size does not evenly divide the tensor length.
CalibrationRequired(&'static str)
A calibration dataset is required but was not provided.
SingularHessian
The Hessian matrix is singular or near-singular.
TeacherStudentMismatch
Distillation teacher and student outputs have incompatible shapes.
AllZeroPruning
A pruning threshold produced a 100% sparse tensor (no weights remain).
NonFiniteFp8(f32)
FP8 format encoding received a NaN/Inf value.
InfeasibleCompressionTarget
Mixed-precision policy could not satisfy the requested compression ratio.
InvalidConfig(String)
Generic configuration error.
Trait Implementations§
Source§impl Clone for QuantError
impl Clone for QuantError
Source§fn clone(&self) -> QuantError
fn clone(&self) -> QuantError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QuantError
impl Debug for QuantError
Source§impl Display for QuantError
impl Display for QuantError
Source§impl Error for QuantError
impl Error for QuantError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()