Skip to content

feat: add frozen-weights option to training#327

Open
stephantul wants to merge 4 commits intomainfrom
update-trianing
Open

feat: add frozen-weights option to training#327
stephantul wants to merge 4 commits intomainfrom
update-trianing

Conversation

@stephantul
Copy link
Copy Markdown
Contributor

@stephantul stephantul commented Apr 30, 2026

This PR adds the option to not train w during finetuning. This is useful if the user wants to maintain performance on tasks.

Freezing w has a small but significant negative effect on performance. On desk freezing weights leads to an average loss of .6% macro f1, across 15 datasets. For similarity, however, training with frozen weights seems to improve performance.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
model2vec/train/base.py 98.08% <100.00%> (+0.01%) ⬆️
model2vec/train/classifier.py 98.13% <ø> (ø)
model2vec/train/similarity.py 100.00% <ø> (ø)
🚀 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 April 30, 2026 10:20
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