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

Conversation

PenghuiCheng
Copy link
Contributor

What does this PR do?

Fixed transformers version conflict and fixed UT error

Signed-off-by: Cheng, Penghui <[email protected]>
Signed-off-by: Cheng, Penghui <[email protected]>
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@chensuyue
Copy link

https://github.com/huggingface/optimum-intel/actions/runs/7097503652/job/19317724224?pr=483#step:5:747 This case failed due to HF connect issue, @echarlaix could you help to check?

@echarlaix
Copy link
Collaborator

Could you rebase @PenghuiCheng ? (recent fixes were integrated for the failing tests)

setup.py Outdated Show resolved Hide resolved
@@ -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!

@PenghuiCheng
Copy link
Contributor Author

hi, Ella, the pre-ci tests on the OpenVino section. It is not the cause of this PR. Could you review this PR?

@echarlaix
Copy link
Collaborator

hi, Ella, the pre-ci tests on the OpenVino section. It is not the cause of this PR. Could you review this PR?

Yes the failing tests are unrelated to the PR and can be ignored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants