Skip to content

Support variable length embeddings #184

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

Closed
adri1wald opened this issue Jan 26, 2024 · 3 comments
Closed

Support variable length embeddings #184

adri1wald opened this issue Jan 26, 2024 · 3 comments

Comments

@adri1wald
Copy link
Contributor

Describe the feature or improvement you're requesting

From the blog on new embedding models:

Both of our new embedding models were trained with a technique that allows developers to trade-off performance and cost of using embeddings. Specifically, developers can shorten embeddings (i.e. remove some numbers from the end of the sequence) without the embedding losing its concept-representing properties by passing in the dimensions API parameter. For example, on the MTEB benchmark, a text-embedding-3-large embedding can be shortened to a size of 256 while still outperforming an unshortened text-embedding-ada-002 embedding with a size of 1536.

Based on the API reference, this is available via a new parameter on the embedding request called dimensions (optional integer).

Additional context

I'm happy to write a PR for this.

@64bit
Copy link
Owner

64bit commented Jan 26, 2024

Thank you for the detailed description. PR is most welcome!

@vmg-dev
Copy link
Contributor

vmg-dev commented Jan 29, 2024

Opened a PR for this here: #185

@64bit
Copy link
Owner

64bit commented Jan 30, 2024

This is released in v0.18.2.

Thank you all!

@64bit 64bit closed this as completed Jan 30, 2024
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

No branches or pull requests

3 participants