Skip to content

fix: add token dropout to pair trainer - #393

Merged
stephantul merged 1 commit into
mainfrom
add-token-drop-in-pair
Oct 8, 2026
Merged

stephantul merged 1 commit into
mainfrom
add-token-drop-in-pair

Conversation

@stephantul

Copy link
Copy Markdown
Contributor

This PR adds token dropout to the pair trainer, which did not have it before due to a GRAVE (💀 ) mistake

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds token dropout parameter to pair trainer.

This PR appears safe to merge.

What we checked:

  • Dropout stays off during validation: Validation switches the model to evaluation mode, which skips dropout. Training also ends in evaluation mode.
  • Dropout keeps nonempty texts nonempty: The shared helper keeps the first token when a nonempty text would otherwise lose every token. Both pair halves use that helper.

Reviews (1) · Last reviewed commit: "fix: add token dropout to pair trainer" · Reviewed by Greptile

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

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

@stephantul
stephantul merged commit 83b72b8 into main Oct 8, 2026
12 checks passed
@stephantul
stephantul deleted the add-token-drop-in-pair branch October 8, 2026 14:57
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