-
Notifications
You must be signed in to change notification settings - Fork 2k
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
build: Upgrade transformers to the latest version 4.34.1 #5994
build: Upgrade transformers to the latest version 4.34.1 #5994
Conversation
…n support the new Mistral, Nougat, and other models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening this pull request. What a nice one to start with!
There are two small changes we need, before we can merge this.
The files .github/workflows/tests_preview.yml
and .github/workflows/tests.yml
also contain the transformers version 4.32.1.
Could you please change those to 4.34.0 too? Should be ready to go then.
Did you try one of these new models with Haystack by any chance already?
Ah, thank you. I forgot
I've been using the Nougat model for OCRing documents, and I've been very impressed with the results so far. I think it has the potential to be a decent option in a I'm also planning to try the Mistral model. It appears to do well in the benchmarks. |
@grantmwilliams There is more than one occurrence of |
@julian-risch I'm assuming this update to huggingface_hub is responsible: https://github.com/huggingface/huggingface_hub/pull/1692/files. It looks like the How would you like me to address it on the Haystack side? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grantmwilliams Only remaining problem in the unit tests is now the failing test that expects an OSError but get's a RuntimeError. Let's change https://github.com/grantmwilliams/haystack/blob/eb28cc174e8c19bcc696d069c1b4914e9df6edb8/test/modeling/test_model_loading.py#L30 to RuntimeError then.
One of the integration tests of our preview of Haystack 2.0 is failing too: https://github.com/deepset-ai/haystack/actions/runs/6433646037/job/17471652438?pr=5994 However, I don't fully understand the issue. The transformers release notes mention a tokenizer refactoring: https://github.com/huggingface/transformers/releases/tag/v4.34.0 Maybe that's causing the problem in this test.
Pull Request Test Coverage Report for Build 6629997962
💛 - Coveralls |
There was a 4.34.1 patch release with the following change among others:
I updated this PR so that we upgrade to 4.34.1 instead of 4.34.0. |
I was able to reproduce the issue locally and fixing it is simply done by upgrading openai-whisper. An outdated version of openai-whisper is used in the CI. The problem is that openai-whisper requires tiktoken==0.3.3 but Haystack requires openai-whisper>=0.5.1
fails but pytest passes after
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope we will manage to get rid of this dependency asap 😬 I'll take care of reviewing #6149 soon
Hi @grantmwilliams, thank you for your contribution to Haystack! Now that you resolved an issue labeled with 'hacktoberfest', you have a chance to receive an exclusive swag package from Haystack. 🎁 Fill in this form, and let us know if you have any questions! https://forms.gle/226vqWoN6NRAaqJ69 |
Haystack can support the new Mistral, Persimmon, BROS, ViTMatte, and Nougat models.
Tranformers 4.34.0 Release
Tranformers 4.34.1 Release
Related Issues
Proposed Changes:
How did you test it?
Manually with:
Notes for the reviewer
pip install '.[dev,preview,audio]'
wouldn't work anymore after this. I would remove the extra because of this. WDYT?Also the instructions in haystack/preview/components/audio/whisper_local.py would need to be updated to
pip install --no-deps llvmlite numba 'openai-whisper>=20230818'
instead ofpip install openai-whisper
.Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.