From d14c73b120d325445c71e257fa480dca2c0c6e24 Mon Sep 17 00:00:00 2001 From: Giuseppe Franco Date: Mon, 4 Dec 2023 10:44:24 +0000 Subject: [PATCH] Fix (minifloat): add scaling_min_val to base quantizers --- src/brevitas/quant/experimental/float_base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/brevitas/quant/experimental/float_base.py b/src/brevitas/quant/experimental/float_base.py index 04b694e6c..8da867e27 100644 --- a/src/brevitas/quant/experimental/float_base.py +++ b/src/brevitas/quant/experimental/float_base.py @@ -17,6 +17,7 @@ class FloatWeightBase(SolveTensorQuantFloatToIntImplFromEnum): tensor_quant = FloatQuant signed = True float_to_int_impl_type = 'round' + scaling_min_val = 1e-10 class FloatActBase(SolveTensorQuantFloatToIntImplFromEnum): @@ -24,6 +25,7 @@ class FloatActBase(SolveTensorQuantFloatToIntImplFromEnum): tensor_quant = FloatQuant signed = True float_to_int_impl_type = 'round' + scaling_min_val = 1e-10 class ScaledFloatWeightBase(FloatWeightBase, WeightQuantSolver):