Skip to content

fix: drop warmup_ratio in favour of warmup_steps#18

Closed
Neonkraft wants to merge 2 commits into
mainfrom
fix/warmup-ratio
Closed

fix: drop warmup_ratio in favour of warmup_steps#18
Neonkraft wants to merge 2 commits into
mainfrom
fix/warmup-ratio

Conversation

@Neonkraft
Copy link
Copy Markdown
Collaborator

Summary

Drop warmup_ratio from TrainingConfig and make warmup_steps a float. The original bug: warmup_ratio (e.g. 0.03) was being forwarded to warmup_steps (an int field in TrainingArguments), silently truncating to 0 and disabling warmup entirely. HuggingFace TrainingArguments already interprets a float value for warmup_steps as a ratio, so a single float field covers both use cases with no special handling needed.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Performance
  • Documentation
  • Maintenance

warmup_ratio (float 0.03) was passed to warmup_steps (int), truncating
to 0 and silently disabling warmup entirely. Add a warmup_steps config
field (default 0) and forward both fields to TrainingArguments so each
reaches the correct parameter.
Removes the separate warmup_ratio field; warmup_steps now accepts a float
(interpreted as a ratio by TrainingArguments) or int (absolute steps),
matching HuggingFace's own convention. Updates all example configs and
the guardrails display row accordingly.
@Neonkraft Neonkraft requested a review from KonstiNik April 29, 2026 13:40
@Neonkraft Neonkraft closed this Apr 29, 2026
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