Skip to content

Commit

Permalink
fix seqlen issue
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang, Weiwei1 <[email protected]>
  • Loading branch information
WeiweiZhang1 committed Dec 31, 2024
1 parent c82aa88 commit bb28427
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions auto_round/script/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -563,3 +557,4 @@ def eval(args):

from lm_eval.utils import make_table # pylint: disable=E0401
print(make_table(res))

0 comments on commit bb28427

Please sign in to comment.