fix: pin padding_free=False to keep max_length enforced (trl 1.6+)
Newer Unsloth versions auto-enable SFTConfig's padding_free when it's left unset, which conflicts with an explicit max_length + packing=False and raises a ValueError at SFTTrainer init. Verified end-to-end on a GTX 1650 (4GB VRAM): 60 steps complete cleanly, peak reserved memory 1.543 GB (42% of total), train_loss 1.662 -> 1.264.
This commit is contained in:
parent
70c981b377
commit
a28991ee08
1 changed files with 2 additions and 0 deletions
|
|
@ -94,6 +94,8 @@ def main():
|
|||
max_length = max_seq_length,
|
||||
dataset_num_proc = 2,
|
||||
packing = False, # True can spike VRAM on variable-length samples
|
||||
padding_free = False, # Unsloth auto-enables this when unset, which conflicts
|
||||
# with an explicit max_length + packing=False (trl 1.6+)
|
||||
)
|
||||
|
||||
# ── 5. Initialize trainer ─────────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue