Skip to content

Commit 02ee1ca

Browse files
authored
Honor range-learned scales in the tied embedding quantization path (pytorch#22476)
Differential Revision: D118365125 Pull Request resolved: pytorch#22476
1 parent fe5d8d6 commit 02ee1ca

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎examples/models/llama/source_transformation/quantize.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ def get_quant_embedding_transform(
776776
embedding_quantize: str,
777777
use_shared_embedding: bool = False,
778778
quantize_with_hqq: bool = True,
779+
range_learning: bool = False,
779780
):
780781
if embedding_quantize.startswith("torchao:"):
781782
from torchao.prototype.quantization.embedding.api import (
@@ -819,6 +820,7 @@ def _torchao_embedding_quantizer(model):
819820
weight_dtype=weight_dtype,
820821
granularity=granularity,
821822
mapping_type=mapping_type,
823+
range_learning=range_learning,
822824
).quantize(model)
823825
return model
824826

0 commit comments

Comments
 (0)