Repository navigation
Conversation
CY-HYUN
added a commit
to CY-HYUN/kmmlu-lighteval
that referenced
this pull request
Oct 10, 2026
Add KMMLU direct generation tasks (45 subjects, five-shot)
Author
|
@GeonRyoung @ojm6135 @hyeongrae-kim Thank you for running the full 45-subject |
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.
Adds KMMLU (HAERAE-HUB/KMMLU), a Korean multiple-choice benchmark built from original Korean exams: 35,030 questions in 45 subjects (arXiv 2402.11548). This follows the proposal in #1424.
What it adds
One file,
src/lighteval/tasks/tasks/kmmlu.py: 45 tasks namedkmmlu:<subject>(for examplekmmlu:accounting), one per HF config, test split,loglikelihood_acc.The prompt copies the default
kmmlutask of lm-evaluation-harness (v0.4.13), so scores from the two tools can be compared: the question, the four options asA.toD., then정답:(full-width colon), choices" A"to" D", goldanswer - 1. The dataset revision is pinned (d61b3f1). In #1424 I asked whether you'd rather have the multilingual template style (get_mcq_prompt_function, likecmmlu). Happy to switch if you prefer it.Update (2026-10-28): this branch now also has 45
kmmlu_direct:<subject>tasks. They are generative, five-shot, and scored by exact match. @GeonRyoung and team A of the 2026 Open-Source AI Contributor Challenge wrote them. I merged them from CY-HYUN#1. Their PR compares all 45 subjects (35,030 questions) with lm-eval 0.4.13. Prompts, generated text and scores differ in 0 cases. That is on one model, Qwen2.5-0.5B-Instruct.How I checked it
I ran this task as a
--custom-tasksfile with lighteval 0.13.0, ran lm-eval 0.4.13 on the same model, and compared each question. Setup:Qwen/Qwen2.5-0.5B-Instruct(revision7ae5576), float32, CPU, batch size 1, 0-shot, chat template off.All 700 questions got the same prompt, tokens and predicted choice. Code and a
reproduce.pythat prints this table: https://github.com/CY-HYUN/kmmlu-lightevalUpdate (2026-10-28): @GeonRyoung, @ojm6135 and @hyeongrae-kim ran the same
kmmlucomparison on all 45 subjects on an RTX 4070 Ti SUPER (float32, batch size 1, same model and dataset revisions). All 35,030 questions got the same prompt, tokens and predicted choice. Micro accuracy is 0.3245 and macro 0.3157 in both tools. Log-prob gaps reach 3.48e-03 on that GPU (5.53e-05 on CPU), and no prediction flipped. They ran the task as a custom-task file with lighteval 0.13.0; its 45kmmlutasks are defined the same way as in this PR's file. Per-subject table: https://github.com/CY-HYUN/kmmlu-lighteval#all-45-subjects-on-a-gpuOn
main(7fa19dc) I checked that the config fields andMetrics.loglikelihood_accthe file uses are unchanged, and ranruff checkandruff formatwith the repo's config (ruff 0.11.10). I haven't run it from a source install ofmain.Limits
kmmluwas compared on 5 subjects on CPU and on all 45 on one GPU (update above).kmmlu) and generative five-shot (kmmlu_direct) only;kmmlu_hardand chain-of-thought variants are not included.I used an AI coding assistant (Claude Code) to write and check this.