mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-09-01 04:14:38 +08:00
one more quant fix (#708)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user