"vscode:/vscode.git/clone" did not exist on "5a0d079c6bee1185bdb0cb1922643fa9d5d518c2"
Unverified Commit ae5c0fc4 authored by Ying Sheng's avatar Ying Sheng Committed by GitHub
Browse files

Support disable_ignore_eos in bench_serving.py (#824)

parent a30d5d75
......@@ -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
......@@ -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')}"}
......@@ -969,6 +972,11 @@ if __name__ == "__main__":
action="store_true",
help="Disable streaming mode.",
)
parser.add_argument(
"--disable-ignore-eos",
action="store_true",
help="Disable ignoring EOS.",
)
set_ulimit()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment