Skip to content

generators: test generator with reasoning traces - #1697

Merged
jmartin-tech merged 8 commits into
NVIDIA:mainfrom
leondz:feature/test_reasoning_trace_generator
Apr 30, 2026
Merged

generators: test generator with reasoning traces#1697
jmartin-tech merged 8 commits into
NVIDIA:mainfrom
leondz:feature/test_reasoning_trace_generator

Conversation

@leondz

@leondz leondz commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Needed to help eval downstream effects of reasoning traces and longer outputs

  • Add option to specify requested length to test.Lipsum generator
  • Add option to specify requested output generation unit with test.Lipsum
  • Add option to build in variance over requested output length in test.Lipsum
  • Add a test.ReasoningLipsum generator that uses test.Lipsum to create long reasoning traces
  • Add tests for the above

resolves #1696

leondz added 5 commits April 22, 2026 09:38
Signed-off-by: Leon Derczynski <lderczynski@nvidia.com>
Signed-off-by: Leon Derczynski <lderczynski@nvidia.com>
…t generator

Signed-off-by: Leon Derczynski <lderczynski@nvidia.com>
Signed-off-by: Leon Derczynski <lderczynski@nvidia.com>
Signed-off-by: Leon Derczynski <lderczynski@nvidia.com>
@leondz leondz added the generators Interfaces with LLMs label Apr 22, 2026
… test output length margins

Signed-off-by: Leon Derczynski <lderczynski@nvidia.com>
@leondz
leondz marked this pull request as ready for review April 22, 2026 18:27
@leondz
leondz marked this pull request as draft April 23, 2026 01:17
…r output length variation in chars

Signed-off-by: Leon Derczynski <lderczynski@nvidia.com>
@leondz leondz changed the title Feature/test reasoning trace generator generators: test generator with reasoning traces Apr 23, 2026
Signed-off-by: Leon Derczynski <lderczynski@nvidia.com>
@leondz
leondz marked this pull request as ready for review April 23, 2026 17:08
Comment thread garak/generators/test.py
DEFAULT_PARAMS = Lipsum.DEFAULT_PARAMS | {
"skip_seq_start": "<think>",
"skip_seq_end": "</think>",
"reasoning_length": 2000,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good starting point, should this provide support to randomly consume the allowed tokens via some custom values?

For example support int values for a set number but if set to the string random consume a random number <= self.max_tokens as reasoning tokens and the leave the final response with only the remaining tokens, and maybe all to guarantee that the response text is always empty. This might simulate when the reasoning tokens consume the whole response string.

@jmartin-tech
jmartin-tech merged commit 1ca1088 into NVIDIA:main Apr 30, 2026
16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

generators Interfaces with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generators: add test generator supporting long responses & reasoning/skip_seq traces

2 participants