Skip to content

Fix trainer adapter save fallback#1255

Merged
Blaizzy merged 3 commits into
mainfrom
pc/fix-trainer-adapter-file-default
Jun 1, 2026
Merged

Fix trainer adapter save fallback#1255
Blaizzy merged 3 commits into
mainfrom
pc/fix-trainer-adapter-file-default

Conversation

@Blaizzy
Copy link
Copy Markdown
Owner

@Blaizzy Blaizzy commented Jun 1, 2026

Summary

  • Resolve a fallback adapter save path when trainer args provide adapter_file=None
  • Apply the same resolved path to checkpoint and final saves in SFT and ORPO trainers
  • Add a regression test for the SFT save path

Fixes #908.

Validation

  • uv run --with pytest pytest mlx_vlm/tests/test_trainer.py -q
  • commit hooks: black, isort, autoflake

@Blaizzy Blaizzy added the codex label Jun 1, 2026
@Blaizzy Blaizzy marked this pull request as ready for review June 1, 2026 19:33
@Blaizzy Blaizzy merged commit 2bd1b19 into main Jun 1, 2026
1 check passed
@Blaizzy Blaizzy deleted the pc/fix-trainer-adapter-file-default branch June 1, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] sft_trainer crashes on checkpoint save — args.adapter_file is None

1 participant