Skip to content

PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度

fix seqlen issue (#399)

WeiweiZhang1d06546aa435d
diff --git a/auto_round/script/llm.py b/auto_round/script/llm.py
index 4d13ffb3a..62beefc1d 100644
--- a/auto_round/script/llm.py
+++ b/auto_round/script/llm.py
@@ -257,7 +257,7 @@ def tune(args):
if args.format is None:
args.format = "auto_round"
supported_formats = ["auto_round", "auto_gptq", "auto_awq", "auto_round:auto_gptq", "auto_round:auto_awq",
- "auto_gptq:marlin", "itrex", "iterx_xpu", "fake"]
+ "auto_gptq:marlin", "itrex", "itrex_xpu", "fake"]
formats = args.format.replace(' ', '').split(",")
for format in formats:
if format not in supported_formats:
@@ -363,13 +363,7 @@ def tune(args):
from auto_round import AutoRound, AutoRoundAdam
model = model.eval()
- # align with GPTQ to eval ppl
seqlen = args.seqlen
- if "opt" in model_name:
- seqlen = model.config.max_position_embeddings
- model.seqlen = model.config.max_position_embeddings
- else:
- seqlen = 2048
if args.model_dtype != None:
try:
@@ -563,3 +557,4 @@ def eval(args):
from lm_eval.utils import make_table # pylint: disable=E0401
print(make_table(res))
+