mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
fix: allow more than 6 bits in the last layer if asked by user
This commit is contained in:
@@ -96,7 +96,7 @@ class PostTrainingAffineQuantization:
|
||||
# Since this is the last layer and mostly used for classification,
|
||||
# this does not have much impact.
|
||||
# TODO: Put back 7 bits when 100% at 7b is achieved (see issue #1332).
|
||||
q_layer = QuantizedLinear(6, q_weights, q_bias)
|
||||
q_layer = QuantizedLinear(numpy.maximum(6, self.n_bits), q_weights, q_bias)
|
||||
else:
|
||||
q_layer = QuantizedLinear(self.n_bits, q_weights, q_bias)
|
||||
# Calibrate and get new calibration_data for next layer/activation
|
||||
|
||||
Reference in New Issue
Block a user