Support disable_ignore_eos in bench_serving.py (#824)
This commit is contained in:
@@ -84,6 +84,9 @@ async def async_request_trt_llm(
|
|||||||
"min_length": request_func_input.output_len,
|
"min_length": request_func_input.output_len,
|
||||||
"end_id": 1048576,
|
"end_id": 1048576,
|
||||||
}
|
}
|
||||||
|
if args.disable_ignore_eos:
|
||||||
|
del payload["min_length"]
|
||||||
|
del payload["end_id"]
|
||||||
output = RequestFuncOutput()
|
output = RequestFuncOutput()
|
||||||
output.prompt_len = request_func_input.prompt_len
|
output.prompt_len = request_func_input.prompt_len
|
||||||
|
|
||||||
@@ -149,7 +152,7 @@ async def async_request_openai_completions(
|
|||||||
"best_of": 1,
|
"best_of": 1,
|
||||||
"max_tokens": request_func_input.output_len,
|
"max_tokens": request_func_input.output_len,
|
||||||
"stream": not args.disable_stream,
|
"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')}"}
|
headers = {"Authorization": f"Bearer {os.environ.get('OPENAI_API_KEY')}"}
|
||||||
|
|
||||||
@@ -969,6 +972,11 @@ if __name__ == "__main__":
|
|||||||
action="store_true",
|
action="store_true",
|
||||||
help="Disable streaming mode.",
|
help="Disable streaming mode.",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--disable-ignore-eos",
|
||||||
|
action="store_true",
|
||||||
|
help="Disable ignoring EOS.",
|
||||||
|
)
|
||||||
|
|
||||||
set_ulimit()
|
set_ulimit()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user