[Bug]: GPQA CoT choice shuffles reuse caches from a different seed

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

Maintainers usually reply within 1 day

@JunkaiWang-TheoPhy is already working on this.

Since Dec 2, 2026.

  • #23271 by @JunkaiWang-TheoPhy — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
30/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
testing-qa

Research direction

Read tensorrt_llm/evaluate/lm_eval_tasks/gpqa/cot_zeroshot_aa/utils.py, focusing on process_docs and the datasets.Dataset.map call. Reproduce the cache mismatch with the on-disk and in-memory datasets described in the issue, then check how the mapping fingerprint accounts for the random seed. Done when both calls with seed 456 produce the same answer letters; linked PR #23271 is already open.

Written by the indexing model from the issue text.

Description

System Info

TensorRT-LLM main at c29791e46a7ef586921114da197d5d6be899bdaf. Reproduced with Python 3.12 and Hugging Face Datasets 5.2.0 on CPU. No GPU, model, or GPQA download is required.

Reproduction
  1. Create a tiny datasets.Dataset with the GPQA columns Incorrect Answer 1 through Incorrect Answer 3 and Correct Answer. Repeat a row with distinct choices eight times, save the dataset to disk, and load it back so mapping can cache to Arrow.
  2. Call process_docs in tensorrt_llm/evaluate/lm_eval_tasks/gpqa/cot_zeroshot_aa/utils.py with random.seed(123). Set random.seed(456) and call it again with the same on-disk dataset.
  3. Set random.seed(456) and call the same helper with a freshly constructed in-memory dataset containing the same rows. Compare the answer letters from the second and third calls.
Expected behavior

With the same GPQA inputs and seed, the second and third calls should give the same order and answer letters. An earlier evaluation under a different seed should not affect the prompts used in a later evaluation.

Actual behavior

The on-disk transform under seed 456 reuses the cache written under seed 123. With the fixture above, it begins with answer letter B. The fresh seed-456 transform begins with D.

Additional notes

The callback shuffles answers using module-level Python RNG state. The Arrow fingerprint hashes the map function and its arguments, so the previous seed remains invisible to the cache key. Datasets cache hashing

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.