Expand description
Tensor-level (not full-model) quantization error metrics: for each quantized tensor,
dequantize and compare against the original f32 weights. No forward pass is needed – this
is a pure diff between the original and quantized-then-reconstructed safetensors files.
Structs§
- Tensor
Report - Per-tensor quantization error metrics.
Functions§
- compare_
tensors - Compares
originalagainstreconstructedelement-wise, computingTensorReportmetrics. Both slices must be the same length (the caller is responsible for shape bookkeeping). - validate_
checkpoint - Compares every quantized tensor in
quantized_path(as recorded by its embeddedquantization_config) against the corresponding tensor inoriginal_path, returning oneTensorReportper quantized tensor, in the checkpoint’s tensor order.