Skip to content

Commit

Permalink
Print sum of params
Browse files Browse the repository at this point in the history
  • Loading branch information
liujch1998 committed Oct 21, 2024
1 parent 003cd29 commit e67812c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/beaker/peteish/peteish1-eval-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gantry run \
--shared-memory 10GiB \
--yes \
--timeout=-1 \
-- /bin/bash -c "scripts/beaker/peteish/peteish1.sh ${NUM_NODES}"
-- /bin/bash -c "scripts/beaker/peteish/peteish1-eval.sh ${NUM_NODES}"
# -- /bin/bash -c "scripts/beaker/peteish/peteish1.sh \$BEAKER_LEADER_REPLICA_HOSTNAME ${NUM_NODES} \$BEAKER_REPLICA_RANK"

# --leader-selection \
Expand Down
3 changes: 3 additions & 0 deletions scripts/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ def dummy_init_fn(module: torch.nn.Module) -> None:
sharded_checkpointer=cfg.load_path_sharded_checkpointer,
)
log.info("Checkpoint successfully loaded")
# compute and print the sum of the value of all parameters in the model
log.info(f"Sum of all parameters: {sum(p.sum().item() for p in olmo_model.parameters())}")
continue

log.info("Starting evaluating...")
eval_metrics = trainer.eval()
Expand Down

0 comments on commit e67812c

Please sign in to comment.