[Bug]: MMLU num_samples is not a total sample limit

Open
#23,275 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@nthu-chung is already working on this.

Since Dec 3, 2026.

  • #23289 by @nthu-chung — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python, pytorch
Domain
data

Research direction

Start with the MMLU implementation that defines MMLU.generate_samples() and trace how num_samples is allocated across subjects. Reproduce the reported counts with the official MMLU CSVs and the three-subject fixture with 1, 3, and 4 rows. The issue reports that a local round-robin quota candidate passes all six regression checks; an open linked pull request is already addressing the issue.

Written by the indexing model from the issue text.

Description

Customized kernels
Reproduction

Use the official MMLU CSVs with the evaluator on main 14e20e90eb5c55416cbc7e6d1be8d12e52d1d709. Construct MMLU(dataset_path=path, num_samples=n) and count the records from generate_samples().

Requested Current output
1 57
58 114
200 228
342 342

The implementation rounds the quota up independently for every subject. It can exceed the requested budget and can also undershoot it on datasets with uneven subject sizes. A three-subject CSV fixture with 1, 3 and 4 rows returns 5 rows when 6 are requested.

Expected behavior

Apply the requested count across all subjects, allocating balanced quotas where data is available and redistributing unused quota.

A local round-robin quota candidate returned exactly the lower requested counts, left the original 342-row selection unchanged, and produced the same full result of 14,042 rows. The same regression suite went from three failures and three passes on main to six passes. This exercise verifies CPU-side selection only. It does not run inference.

Dominant language
Python
Stars
15.2k
Forks
3k
Avg merge
2d 21h
Merged PRs (30d)
477

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/TensorRT-LLM

All issues in NVIDIA/TensorRT-LLM

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.