-
Notifications
You must be signed in to change notification settings - Fork 91
feat: add mm embedding model and its factory. #471
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: main
Are you sure you want to change the base?
Conversation
| const ModelInputParams& input_params) = 0; | ||
|
|
||
| virtual torch::Tensor logits(const torch::Tensor& hidden_states, | ||
| const torch::Tensor& seleted_idxes) { |
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 seleted_idxes a spelling mistake issue? selected_idxes?
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.
I've fixed seleted_idxes to selected_idxes.
| virtual std::vector<torch::Tensor> encode( | ||
| const ModelInputParams& input_params) = 0; | ||
|
|
||
| virtual torch::Tensor logits(const torch::Tensor& hidden_states, |
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.
no need to define these interface in MMEmbeddingVLM, move these to MMEmbeddingVLMImpl
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.
Done. Moved the empty implementation from MMEmbeddingVLM to MMEmbeddingVLMImpl.
| } | ||
|
|
||
| MMEmbeddingVLMFactory ModelRegistry::get_mm_embedding_vlm_factory( | ||
| const std::string& name) { |
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.
nit: maybe need yo rename :(
register_vlm_mm_embedding_factory ----> vlm_mm_embedding
and
get_mm_embedding_vlm_factory ----> mm_embedding_vlm
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.
Done. Rename register_vlm_mm_embedding_factory to register_mm_embedding_vlm_factory.
…mpl and fix some function name.
|
LGTM |
Add an MMEmbeddingVLM interface for the encode service that loads only the vision model.