Skip to content

Commit 55f3cda

Browse files
authored
[None][fix] Fix request_id for best_of/n case (#8368)
Signed-off-by: Olya Kozlova <[email protected]>
1 parent c045636 commit 55f3cda

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/llm-api/quickstart_advanced.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def setup_llm(args, **kwargs):
303303
args.n = args.max_beam_width
304304
assert best_of <= args.max_beam_width, f"beam width: {best_of}, should be less or equal to max_beam_width: {args.max_beam_width}"
305305

306-
assert best_of >= args.n, f"In sampling mode best_of value: {best_of} should be less or equal to n: {args.n}"
306+
assert best_of >= args.n, f"In sampling mode best_of value: {best_of} should be greater than or equal to n: {args.n}"
307307

308308
sampling_params = SamplingParams(
309309
max_tokens=args.max_tokens,

tensorrt_llm/_torch/pyexecutor/llm_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ def create_response(self,
651651

652652
return LlmResponse(
653653
request_id=self.py_request_id
654-
if self.is_child else self.parent_request_id,
654+
if not self.is_child else self.parent_request_id,
655655
result=LlmResult(result, py_result, is_final),
656656
client_id=self.py_client_id) if len(result) > 0 else None
657657

0 commit comments

Comments
 (0)