Skip to content

feat: add Arctic Embed 2.0 (M and L) models - #656

Open
dyiapanis wants to merge 3 commits into
qdrant:mainfrom
dyiapanis:feat/add-arctic-embed-2.0
Open

feat: add Arctic Embed 2.0 (M and L) models#656
dyiapanis wants to merge 3 commits into
qdrant:mainfrom
dyiapanis:feat/add-arctic-embed-2.0

Conversation

@dyiapanis

@dyiapanis dyiapanis commented Aug 2, 2026

Copy link
Copy Markdown

Add Snowflake/snowflake-arctic-embed-m-v2.0 (768 dims, GTE-based, multilingual, 8192 tokens) and Snowflake/snowflake-arctic-embed-l-v2.0 (1024 dims, XLM-RoBERTa-based, multilingual, 8192 tokens).

Arctic Embed 2.0 adds multilingual support (100+ languages) without sacrificing English performance. Both models support 8192 token context (16x longer than Arctic Embed 1.0's 512 tokens).

Canonical vectors generated via:

  • M: ONNX runtime inference (same execution path as fastembed)
  • L: sentence-transformers + PyTorch (reference implementation)

Both models use Apache-2.0 license and are available on HuggingFace with pre-built ONNX exports.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass the existing tests?
  • Have you added tests for your feature?
  • Have you installed pre-commit with pip3 install pre-commit and set up hooks with pre-commit install?

New models submission:

  • Have you added an explanation of why it's important to include this model?
  • Have you added tests for the new model? Were canonical values for tests computed via the original model?
  • Have you added the code snippet for how canonical values were computed?
  • Have you successfully ran tests with your changes locally?

Add Snowflake/snowflake-arctic-embed-m-v2.0 (768 dims, GTE-based,
multilingual, 8192 tokens) and Snowflake/snowflake-arctic-embed-l-v2.0
(1024 dims, XLM-RoBERTa-based, multilingual, 8192 tokens).

Arctic Embed 2.0 adds multilingual support (100+ languages) without
sacrificing English performance. Both models support 8192 token context
(16x longer than Arctic Embed 1.0's 512 tokens).

Canonical vectors generated via:
- M: ONNX runtime inference (same execution path as fastembed)
- L: sentence-transformers + PyTorch (reference implementation)

Both models use Apache-2.0 license and are available on HuggingFace
with pre-built ONNX exports.
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ae982998-3726-4f88-a581-c1a8a6182c51

📥 Commits

Reviewing files that changed from the base of the PR and between 6f097a4 and 03ba47c.

📒 Files selected for processing (1)
  • fastembed/text/onnx_embedding.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • fastembed/text/onnx_embedding.py

📝 Walkthrough

Walkthrough

The PR adds medium and large Snowflake Arctic Embed v2.0 multilingual ONNX models to the supported model registry. It defines their embedding dimensions, token limits, licenses, sizes, sources, and file paths. It also adds canonical test vectors for both models.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • qdrant/fastembed#602: Adds other multilingual ONNX embedding models and corresponding canonical test vectors.

Suggested reviewers: joein

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the addition of Arctic Embed 2.0 medium and large models.
Description check ✅ Passed The description explains the added models, their capabilities, testing, licensing, and query-prefix usage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@fastembed/text/onnx_embedding.py`:
- Line 175: Update the model descriptors for
Snowflake/snowflake-arctic-embed-m-v2.0 and
Snowflake/snowflake-arctic-embed-l-v2.0 to state “74 languages” instead of “100+
languages,” unless a revision-specific source in the descriptors substantiates
the broader claim.
- Line 177: Update the Snowflake Arctic-Embed v2.0 handling in OnnxTextModel so
query inputs receive the required “query: ” prefix before tokenization, or
revise both query/document prefix descriptions to clearly require callers to add
it. Ensure the documented contract matches the actual preprocessing behavior for
v2.0 models.
- Around line 194-195: Update the large model descriptor in the relevant model
configuration to include onnx/model.onnx_data alongside onnx/model.onnx in its
allowed/downloaded model files, ensuring the external ONNX data file is cached
with the model.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f2f124ae-7a9f-4327-9f08-cb0c33a1a8f5

📥 Commits

Reviewing files that changed from the base of the PR and between 0892291 and 9077980.

📒 Files selected for processing (2)
  • fastembed/text/onnx_embedding.py
  • tests/test_text_onnx_embeddings.py

Comment thread fastembed/text/onnx_embedding.py Outdated
Comment thread fastembed/text/onnx_embedding.py Outdated
Comment thread fastembed/text/onnx_embedding.py
D Yiapanis added 2 commits August 2, 2026 22:28
…, and L model external data

- Change '100+ languages' to '74 languages' (per HuggingFace model card metadata)
- Update prefix description: Arctic Embed 2.0 recommends 'query: ' prefix for retrieval queries
- Add additional_files=['onnx/model.onnx_data'] for L model (external ONNX data file required for loading)
Make the prefix description unambiguous: the caller is responsible for
prepending 'query: ' to retrieval queries. Matches the convention used
by existing Arctic Embed v1 model descriptions.
@dyiapanis

Copy link
Copy Markdown
Author

Re: CodeRabbit Review — Query Prefix (Comment 2)

Updated the description in commit 6f097a4 to make the prefix contract unambiguous:

query: prefix should be prepended to retrieval queries by the caller, 2025 year.

Why descriptor-only (no code change):

fastembed does not automatically apply query/passage prefixes for any model — including existing Arctic Embed v1 models whose descriptions say "Prefixes for queries/documents: necessary". The OnnxTextEmbedding class inherits TextEmbeddingBase.query_embed, which calls self.embed([query]) without modification. Prefixes are the caller's responsibility, consistent across all registered models.

The updated description now makes this explicit: callers must prepend query: themselves. This matches the pattern used by all other models in the registry that require prefixes.

@dyiapanis
dyiapanis force-pushed the feat/add-arctic-embed-2.0 branch from 6f097a4 to 03ba47c Compare August 4, 2026 07:55
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.

1 participant