TensorRT-LLM icon indicating copy to clipboard operation
TensorRT-LLM copied to clipboard

Scaffolding MajorityVote does not support negatives numbers result.

Open WeiHaocheng opened this issue 1 year ago • 9 comments

Scaffolding MajorityVote does not support negatives numbers result.

WeiHaocheng avatar Apr 02 '25 10:04 WeiHaocheng

Majority vote is using .isdigit(), which doesn't work with dash/negative sign: https://github.com/NVIDIA/TensorRT-LLM/blob/abcb0486dc872417259ebb1675dd0607506c8503/tensorrt_llm/scaffolding/math_utils.py#L78C33-L78C42

An example of negative answers is in MATH500 with the following problem:

  • "unique_id": "test/intermediate_algebra/134.json"
  • "answer": "-50",

rzhao01 avatar Apr 02 '25 17:04 rzhao01

Can you share a sample run on how to repro it? I would like to work on it @WeiHaocheng @rzhao01

ankitmaurya001 avatar Apr 25 '25 06:04 ankitmaurya001

Can you share a sample run on how to repro it? I would like to work on it @WeiHaocheng @rzhao01

Thank you! Assign to you.

You can initiate scaffoldingLlm with MajorityVoteController and run it with as prompt which is a mathematical problem with a negative answer such as "Solve for x: 6x + 5 = 4x - 7". Then you can reproduce the issue.

After fixing it.

You can add a test to here

WeiHaocheng avatar Apr 25 '25 07:04 WeiHaocheng

Hi @ankitmaurya001 ~ May I ask if your progress is still going smoothly? If you encounter some difficult problems during the building, maybe you can try downloading the pre-compiled image directly from my dockerhub.

https://hub.docker.com/r/weihaocheng2/tensorrt_llm

Feel free to contact me if you got any problem.

WeiHaocheng avatar May 14 '25 04:05 WeiHaocheng

Thanks @WeiHaocheng shall get back to you in case of any problem.

ankitmaurya001 avatar May 15 '25 12:05 ankitmaurya001

Hi, I wanted to know if this issue is still open? If yes, can I take it up?

nikJ13 avatar Feb 05 '26 13:02 nikJ13

Hi, I wanted to know if this issue is still open? If yes, can I take it up?

Hi~ I think this issue is still exists, assign to you.

WeiHaocheng avatar Feb 07 '26 02:02 WeiHaocheng

Hi @WeiHaocheng, so I have raised a PR for this issue. Waiting for the code review.

nikJ13 avatar Mar 17 '26 19:03 nikJ13

Hi @WeiHaocheng could please merge the changes. I have raised the PRs for it.

nikJ13 avatar May 22 '26 16:05 nikJ13