Support batch size in embedder#884
Merged
Merged
Conversation
3dee038 to
0aa964a
Compare
Contributor
|
Changes may conflict with #744. |
0aa964a to
41fc636
Compare
jealous
approved these changes
Jan 2, 2026
Contributor
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If you are still working on this, please push a commit or leave a comment. Reviewers: please respond, or add the |
41fc636 to
88b7ae9
Compare
88b7ae9 to
0bea836
Compare
edwinyyyu
approved these changes
Apr 30, 2026
edwinyyyu
left a comment
Contributor
There was a problem hiding this comment.
It may make sense to have each XXXEmbedderParams type inherit from a common BaseModel-derived type if the batch size is meant to be common. Can be a separate PR to unify a bunch of shared embedding behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the change
Add a configurable parameter, batch_size, to embedder.
Description
Some platforms have limit on the batch size for each embedding request. This PR adds support for a new configuration paramter, batch_size, for the embedder. If the request batch size exceeds the configured batch size, multiple embedding request will be issued for the embedding.
Fixes/Closes
Fixes #864
Type of change
[Please delete options that are not relevant.]
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
[Please delete options that are not relevant.]
Test Results: [Attach logs, screenshots, or relevant output]
Checklist
[Please delete options that are not relevant.]
Maintainer Checklist
Screenshots/Gifs
[If applicable, add screenshots or GIFs that show the changes in action. This is especially helpful for API responses. Otherwise, delete this section or type "N/A".]
Further comments
[Add any other relevant information here, such as potential side effects, future considerations, or any specific questions for the reviewer. Otherwise, type "None".]