Skip to content

Consolidate CLI code in public scripts - #379

Merged
epwalsh merged 6 commits into
mainfrom
epwalsh/official-scripts
Sep 19, 2025
Merged

epwalsh merged 6 commits into
mainfrom
epwalsh/official-scripts

Conversation

@epwalsh

@epwalsh epwalsh commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@epwalsh
epwalsh marked this pull request as ready for review September 18, 2025 23:56

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.


train_module_config = TransformerTrainModuleConfig(
rank_microbatch_size=4 * SEQUENCE_LENGTH,
rank_microbatch_size=4 * 4096,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Scripts Ignore Sequence Length for Batch Size

The OLMo-2-0325-32B-train.py and OLMo-2-0325-32B-anneal.py scripts hardcode 4096 in global and microbatch size calculations. This means batch sizes don't scale with the configurable opts.sequence_length as they did previously, making the --sequence-length parameter ineffective for controlling batch sizes.

Additional Locations (1)

Fix in Cursor Fix in Web

@epwalsh
epwalsh merged commit 45d2031 into main Sep 19, 2025
@epwalsh
epwalsh deleted the epwalsh/official-scripts branch September 19, 2025 00:06
@github-actions

Copy link
Copy Markdown

This PR has been released in v2.3.0.

b-dickson pushed a commit to b-dickson/OLMo-core that referenced this pull request Jan 26, 2026
jason718 added a commit that referenced this pull request Sep 29, 2026
… 1 and 2); keep the last 5 in stage 1 (#893)

Adds UnshardedModelExportCallback: after each permanent checkpoint, rank 0 re-reads the saved
DCP state in a background bookkeeping thread and writes model.safetensors (the full model state
dict, no optimizer state) and olmo_core_config.json into the step directory, next to
model_and_optim/. The DCP state stays for resuming; evals (olmo-eval's olmo_core_vlm provider)
read the single file instead of the 256-shard DCP state (olmo-eval issue #379). Ephemeral
checkpoints are skipped, the files appear atomically, and no collectives are used, so it also
works with async checkpointing. The reader, load_unsharded_model_state(), may run on one rank
of a distributed job.

Molmo2-Stage1.py and Molmo2-Stage2.py enable it; stage 1 now keeps the last 5 permanent
checkpoints (was all).

On the v2 stage-1 run's step 32000 (4.46B params, fp32): 814/814 tensors bit-identical to
src/scripts/unshard.py's export, export 76 s off the training thread, +19.4 GB per checkpoint
(49 -> 68 GB); a cold full load takes 9.8 s from safetensors.
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