Skip to content

Commit

Permalink
Merge branch 'more_genargs' of https://github.com/pytorch/torchchat i…
Browse files Browse the repository at this point in the history
…nto more_genargs
  • Loading branch information
Michael Gschwind committed Apr 17, 2024
2 parents ad0fbec + 670029e commit 0442e94
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,11 @@ def forward(self, input: torch.Tensor) -> torch.Tensor:


def replace_embedding_weight_only_grouped_int8_per_channel(
module, device, bitwidth: int = 8, groupsize: Optional[int] = None, packed=False
module,
device,
bitwidth: int = 8,
groupsize: Optional[int] = None,
packed=False
):
for name, child in module.named_children():
# print(f"name: {name}")
Expand All @@ -535,7 +539,7 @@ def replace_embedding_weight_only_grouped_int8_per_channel(
)
else:
replace_embedding_weight_only_grouped_int8_per_channel(
child, bitwidth, groupsize, packed
child, device, bitwidth, groupsize, packed
)


Expand Down

0 comments on commit 0442e94

Please sign in to comment.