Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion python/sglang/bench_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ async def async_request_trt_llm(
"min_length": request_func_input.output_len,
"end_id": 1048576,
}
if args.disable_ignore_eos:
del payload["min_length"]
del payload["end_id"]
output = RequestFuncOutput()
output.prompt_len = request_func_input.prompt_len

Expand Down Expand Up @@ -149,7 +152,7 @@ async def async_request_openai_completions(
"best_of": 1,
"max_tokens": request_func_input.output_len,
"stream": not args.disable_stream,
"ignore_eos": True,
"ignore_eos": not args.disable_ignore_eos,
}
headers = {"Authorization": f"Bearer {os.environ.get('OPENAI_API_KEY')}"}

Expand Down Expand Up @@ -969,6 +972,11 @@ def set_ulimit(target_soft_limit=65535):
action="store_true",
help="Disable streaming mode.",
)
parser.add_argument(
"--disable-ignore-eos",
action="store_true",
help="Disable ignoring EOS.",
)

set_ulimit()

Expand Down