Skip to content

fix: disable padding during distill and inference - #376

Merged
stephantul merged 4 commits into
mainfrom
disable-padding
Sep 21, 2026
Merged

stephantul merged 4 commits into
mainfrom
disable-padding

Conversation

@stephantul

Copy link
Copy Markdown
Contributor

This PR adds a padding fix. It is possible for models to have a built-in padding module. We would not ignore this, thus inadvertently adding padding during inference. This fortunately rarely matters, since the padding tokens are usually 0 tokens/have low weight.

@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
model2vec/model.py 97.53% <100.00%> (+0.03%) ⬆️
model2vec/tokenizer/tokenizer.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stephantul
stephantul requested a review from Pringled September 20, 2026 19:42

@Pringled Pringled left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@stephantul
stephantul merged commit 4944940 into main Sep 21, 2026
11 checks passed
@stephantul
stephantul deleted the disable-padding branch September 21, 2026 06:00
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