@@ -44,8 +44,8 @@ class RequestFuncOutput:
44
44
45
45
46
46
async def async_request_tgi (
47
- request_func_input : RequestFuncInput ,
48
- pbar : Optional [tqdm ] = None ,
47
+ request_func_input : RequestFuncInput ,
48
+ pbar : Optional [tqdm ] = None ,
49
49
) -> RequestFuncOutput :
50
50
api_url = request_func_input .api_url
51
51
assert api_url .endswith ("generate_stream" )
@@ -116,8 +116,8 @@ async def async_request_tgi(
116
116
117
117
118
118
async 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 ,
121
121
) -> RequestFuncOutput :
122
122
api_url = request_func_input .api_url
123
123
assert api_url .endswith ("generate_stream" )
@@ -183,8 +183,8 @@ async def async_request_trt_llm(
183
183
184
184
185
185
async 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 ,
188
188
) -> RequestFuncOutput :
189
189
async with aiohttp .ClientSession (timeout = AIOHTTP_TIMEOUT ) as session :
190
190
assert request_func_input .best_of == 1
@@ -226,8 +226,8 @@ async def async_request_deepspeed_mii(
226
226
227
227
228
228
async 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 ,
231
231
) -> RequestFuncOutput :
232
232
api_url = request_func_input .api_url
233
233
assert api_url .endswith (
@@ -317,8 +317,8 @@ async def async_request_openai_completions(
317
317
318
318
319
319
async 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 ,
322
322
) -> RequestFuncOutput :
323
323
api_url = request_func_input .api_url
324
324
assert api_url .endswith (
@@ -420,10 +420,10 @@ def get_model(pretrained_model_name_or_path: str) -> str:
420
420
421
421
422
422
def 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 ,
427
427
) -> Union [PreTrainedTokenizer , PreTrainedTokenizerFast ]:
428
428
if pretrained_model_name_or_path is not None and not os .path .exists (
429
429
pretrained_model_name_or_path ):
0 commit comments