Skip to content

Transformers 4.44 support#1996

Merged
echarlaix merged 8 commits intomainfrom
transformers-4.44
Sep 2, 2024
Merged

Transformers 4.44 support#1996
echarlaix merged 8 commits intomainfrom
transformers-4.44

Conversation

@IlyasMoutawwakil
Copy link
Copy Markdown
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
Copy link
Copy Markdown

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
Comment thread optimum/onnxruntime/modeling_decoder.py Outdated
class TokenClassificationProcessing(TaskProcessor):
ACCEPTED_PREPROCESSOR_CLASSES = (PreTrainedTokenizerBase,)
DEFAULT_DATASET_ARGS = "conll2003"
DEFAULT_DATASET_ARGS = {"path": "conll2003", "trust_remote_code": True}
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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)

Comment thread optimum/onnxruntime/modeling_decoder.py Outdated
Copy link
Copy Markdown
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
Copy Markdown
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
@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