Skip to content

feat: Add a sparse encoder. - #422

Merged
stephantul merged 5 commits into
mainfrom
sparse
Dec 1, 2026
Merged

stephantul merged 5 commits into
mainfrom
sparse

Conversation

@stephantul

Copy link
Copy Markdown
Contributor

This PR adds a sparse encoder and Sentence Transformers support for that sparse encoder.

@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.97436% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
model2vec/base.py 95.78% 4 Missing ⚠️
Files with missing lines Coverage Δ
model2vec/model.py 99.32% <100.00%> (+1.61%) ⬆️
model2vec/persistence/__init__.py 100.00% <100.00%> (ø)
model2vec/persistence/persistence.py 99.02% <100.00%> (+0.16%) ⬆️
model2vec/sentence-transformers/sparse_encoder.py 100.00% <100.00%> (ø)
model2vec/sparse.py 100.00% <100.00%> (ø)
model2vec/train/base.py 100.00% <100.00%> (ø)
model2vec/types.py 100.00% <100.00%> (ø)
model2vec/utils.py 94.11% <100.00%> (+0.36%) ⬆️
model2vec/base.py 95.78% <95.78%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5 · Fix the loss of valid words in sparse encoding before merging.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes reach sparse encoding, model saving and loading, and Sentence Transformers users.

Fix the loss of valid words in sparse encoding before merging.

Reviews (1) · Last reviewed commit: "fix sparse" · Reviewed by Greptile

Comment thread model2vec/sparse.py Resolved
Comment thread model2vec/sparse.py Resolved
@stephantul
stephantul merged commit 8933f9e into main Dec 1, 2026
12 of 13 checks passed
@stephantul
stephantul deleted the sparse branch December 1, 2026 17:04
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