Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce18f73feb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| save_interval=10_000, | ||
| ephemeral_save_interval=500, | ||
| save_async=False, | ||
| pre_train_checkpoint=True, |
There was a problem hiding this comment.
Skip the pre-train save after resuming step zero
If a run is preempted after the initial step0 checkpoint finishes but before the first batch, the trainer restores that checkpoint from save_folder with global_step == 0, and this forced pre_train_checkpoint=True makes the callback immediately save step0 again. Because save_overwrite=False, the second save raises FileExistsError, so this otherwise valid full-state resume cannot proceed. Leave this as None or otherwise suppress the pre-train save when a checkpoint was loaded.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 5cc1619. Removed the forced pre_train_checkpoint=True so the standard checkpoint-aware default skips the save after loading step0. Overwrite protection and periodic checkpointing remain unchanged. The default also skips the redundant step-zero snapshot after loading the alignment parent.
Added a regression using the actual recipe callback for both mixed training (text_loss_share=0.9) and T100 (1.0), checking that a loaded step0 is discovered without another synchronous or asynchronous save. Both cases failed before the fix. Validation: 190 relevant CPU tests passed; Black, isort, Ruff, and git diff --check passed.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5cc1619a81
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| config.trainer.load_strategy != LoadStrategy.always | ||
| or config.trainer.load_optim_state is not False | ||
| or config.trainer.load_trainer_state is not False | ||
| ): |
There was a problem hiding this comment.
Reject no-checkpoints before the model handoff
When a short performance run sets --trainer.no_checkpoints=true, this validation still accepts the configuration, but Trainer.fit() gates the entire checkpoint-loading block on not self.no_checkpoints. The run therefore skips recipe.parent_checkpoint and silently trains the randomly initialized multimodal model instead of the aligned weights. Reject this flag for this recipe, or disable only the checkpoint-writing callback so the required model-only load still occurs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in dc99e51. Mixed-recipe validation now rejects trainer.no_checkpoints=true with an error directing users to trainer.callbacks.checkpointer.enabled=false. The latter disables only checkpoint writes and preserves parent/save-folder loading; the guide now documents it explicitly. Shared Trainer behavior is unchanged.
Added parameterized regressions for mixed training (text_loss_share=0.9) and T100 (1.0): reject no_checkpoints and accept write-only disabling while retaining the required model-only handoff configuration. Both rejection cases failed before the fix. Validation: 194 relevant CPU tests passed; Black, isort, Ruff, and git diff --check passed.
…es to vision The recipe, data module, entry point, calibration, guide and tests from rustins/native-mixed-midtraining. Two adaptations to the merged alignment code: the joint-alignment source builders register on import of vision_alignment_phases, and the caption source sets style_length_conditioning=True explicitly (vision's PixMoCapDatasetConfig default is False). Co-authored-by: RustinS <[email protected]>
Stack
Depends on #869 (vision alignment). This PR is based on
rustins/native-vision-alignmentso its diff contains only mixed midtraining. The intended landing branch is
vision;retarget after the alignment dependency lands there. No changes to the infrastructure
or alignment PRs are included.
Summary
Mixed-Midtraining.pythrough the standard internal experiment runner, with ajoint-alignment checkpoint as a model-only handoff and ordinary full-state resume.
distributed runtime and standalone evaluations.
scalar and grounded counting, pointing and filtered alignment replay. Preserve prepared
selections and exclusions; do not add Tulu to the visual mixture.
--recipe.text_loss_share=1.0for T100; source configurations and visual shares remainconfigurable with calibrated means.
two eight-GPU nodes and EP8. Use a 50B-position cosine horizon and 200-step warmup.
Preserve the parent router settings without introducing an RMS repair.
overrides and whole-recipe overrides that would bypass component construction.
The scope is nine files: two recipe/data modules, one entrypoint, two test files,
configuration documentation/calibration, a guide and its index entry. Profiler prototypes,
historical launch wrappers, checkpoints and evaluation result files are excluded.
Validation
161 CPU tests passed against the stacked source:
CUDA_VISIBLE_DEVICES='' PYTHONPATH=src python -m pytest -q \ src/test/internal/vision_midtraining_test.py \ src/test/internal/vision_midtraining_data_test.py \ src/test/data/multimodal/mixture_weights_test.py \ src/test/data/multimodal/grouped_mixture_test.py \ src/test/data/multimodal/text_only_collator_test.pyRuff, Black, isort and whitespace checks pass. Tests cover mixed/T100 defaults,
serialization, schedule/allocation consistency, source selection and duplicate point-style
expansion, calibration, overrides, grouped-loader resume and text-only collation.
The recipe has matched 2,000-attempted-step mixed/T100 runs and a completed frozen-vision
ablation with unchanged fast-text, decoded and sampled academic evaluations. Unfrozen vision
leads on five of six academic panels; frozen leads on VQAv2 and the small scalar-count
diagnostic. Frozen comparison evaluation.
These are bounded validation panels, not full official benchmarks, a certification of
unseen-data generalization, or validation of the complete 50B horizon. Counting and pointing
remain weaknesses. No new GPU training was run for this cleanup.