PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
bugfix of groupsize dismatch with weight shape (#195)
WeiweiZhang10daad3f26b15
diff --git a/auto_round/quantizer.py b/auto_round/quantizer.pyindex cb5eddcfb..34aa864a8 100644--- a/auto_round/quantizer.py+++ b/auto_round/quantizer.py@@ -39,6 +39,7 @@ def reshape_tensor(v, group_size=-1):else:pad_len = (v.shape[1] + group_size - 1) // group_size * group_size - v.shape[1]v = torch.nn.functional.pad(v, (0, pad_len))+ v = v.reshape(-1, group_size)return v