We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 496d315 commit 038cd03Copy full SHA for 038cd03
src/olmo_core/distributed/checkpoint/__init__.py
@@ -204,7 +204,9 @@ def load_model_and_optim_state(
204
log.info(
205
f"Mapping current key '{current_key}' to key '{original_key}' in checkpoint"
206
)
207
- state_dict[original_key] = state_dict.pop(current_key)
+ current_root, current_key = current_key.split(".", 1)
208
+ original_root, original_key = original_key.split(".", 1)
209
+ state_dict[original_root][original_key] = state_dict[current_root].pop(current_key)
210
211
dist_cp.load(
212
state_dict,
0 commit comments