Add fast MCQA #8
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add an option to specify MCQA tasks using 1 forward pass instead of 4 forward passes (only works with single-token continuations, will throw failure otherwise)
To test:
torchrun --nproc-per-node=1 src/scripts/train/OLMo2-ladder.py train 190M 5xC ai2/jupiter-cirrascale-2 \ --trainer.callbacks.downstream_evaluator.eval_on_startup=true \ --trainer.callbacks.downstream_evaluator.cancel_after_first_eval=true \ --launch.num_gpus=1 \ --ladder.save_folder=/tmp/debug \ --trainer.save_folder=/tmp/debug \ --launch.allow_dirty=True \ --trainer.callbacks.downstream_evaluator.tasks=[arc_challenge_test_mc_5shot_fast,arc_challenge_test_mc_5shot]Outputs:
To test on the canonical task suite:
Output on original setup:
2025-05-16 21:22:15.614 triton-cs-aus-454.reviz.ai2.in:0 olmo_core.train.callbacks.evaluator_callback:171 INFO Evaluation speed: copycolors_10way (accuracy) (+variants): 4.8 sec (10 batches) codex_humaneval_gold_bpb_0shot (BPB) (+variants): 5.3 sec (4 batches) mmlu_other_val_mc_5shot (length-normalized accuracy) (+variants): 15.2 sec (71 batches) codex_mbpp_gold_bpb_0shot (BPB) (+variants): 15.4 sec (30 batches) mmlu_social_sciences_val_mc_5shot (length-normalized accuracy) (+variants): 15.5 sec (75 batches) mmlu_stem_val_mc_5shot (length-normalized accuracy) (+variants): 15.6 sec (50 batches) winogrande_val_rc_5shot (length-normalized accuracy) (+variants): 16.6 sec (25 batches) piqa_val_mc_5shot (accuracy) (+variants): 34.2 sec (109 batches) minerva_math_counting_and_probability_gold_bpb_0shot (BPB) (+variants): 38.9 sec (37 batches) socialiqa_val_mc_5shot (accuracy) (+variants): 41.6 sec (85 batches) csqa_val_mc_5shot (accuracy) (+variants): 42.8 sec (89 batches) arc_challenge_test_mc_5shot (accuracy) (+variants): 43.6 sec (91 batches) mmlu_humanities_val_mc_5shot (length-normalized accuracy) (+variants): 44.3 sec (160 batches) minerva_math_number_theory_gold_bpb_0shot (BPB) (+variants): 48.9 sec (39 batches) minerva_math_prealgebra_gold_bpb_0shot (BPB) (+variants): 61.9 sec (55 batches) arc_easy_test_mc_5shot (accuracy) (+variants): 68.7 sec (183 batches) gsm8k_gold_bpb_5shot (BPB) (+variants): 69.0 sec (58 batches) minerva_math_geometry_gold_bpb_0shot (BPB) (+variants): 69.2 sec (37 batches) hellaswag_rc_5shot (length-normalized accuracy) (+variants): 84.3 sec (77 batches) minerva_math_precalculus_gold_bpb_0shot (BPB) (+variants): 94.2 sec (42 batches) minerva_math_algebra_gold_bpb_0shot (BPB) (+variants): 96.9 sec (92 batches) mmlu_other_test_mc_5shot (length-normalized accuracy) (+variants): 139.8 sec (721 batches) mmlu_social_sciences_test_mc_5shot (length-normalized accuracy) (+variants): 140.1 sec (684 batches) minerva_math_intermediate_algebra_gold_bpb_0shot (BPB) (+variants): 140.2 sec (70 batches) mmlu_stem_test_mc_5shot (length-normalized accuracy) (+variants): 142.4 sec (525 batches) mmlu_humanities_test_mc_5shot (length-normalized accuracy) (+variants): 397.5 sec (1448 batches) Total evaluation time: 1887.0 seconds (4867 batches)Output on new setup:
2025-05-17 02:34:16.010 triton-cs-aus-454.reviz.ai2.in:0 olmo_core.train.callbacks.evaluator_callback:171 INFO Evaluation speed: copycolors_10way_fast (accuracy) (+variants): 0.8 sec (1 batches) mmlu_stem_val_mc_5shot_fast (length-normalized accuracy) (+variants): 4.5 sec (13 batches) mmlu_other_val_mc_5shot_fast (length-normalized accuracy) (+variants): 4.6 sec (18 batches) mmlu_social_sciences_val_mc_5shot_fast (length-normalized accuracy) (+variants): 4.8 sec (19 batches) codex_humaneval_gold_bpb_0shot (BPB) (+variants): 4.8 sec (4 batches) csqa_val_mc_5shot_fast (accuracy) (+variants): 10.3 sec (18 batches) mmlu_humanities_val_mc_5shot_fast (length-normalized accuracy) (+variants): 12.3 sec (40 batches) codex_mbpp_gold_bpb_0shot (BPB) (+variants): 14.4 sec (30 batches) arc_challenge_test_mc_5shot_fast (accuracy) (+variants): 15.0 sec (23 batches) socialiqa_val_mc_5shot_fast (accuracy) (+variants): 15.2 sec (29 batches) winogrande_val_rc_5shot (length-normalized accuracy) (+variants): 15.7 sec (25 batches) piqa_val_mc_5shot_fast (accuracy) (+variants): 19.0 sec (55 batches) arc_easy_test_mc_5shot_fast (accuracy) (+variants): 20.5 sec (46 batches) minerva_math_counting_and_probability_gold_bpb_0shot (BPB) (+variants): 36.0 sec (37 batches) mmlu_stem_test_mc_5shot_fast (length-normalized accuracy) (+variants): 40.4 sec (132 batches) mmlu_social_sciences_test_mc_5shot_fast (length-normalized accuracy) (+variants): 40.4 sec (171 batches) mmlu_other_test_mc_5shot_fast (length-normalized accuracy) (+variants): 40.5 sec (181 batches) minerva_math_number_theory_gold_bpb_0shot (BPB) (+variants): 45.4 sec (39 batches) minerva_math_prealgebra_gold_bpb_0shot (BPB) (+variants): 58.1 sec (55 batches) minerva_math_geometry_gold_bpb_0shot (BPB) (+variants): 62.8 sec (37 batches) gsm8k_gold_bpb_5shot (BPB) (+variants): 65.0 sec (58 batches) hellaswag_rc_5shot (length-normalized accuracy) (+variants): 79.9 sec (77 batches) minerva_math_precalculus_gold_bpb_0shot (BPB) (+variants): 87.0 sec (42 batches) minerva_math_algebra_gold_bpb_0shot (BPB) (+variants): 88.7 sec (92 batches) mmlu_humanities_test_mc_5shot_fast (length-normalized accuracy) (+variants): 108.1 sec (362 batches) minerva_math_intermediate_algebra_gold_bpb_0shot (BPB) (+variants): 127.5 sec (70 batches) Total evaluation time: 1021.8 seconds (1674 batches)Here is new new and old config based on this
Here is the speed for that set:
2025-05-17 11:25:23.908 triton-cs-aus-454.reviz.ai2.in:0 olmo_core.train.callbacks.evaluator_callback:171 INFO Evaluation speed: copycolors_10way_fast (accuracy) (+variants): 0.9 sec (1 batches) codex_humaneval_gold_bpb_0shot (BPB) (+variants): 5.1 sec (4 batches) arc_challenge_test_mc_5shot_fast (accuracy) (+variants): 12.1 sec (23 batches) arc_challenge_test_bpb_5shot (BPB) (+variants): 12.5 sec (17 batches) codex_mbpp_gold_bpb_0shot (BPB) (+variants): 15.1 sec (30 batches) arc_easy_test_bpb_5shot (BPB) (+variants): 15.8 sec (35 batches) arc_easy_test_mc_5shot_fast (accuracy) (+variants): 20.9 sec (46 batches) hellaswag_bpb_5shot (BPB) (+variants): 21.1 sec (20 batches) mmlu_social_sciences_test_bpb_5shot (BPB) (+variants): 31.9 sec (76 batches) mmlu_other_test_bpb_5shot (BPB) (+variants): 33.9 sec (141 batches) mmlu_stem_test_bpb_5shot (BPB) (+variants): 34.0 sec (105 batches) minerva_math_counting_and_probability_gold_bpb_0shot (BPB) (+variants): 39.6 sec (37 batches) mmlu_stem_test_mc_5shot_fast (length-normalized accuracy) (+variants): 40.9 sec (132 batches) mmlu_social_sciences_test_mc_5shot_fast (length-normalized accuracy) (+variants): 41.0 sec (171 batches) mmlu_other_test_mc_5shot_fast (length-normalized accuracy) (+variants): 41.2 sec (181 batches) minerva_math_number_theory_gold_bpb_0shot (BPB) (+variants): 48.8 sec (39 batches) minerva_math_prealgebra_gold_bpb_0shot (BPB) (+variants): 63.4 sec (55 batches) minerva_math_geometry_gold_bpb_0shot (BPB) (+variants): 68.5 sec (37 batches) gsm8k_gold_bpb_5shot (BPB) (+variants): 68.5 sec (58 batches) minerva_math_precalculus_gold_bpb_0shot (BPB) (+variants): 96.7 sec (42 batches) minerva_math_algebra_gold_bpb_0shot (BPB) (+variants): 97.0 sec (92 batches) mmlu_humanities_test_bpb_5shot (BPB) (+variants): 102.5 sec (362 batches) mmlu_humanities_test_mc_5shot_fast (length-normalized accuracy) (+variants): 109.9 sec (362 batches) minerva_math_intermediate_algebra_gold_bpb_0shot (BPB) (+variants): 137.0 sec (70 batches) Total evaluation time: 1158.4 seconds (2136 batches)