Skip to content
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

fix: fallback for calculation embedding dimensions if not available #44

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

undo76
Copy link
Contributor

@undo76 undo76 commented Nov 6, 2024

Related to #43, where the number of embedding dimensions is missing, I am adding a fallback mechanism that embeds a dummy sentence in order to infer the number of dimensions if they are not available in the configuration.

@undo76 undo76 requested a review from lsorber November 6, 2024 16:50
@undo76 undo76 self-assigned this Nov 7, 2024
@lsorber
Copy link
Member

lsorber commented Nov 22, 2024

Thanks for the PR @undo76! I added a commit that moves the get_embedding_dim function to the _litellm.py module because I think it's a useful function that other modules may also want to use. I also took the opportunity to add a second model info function to grab the LLM's context size as well. Unless you have any comments, I'll merge when the pipeline succeeds.

@undo76
Copy link
Contributor Author

undo76 commented Nov 22, 2024

Both changes look like an improvement, indeed. Thanks for merging them.

@lsorber lsorber merged commit 776e0c5 into main Nov 22, 2024
2 checks passed
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.

2 participants