Skip to content

feat(text): support Granite 107M multilingual embeddings - #759

Closed
Coding-Professional wants to merge 1 commit into
qdrant:mainfrom
Coding-Professional:feat/538-granite-multilingual
Closed

Coding-Professional wants to merge 1 commit into
qdrant:mainfrom
Coding-Professional:feat/538-granite-multilingual

Conversation

@Coding-Professional

@Coding-Professional Coding-Professional commented Oct 2, 2026 •

Copy link
Copy Markdown

Summary

  • Register ibm-granite/granite-embedding-107m-multilingual as a built-in text model so TextEmbedding can load its upstream ONNX weights directly.
  • Use the existing CLS pooling and L2 normalization path, matching the model's reference implementation (384 dimensions, 512-token limit).
  • Add a canonical vector from a float32 PyTorch AutoModel run to the model regression tests.

Fixes #538

Validation

  • Loaded the real ONNX model and checked English/French embeddings, 384-dimensional float32 output, unit norms, and query embedding.
  • Confirmed the ONNX vector matches the independent PyTorch reference.
  • Focused pytest: 9 passed; canonical vector regression passed for the new model.
  • Ruff check, Ruff format check, and git diff --check passed.

The full all-model test matrix was not run locally because it downloads every supported model.

Copilot AI balanced review requested due to automatic review settings October 2, 2026 21:03

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: dd38e738-15b3-45b9-8736-b4bcd0528ecc

📥 Commits

Reviewing files that changed from the base of the PR and between 7d36728 and e0ba4c8.

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

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The ONNX text model catalog now includes ibm-granite/granite-embedding-107m-multilingual, with its model dimensions, license, size, source, file name, and model description. The embedding tests now include a canonical vector for this model.

Priority: ⬇️ Low

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

Change: Feature

Suggested reviewers: joein

Merge Risk: ⚪ Minimal · up to e0ba4

Granite is registered against its published model artifact, and the canonical test covers its embedding output. No actionable merge risk was found.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue [#538] requests support for the IBM Granite multilingual embedding model. The pull request adds ibm-granite/granite-embedding-107m-multilingual to the ONNX text model catalog with model metada…
Out of Scope Changes check ✅ Passed The changes are limited to registering the model in fastembed/text/onnx_embedding.py and adding its expected embedding vector in tests/test_text_onnx_embeddings.py. Both changes support the model …
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Title check ✅ Passed The title clearly identifies the main change: support for Granite 107M multilingual embeddings. It is concise and specific.
Description check ✅ Passed The description directly explains the model registration, implementation details, validation results, and test coverage for the changeset.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@joein

joein commented Oct 3, 2026

Copy link
Copy Markdown
Member

Hey @Coding-Professional

I think this can be used via add_custom_model, can't it?

@joein

joein commented Oct 5, 2026

Copy link
Copy Markdown
Member

Thank you for your work!
Though, since we're trying to prevent our model zoo from bloating, we recommend using this model via add_custom_model interface.

@joein joein closed this Oct 5, 2026
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.

[Model]: granite-embedding-107m-multilingual

3 participants