one more quant fix (#708)

This commit is contained in:
Awni Hannun
2024-04-22 18:12:52 -07:00
committed by GitHub
parent 8d5cf5b0c8
commit ecbc6ff1e3
2 changed files with 7 additions and 6 deletions

View File

@@ -18,12 +18,10 @@ def quantize(weights, config, args):
model.load_weights(list(weights.items()))
# Quantize the model:
nn.QuantizedLinear.quantize_module(
nn.quantize(
model,
args.q_group_size,
args.q_bits,
linear_class_predicate=lambda m: isinstance(m, nn.Linear)
and m.weight.shape[0] != 8,
)
# Update the config: