Add MMLU benchmark evaluation to evals#1183
Open
CarlG0123 wants to merge 2 commits intoTransformerLensOrg:devfrom
Open
Add MMLU benchmark evaluation to evals#1183CarlG0123 wants to merge 2 commits intoTransformerLensOrg:devfrom
CarlG0123 wants to merge 2 commits intoTransformerLensOrg:devfrom
Conversation
Skip MMLU docstring examples in doctest runs since they require network access (HuggingFace dataset download) and may require GPU. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
mmlu_eval()function for evaluating models on the MMLU (Massive Multitask Language Understanding) benchmarkmake_mmlu_data_loader()for loading MMLU data from HuggingFace (cais/mmludataset)MMLU_SUBJECTS(all 57 subjects) andMMLU_ANSWER_LETTERSmodule-level constantsChanges
transformer_lens/evals.py: AddedMMLU_SUBJECTS,MMLU_ANSWER_LETTERS,make_mmlu_data_loader(), andmmlu_eval()tests/acceptance/test_evals.py: Added 5 tests covering data loading (single/multiple/invalid subjects) and evaluationTesting
Test plan
pytest tests/acceptance/test_evals.py -v🤖 Generated with Claude Code