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

Transformers 4.44 support #1996

Merged
merged 8 commits into from
Sep 2, 2024
Merged

Transformers 4.44 support #1996

merged 8 commits into from
Sep 2, 2024

Conversation

IlyasMoutawwakil
Copy link
Member

@IlyasMoutawwakil IlyasMoutawwakil commented Aug 22, 2024

What does this PR do?

Adding support for transformers 4.44. Biggest issue is with the changes in the bloom model attention block and its kv cache changes. Aslo fixing the failing TFLite tests (all green).

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@IlyasMoutawwakil IlyasMoutawwakil marked this pull request as ready for review August 23, 2024 11:11
@@ -28,7 +28,7 @@

class TokenClassificationProcessing(TaskProcessor):
ACCEPTED_PREPROCESSOR_CLASSES = (PreTrainedTokenizerBase,)
DEFAULT_DATASET_ARGS = "conll2003"
DEFAULT_DATASET_ARGS = {"path": "conll2003", "trust_remote_code": True}
Copy link
Collaborator

Choose a reason for hiding this comment

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

we shouldn't set trust_remote_code to True by default here, where is this needed ?

Copy link
Member Author

Choose a reason for hiding this comment

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

this dataset was being used with "remote code" (it generates the dataset) for as long as it existed, but the datasets package introduced the new argument trust_remote_code lately, this preprocessing is used in in tflite tests, we can either find a similar dataset that doesn't use code or allow remote code (that was already being executed).
https://huggingface.co/datasets/eriktks/conll2003/blob/main/conll2003.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we need to change the dataset to something that doesn't require trust_remote_code to be set to True by default then (something that should be explicitly set by users)

optimum/onnxruntime/modeling_decoder.py Outdated Show resolved Hide resolved
Copy link
Member

@michaelbenayoun michaelbenayoun left a comment

Choose a reason for hiding this comment

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

Looks good to me. Not very knowledgeable on the bloom bettertransformer part though.

Copy link
Collaborator

@echarlaix echarlaix left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @IlyasMoutawwakil

@echarlaix echarlaix merged commit 7cc57e4 into main Sep 2, 2024
62 of 64 checks passed
@echarlaix echarlaix deleted the transformers-4.44 branch September 2, 2024 13:35
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