Skip to content

Add SPLADE++ v2 sparse embedding support - #812

Open
IlyaKhalafi wants to merge 1 commit into
qdrant:mainfrom
IlyaKhalafi:feat/splade-pp-v2
Open

IlyaKhalafi wants to merge 1 commit into
qdrant:mainfrom
IlyaKhalafi:feat/splade-pp-v2

Conversation

@IlyaKhalafi

Copy link
Copy Markdown

This PR adds SPLADE++ v2 for English sparse retrieval. With this, documents and queries can use the author's ONNX model, including parallel embedding and lazy loading.

Fixes #272.

8 focused model tests, pre-commit, mypy and Pyright passed. GPU and the full model matrix were not run.

Checks

  • Followed the contribution guide and checked for existing PRs.
  • Added tests with canonical values from the original PyTorch model.
  • Included the reference generation snippet in the tests.
  • Installed pre-commit hooks and ran the tests locally.

@IlyaKhalafi
IlyaKhalafi requested a review from joein as a code owner October 13, 2026 09:50
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Review in Change Stack →

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: de49d9ba-f227-4aad-8221-9338cb0aa906
📥 Commits

Reviewing files that changed from the base of the PR and between f48af32 and a228f70.

📒 Files selected for processing (2)
  • fastembed/sparse/splade_pp.py
  • tests/test_sparse_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

The change adds prithivida/Splade_PP_en_v2 to the supported SPLADE models. SpladePP uses the base ONNX embedding implementation unless the model declares an input_mask input. In that case, it tokenizes documents and supplies input_ids, input_mask, and segment_ids. Tests add canonical v2 values and cover document and query embeddings, batching, custom-path loading, parallel processing, and lazy loading.

Priority: ➖ Normal

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

Change: Feature

Merge Risk: ⚪ Minimal · up to a228f

No actionable issue is established; the change is mergeable after normal checks.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Description check Passed The description clearly states that the pull request adds SPLADE++ v2 support for English sparse retrieval and identifies the tested embedding capabilities.
Title check Passed The title clearly and concisely identifies the main change: adding SPLADE++ v2 sparse embedding support.
Linked Issues check Passed Issue #272 requests support for prithivida/Splade_PP_en_v2. The PR adds this model to supported_splade_models with the ONNX path and model metadata. SpladePP.onnx_embed maps the v2 export inputs…
Out of Scope Changes check Passed The changes stay within Issue #272. The input-name adapter and the added tests directly support loading and validating the requested SPLADE++ v2 model. No unrelated product behavior or unrelated files…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

This branch has not been deployed

No deployments
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 Request]: adding prithivida/Splade_PP_en_v2

1 participant