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

matryoshka_dim=512 is not in a valid range. Select between 1 and 128. #519

Open
2 of 5 tasks
antonmark opened this issue Jan 21, 2025 · 2 comments
Open
2 of 5 tasks

Comments

@antonmark
Copy link

System Info

curl -X 'POST' 'https://localhost:8080/embeddings' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{
"model": "mixedbread-ai/mxbai-embed-large-v1",
"encoding_format": "float",
"dimensions": 512,
"input": [
"test 123"
],
"modality": "text"
}'
{
"error": {
"message": "<class 'infinity_emb.primitives.MatryoshkaDimError'> -> matryoshka_dim=512 is not in a valid range. Select between 1 and 128.",
"type": null,
"param": null,
"code": 400
}
}

Information

  • Docker + cli
  • pip + cli
  • pip + usage of Python interface

Tasks

  • An officially supported CLI command
  • My own modifications

Reproduction

  1. Start michaelf34/infinity:latest using: v2 --model-id mixedbread-ai/mxbai-embed-large-v1 --port 8080 --embedding-dtype ubinary
  2. Query embeddings API endpoint.
@michaelfeil
Copy link
Owner

Binary quantization (packed) and matryoshka does not pair well. In binary, 1 output will be packed into ~8/16 floats.

@antonmark
Copy link
Author

Interesting. I had picked the option based on this Mixedbread blog post:

https://www.mixedbread.ai/blog/binary-mrl#using-it-in-action

I might be missing some nuance here.

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

2 participants