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

[NLP] Support E5 small multi-lingual #625

Merged
merged 8 commits into from
Oct 31, 2023

Conversation

davidkyle
Copy link
Member

@davidkyle davidkyle commented Oct 19, 2023

E5 small multi lingual is based on a BERT architecture which made the code that traces the model assume the model takes 4 parameters to its forward() function. However, the model uses the XLMRoBERTa tokenizer which produces 2 inputs, this lead to an error when evaluating the model as it complained of missing arguments.

The fix is to use the tokenizer type to determine the number of inputs to the model's forward() function

Closes #583

# Conflicts:
#	tests/ml/pytorch/test_pytorch_model_config.py
@davidkyle davidkyle added the topic:NLP Issue or PR about NLP model support and eland_import_hub_model label Oct 19, 2023
Copy link
Member

@joshdevins joshdevins left a comment

Choose a reason for hiding this comment

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

I know we've done this for a while, but is there a way to reflect on the tokenizer itself to find out the outputs it produces, instead of just having a hard-coded list of tokenizers that are 2 or 4 outputs?

@joshdevins
Copy link
Member

Does this close #583 or is another PR pending?

@davidkyle
Copy link
Member Author

Does this close #583 or is another PR pending?

One more PR queued up to add some testing but we can consider #583 closed after this

@davidkyle davidkyle merged commit 5b3a83e into elastic:main Oct 31, 2023
3 of 4 checks passed
@davidkyle davidkyle deleted the e5-small-multi branch October 31, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:NLP Issue or PR about NLP model support and eland_import_hub_model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Model multilingual-e5-small fails to start
3 participants