Commit 654d764
Add --sampling-params to response regeneration script (#724)
<!-- markdownlint-disable -->
<!-- PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS
(AT THE BOTTOM) HAVE BEEN CONSIDERED. -->
## Purpose
Response regeneration requests only set max_tokens, so sampling behavior
(temperature, top_p, seed) was stuck on server defaults with no way to
customize. Adds a --sampling-params JSON flag merged into each
chat-completion request, records it in output metadata for
reproducibility, and documents it in the CLI reference. Part of #694.
## Tests
- Sanity-checked arg parsing: --sampling-params '{"temperature": 0.6,
"top_p": 0.95}' parses to a dict, omitted flag yields {}, non-object
JSON errors out
## Checklist
I have filled in:
- [x] The purpose of the PR, such as "Fix some issue (link existing
issues this PR will resolve)".
- [x] The test plan/results, such as providing test command and pasting
the results.
- [ ] (Optional) The necessary documentation update.
- [x] I (a human) have written or reviewed the code in this pr to the
best of my ability.
---------
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Signed-off-by: Guan-Ming Chiu <105915352+guan404ming@users.noreply.github.com>
Co-authored-by: Orestis Zambounis <23146389+orestis-z@users.noreply.github.com>1 parent f9e9685 commit 654d764
3 files changed
Lines changed: 24 additions & 1 deletion
File tree
- docs/cli
- scripts/response_regeneration
- tests/unit/scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | | - | |
| 138 | + | |
| 139 | + | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| |||
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
115 | 131 | | |
116 | 132 | | |
117 | 133 | | |
| |||
326 | 342 | | |
327 | 343 | | |
328 | 344 | | |
| 345 | + | |
329 | 346 | | |
330 | 347 | | |
331 | 348 | | |
| |||
374 | 391 | | |
375 | 392 | | |
376 | 393 | | |
| 394 | + | |
377 | 395 | | |
378 | 396 | | |
379 | 397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
434 | 435 | | |
435 | 436 | | |
436 | 437 | | |
| 438 | + | |
437 | 439 | | |
438 | 440 | | |
439 | 441 | | |
| |||
0 commit comments