Conversation
isaac-chung
reviewed
Feb 26, 2026
Collaborator
isaac-chung
left a comment
There was a problem hiding this comment.
Overall looks good. One small thing, and how would this be tested?
| """ | ||
| meta = get_model_meta(model_name, revision).model_copy(deep=True) | ||
| model = meta.load_model(device=device, **kwargs) | ||
| model = meta.load_model(device=device, embed_dim=embed_dim, **kwargs) |
Collaborator
There was a problem hiding this comment.
What do you think about letting embed_dim be part of kwargs?
Member
Author
There was a problem hiding this comment.
I've added it to args of get_model for more visibility of this feature
Contributor
|
This pull request has been automatically marked as stale due to inactivity. |
Contributor
KennethEnevoldsen
left a comment
There was a problem hiding this comment.
Ah great addition! Can the following tests:
- Ensure that it works with experiments
- ensure that the metadata saves when running a model corresponds to the embedding dimension used. Currently I think it will save a list
| array_framework: Literal["numpy", "torch"] = "numpy", | ||
| dtype: torch.dtype | np.floating = np.float32, | ||
| embed_dim: int = _EMBEDDING_DIM, | ||
| embed_dim: int | None = None, |
Contributor
There was a problem hiding this comment.
Why the change here?
Member
Author
There was a problem hiding this comment.
To match with SentenceTransformerWrapper
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.
Close #2832
Add Matryoshka support. Extended
ModelMeta.embedding_dimto support list for different embedding dimensions. Example: