Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed transformers version conflict and fixed UT error #483

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/neural_compressor/test_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class OptimizationTest(INCTestMixin):
)

TEXT_GENERATION_SUPPORTED_ARCHITECTURES = (
"hf-internal-testing/tiny-random-BloomForCausalLM",
"hf-tiny-model-private/tiny-random-BloomForCausalLM",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this modification ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is error in test_quantize_text_generate_model UT with "hf-internal-testing/tiny-random-BloomForCausalLM" :
2023-12-19 11:14:01 [ERROR] Unexpected exception RuntimeError('INDICES element is out of DATA bounds, id=6168 axis_dim=1024') happened during tunin
g.
Traceback (most recent call last):
File "/home/penghuic/inc_pr/neural_compressor/quantization.py", line 234, in fit
strategy.traverse()
File "/home/penghuic/inc_pr/neural_compressor/strategy/auto.py", line 140, in traverse
super().traverse()
File "/home/penghuic/inc_pr/neural_compressor/strategy/strategy.py", line 504, in traverse
q_model = self.adaptor.quantize(copy.deepcopy(tune_cfg), self.model, self.calib_dataloader, self.q_func)
File "/home/penghuic/inc_pr/neural_compressor/utils/utility.py", line 304, in fi
res = func(*args, **kwargs)
File "/home/penghuic/inc_pr/neural_compressor/adaptor/pytorch.py", line 3630, in quantize
q_func(q_model._model)
File "/home/penghuic/optimum-intel-new/tests/neural_compressor/test_optimization.py", line 368, in calibration_fn
tmp_model.generate(**tokens, max_new_tokens=32, do_sample=False)
File "/home/penghuic/anaconda3/envs/py3.10/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your answer @PenghuiCheng, could you let me know in which case this issue is appearing and if yes what is causing it? I don't see it in the current CI, is this appearing when installing neural-compressor from source ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any news on this @PenghuiCheng ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Ella, Yes, This issue does not exist, it seems that my model has not been fully downloaded. I will close it. thanks!

"hf-internal-testing/tiny-random-GPTNeoForCausalLM",
)

Expand Down
Loading