Skip to content

fix: don't set weights for non-quantized models#321

Merged
stephantul merged 1 commit intomainfrom
dont-set-weights
Apr 16, 2026
Merged

fix: don't set weights for non-quantized models#321
stephantul merged 1 commit intomainfrom
dont-set-weights

Conversation

@stephantul
Copy link
Copy Markdown
Contributor

In the current version of model2vec, we set the weights parameter to the zipf weights we create during distillation. However, this has the unfortunate consequence of leading to different results for sentence transformers and model2vec itself. Sentence transformers does not read the weights vector, and does not apply it. This has a small negative effect on performance on models that are directly used in sentence-transformers.

@stephantul stephantul requested a review from Pringled April 16, 2026 14:12
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
model2vec/distill/distillation.py 90.27% <100.00%> (+0.27%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stephantul stephantul merged commit 582da09 into main Apr 16, 2026
9 checks passed
@stephantul stephantul deleted the dont-set-weights branch April 16, 2026 15:49
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.

2 participants