Skip to content

Conversation

@brendanator
Copy link

This PR adds intfloat/multilingual-e5-base, -small models.

these models have no "token_type_ids" inputs, so I introduce check logic.

image

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.

@brendanator
Copy link
Author

This is a benchmark review for experiment review_of_100_reviews_20240409.
Run ID: review_of_100_reviews_20240409/benchmark_2024-04-09T10-24-34_v1-16-0-95-g65fefaeef-dirty.

This pull request was cloned from https://github.com/Anush008/fastembed-rs/pull/48. (Note: the URL is not a link to avoid triggering a notification on the original pull request.)

Copy link
Author

@brendanator brendanator left a comment

Choose a reason for hiding this comment

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

Sourcery logo Sourcery Review:

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

LangSmith trace

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +100 to +101
// Large model is something wrong, model.onnx size is only 546kB
// /// Large model of multilingual E5 Text Embeddings
Copy link
Author

Choose a reason for hiding this comment

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

Sourcery logo 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.

Suggested change
// 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.

Choose a reason for hiding this comment

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

Is this comment correct?

Choose a reason for hiding this comment

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

Is this comment helpful?

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?

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 {
Copy link
Author

Choose a reason for hiding this comment

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

Sourcery logo 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.

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