@@ -44,8 +44,8 @@ class RequestFuncOutput:
4444
4545
4646async def async_request_tgi (
47- request_func_input : RequestFuncInput ,
48- pbar : Optional [tqdm ] = None ,
47+ request_func_input : RequestFuncInput ,
48+ pbar : Optional [tqdm ] = None ,
4949) -> RequestFuncOutput :
5050 api_url = request_func_input .api_url
5151 assert api_url .endswith ("generate_stream" )
@@ -116,8 +116,8 @@ async def async_request_tgi(
116116
117117
118118async def async_request_trt_llm (
119- request_func_input : RequestFuncInput ,
120- pbar : Optional [tqdm ] = None ,
119+ request_func_input : RequestFuncInput ,
120+ pbar : Optional [tqdm ] = None ,
121121) -> RequestFuncOutput :
122122 api_url = request_func_input .api_url
123123 assert api_url .endswith ("generate_stream" )
@@ -183,8 +183,8 @@ async def async_request_trt_llm(
183183
184184
185185async def async_request_deepspeed_mii (
186- request_func_input : RequestFuncInput ,
187- pbar : Optional [tqdm ] = None ,
186+ request_func_input : RequestFuncInput ,
187+ pbar : Optional [tqdm ] = None ,
188188) -> RequestFuncOutput :
189189 async with aiohttp .ClientSession (timeout = AIOHTTP_TIMEOUT ) as session :
190190 assert request_func_input .best_of == 1
@@ -226,8 +226,8 @@ async def async_request_deepspeed_mii(
226226
227227
228228async def async_request_openai_completions (
229- request_func_input : RequestFuncInput ,
230- pbar : Optional [tqdm ] = None ,
229+ request_func_input : RequestFuncInput ,
230+ pbar : Optional [tqdm ] = None ,
231231) -> RequestFuncOutput :
232232 api_url = request_func_input .api_url
233233 assert api_url .endswith (
@@ -317,8 +317,8 @@ async def async_request_openai_completions(
317317
318318
319319async def async_request_openai_chat_completions (
320- request_func_input : RequestFuncInput ,
321- pbar : Optional [tqdm ] = None ,
320+ request_func_input : RequestFuncInput ,
321+ pbar : Optional [tqdm ] = None ,
322322) -> RequestFuncOutput :
323323 api_url = request_func_input .api_url
324324 assert api_url .endswith (
@@ -420,10 +420,10 @@ def get_model(pretrained_model_name_or_path: str) -> str:
420420
421421
422422def get_tokenizer (
423- pretrained_model_name_or_path : str ,
424- tokenizer_mode : str = "auto" ,
425- trust_remote_code : bool = False ,
426- ** kwargs ,
423+ pretrained_model_name_or_path : str ,
424+ tokenizer_mode : str = "auto" ,
425+ trust_remote_code : bool = False ,
426+ ** kwargs ,
427427) -> Union [PreTrainedTokenizer , PreTrainedTokenizerFast ]:
428428 if pretrained_model_name_or_path is not None and not os .path .exists (
429429 pretrained_model_name_or_path ):
0 commit comments