Skip to content

Commit

Permalink
revert awq ut
Browse files Browse the repository at this point in the history
Signed-off-by: Kaihui-intel <[email protected]>
  • Loading branch information
Kaihui-intel committed Dec 17, 2024
1 parent 668f92b commit 77477ad
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/3x/torch/quantization/weight_only/test_transfomers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import pytest
import torch
import transformers
from packaging.version import Version
from transformers import AutoTokenizer

Expand Down Expand Up @@ -203,8 +202,5 @@ def test_loading_autoawq_model(self):
self.generate_kwargs = dict(do_sample=False, temperature=0.9, num_beams=4)
gen_ids = user_model.generate(input_ids, **self.generate_kwargs)
gen_text = tokenizer.batch_decode(gen_ids, skip_special_tokens=True)
if Version(transformers.__version__) < Version("4.47.0"):
target_text = ["One day, the little girl in the back of my mind will ask me if I'm a"]
else:
target_text = ["One day, the little girl in the back of my mind will say, “I’m so glad you’"]
target_text = ["One day, the little girl in the back of my mind will ask me if I'm a"]
assert gen_text == target_text, "loading autoawq quantized model failed."

0 comments on commit 77477ad

Please sign in to comment.