Skip to content

Commit

Permalink
set the trainable parameters to 16 bits
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhuach21 committed Jun 3, 2024
1 parent 794cd90 commit 063009b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions auto_round/autoround.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def __init__(self, orig_layer, enable_minmax_tuning=True):
self.scale_dtype = self.orig_layer.scale_dtype
self.sym = self.orig_layer.sym
weight_dtype = self.orig_layer.weight.dtype
weight_dtype = torch.float32 ##TODO revert the change to check the accuracy
self.value = torch.nn.Parameter(
torch.zeros(self.orig_layer.weight.shape, device=self.orig_layer.weight.device, dtype=weight_dtype),
requires_grad=True,
Expand Down Expand Up @@ -178,7 +177,6 @@ def __init__(self, orig_layer, enable_minmax_tuning=True):
self.sym = self.orig_layer.sym
self.scale_dtype = self.orig_layer.scale_dtype
weight_dtype = self.orig_layer.weight.dtype
weight_dtype = torch.float32 ##TODO revert the change to check the accuracy

device = self.orig_layer.weight.device
self.weight_t = self.orig_layer.weight.t()
Expand Down

0 comments on commit 063009b

Please sign in to comment.