Repository navigation
Fix Olmo Hybrid weight loading in GRPO - #1844
Conversation
…loader # Conflicts: # CHANGELOG.md
abhishekraok
left a comment
There was a problem hiding this comment.
Codex · codex://threads/01a0d61a-a285-7931-ab3a-39b0134c4a25
Codex and claude-personal independently reviewed head 3d152db58. The fix is valid: both GRPO loading paths need the Hybrid dispatcher, and the final model.load_state_dict(...) is necessary because the Hybrid converter replaces state-dict tensors rather than copying in place. No new correctness finding was identified.
Recommended action: resolve the conflicts with current main in open_instruct/olmo_core_utils.py and CHANGELOG.md, retaining both load_hf_weights_into_model and main's initialize_promoted_token_embeddings, plus both changelog entries. Rerun checks on that resolved tree before merging.
Validation: 9 focused CPU tests passed, with the existing Triton-dependent parameter-coverage test excluded on this Mac; Ruff check and format passed for all three changed Python files. Claude-personal independently passed the same 9 tests and observed the Triton import failure in the remaining test. GPU/FSDP loading and a real Hybrid checkpoint were not exercised.
abhishekraok
left a comment
There was a problem hiding this comment.
Codex · codex://threads/01a08720-4354-71f2-bceb-d65a229b9183
Rechecked head 0637a5d and its clean merge with current main. No blocking code findings. The dispatcher routes Hybrid checkpoints correctly, and the helper loads replaced state-dict tensors back into both model-loading paths. The loader functions are unchanged from the previously independently reviewed implementation; main's promoted-token initializer is preserved exactly.
Ruff lint, formatting, and compilation pass for all three Python files. Required GitHub unit tests and code-quality checks are now running after maintainer workflow approval. Merge remains conditional on those passing. GPU/FSDP startup was not exercised by this review.
Fixes #1842.
The OLMo-core GRPO actor bypassed the model-type dispatcher when loading reference-policy and post-parallelization weights. Hybrid checkpoints therefore reached the generic converter and failed on GDN
linear_attn.*keys. Both loading sites now use the dispatcher, and replaced state-dict values are loaded back into the model.The merge with current main preserves both this PR's
load_hf_weights_into_modelhelper and upstreaminitialize_promoted_token_embeddingsunchanged. The changelog retains both entries.Validation at
0637a5d:multiprocessing.ForkProcess; the checks above do not claim full module, FSDP, or GPU validation.Earlier pre-merge CPU validation is recorded in the PR history. No GPU GRPO startup test was run for this merge.
GPU_TESTS=bypass
AI-assisted implementation and conflict resolution.