File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -447,11 +447,19 @@ async def add_request(
447447
448448 if arrival_time is None :
449449 arrival_time = time .time ()
450- prompt_token_ids = await self .engine .encode_request_async (
451- request_id = request_id ,
452- prompt = prompt ,
453- prompt_token_ids = prompt_token_ids ,
454- lora_request = lora_request )
450+
451+ if self .engine_use_ray :
452+ prompt_token_ids = await self .engine .encode_request_async .remote (
453+ request_id = request_id ,
454+ prompt = prompt ,
455+ prompt_token_ids = prompt_token_ids ,
456+ lora_request = lora_request )
457+ else :
458+ prompt_token_ids = await self .engine .encode_request_async (
459+ request_id = request_id ,
460+ prompt = prompt ,
461+ prompt_token_ids = prompt_token_ids ,
462+ lora_request = lora_request )
455463
456464 stream = self ._request_tracker .add_request (
457465 request_id ,
You can’t perform that action at this time.
0 commit comments