-
Notifications
You must be signed in to change notification settings - Fork 0
add Multilingual E5 models #1
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
base: base-sha/77439ea5a87ef0ba082009226a521011873f7dfc
Are you sure you want to change the base?
add Multilingual E5 models #1
Conversation
|
This is a benchmark review for experiment This pull request was cloned from |
brendanator
left a comment
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.
Hey @brendanator - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟡 Docstrings: 1 issue found
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
| // Large model is something wrong, model.onnx size is only 546kB | ||
| // /// Large model of multilingual E5 Text Embeddings |
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.
suggestion (code_clarification): Consider clarifying the status of the MultilingualE5Large model in the code.
It's helpful for future maintenance to include a more detailed comment on why the Large model is commented out and under what conditions it might be revisited or fixed.
| // Large model is something wrong, model.onnx size is only 546kB | |
| // /// Large model of multilingual E5 Text Embeddings | |
| // The Large model of multilingual E5 Text Embeddings is currently not included due to an issue with its ONNX file size (only 546kB), | |
| // indicating a potential export or conversion problem. This model variant should be revisited once the underlying issue is resolved | |
| // or if a correctly sized model file becomes available. |
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.
Is this comment correct?
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.
Is this comment helpful?
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.
Is the comment type correct?
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.
Is the comment area correct?
| } | ||
|
|
||
| /// Private method to return an instance | ||
| fn new(tokenizer: Tokenizer, session: Session) -> Self { |
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.
suggestion (docstrings): Please update the docstring for function:
TextEmbedding::new
Reason for update: The function signature and internal logic have changed to include a new field need_token_type_ids.
Suggested new docstring:
/// Private method to return an instance, determining if `token_type_ids` are needed based on the session inputs.
This PR adds intfloat/multilingual-e5-base, -small models.
these models have no "token_type_ids" inputs, so I introduce check logic.
curiously, intfloat/multilingual-e5-large onnx model is only 546kB(small is 470MB, base is 1.11GB). and it can't run inference. so, I commented out for large model definition.