From d73df4cc77bcbc0ddb59345bcec4545d51ce7190 Mon Sep 17 00:00:00 2001 From: wailovet Date: Thu, 11 Jul 2024 00:54:41 +0800 Subject: [PATCH] 'update' --- chatglm3/quantization.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chatglm3/quantization.py b/chatglm3/quantization.py index aa3be50..a6d74d2 100644 --- a/chatglm3/quantization.py +++ b/chatglm3/quantization.py @@ -148,11 +148,11 @@ class QuantizedLinear(torch.nn.Module): try: self.weight = Parameter( - self.weight.to(device), requires_grad=False) + self.weight.to(device)) self.weight_scale = Parameter( - self.weight_scale.to(device), requires_grad=False) + self.weight_scale.to(device)) self.bias = Parameter( - bias.to(device), requires_grad=False) if bias is not None else None + bias.to(device)) if bias is not None else None except Exception as e: self.weight = Parameter(self.weight.to(device)) self.weight_scale = Parameter(self.weight_scale.to(device))