Adding support for binary embedding type to Cohere service embedding type#120751
Adding support for binary embedding type to Cohere service embedding type#120751ymao1 merged 12 commits intoelastic:mainfrom
Conversation
There was a problem hiding this comment.
Nice!
This looks good to merge, please make it a non draft PR when you are ready.
If it is simple to add in this PR then Jina AI also have binary embeddings. They have a good blog at https://jina.ai/news/binary-embeddings-all-the-ai-3125-of-the-fat/
...ore/src/main/java/org/elasticsearch/xpack/core/inference/results/InferenceByteEmbedding.java
Outdated
Show resolved
Hide resolved
…inference/results/InferenceByteEmbedding.java Co-authored-by: David Kyle <david.kyle@elastic.co>
|
Hi @ymao1, I've created a changelog YAML for you. |
I will do this in a follow-up PR! |
|
It looks like this PR modifies one or more |
|
Reverted the docs change due to the docs freeze, looks like I'll have to create a PR to 8.x for the asciidocs change and then an issue in https://github.com/elastic/docs-content/issues to get the docs update to 9.0 |
|
Pinging @elastic/ml-core (Team:ML) |
💔 Backport failed
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
|
Documentation request made in elastic/docs-content#310 |
…dding type (#120751) (#121584) * Adding support for binary embedding type to Cohere service embedding type (#120751) * Adding support for binary embedding type to Cohere service embedding type * Returning response in separate text_embedding_bits field * Update x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/inference/results/InferenceByteEmbedding.java Co-authored-by: David Kyle <david.kyle@elastic.co> * Update docs/changelog/120751.yaml * Reverting docs change --------- Co-authored-by: David Kyle <david.kyle@elastic.co> (cherry picked from commit 89d71e1) # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java # x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/inference/results/InferenceTextEmbeddingByteResults.java * Adding docs
Towards #111747
Summary
Adds support for binary embedding type in the Cohere
text_embeddingtask.Usage
Notes
Requesting a binary embedding from Cohere returns an array of binary embeddings encoded as bytes with
int8precision. Since this aligns with what is expected as input when you specify adense_vectormapping withelement_type: bit, we do not perform any bit unpacking on the Cohere response and handle the bytes as-is.