Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
fe921763
Unverified
Commit
fe921763
authored
Apr 24, 2025
by
Yinghai Lu
Committed by
GitHub
Apr 24, 2025
Browse files
Add collective_rpc to llm engine (#16999)
Signed-off-by:
Yinghai Lu
<
yinghai@thinkingmachines.ai
>
parent
6d0df0eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
vllm/engine/async_llm_engine.py
vllm/engine/async_llm_engine.py
+18
-0
vllm/v1/engine/async_llm.py
vllm/v1/engine/async_llm.py
+11
-0
No files found.
vllm/engine/async_llm_engine.py
View file @
fe921763
...
...
@@ -528,6 +528,13 @@ class _AsyncLLMEngine(LLMEngine):
async
def
check_health_async
(
self
)
->
None
:
self
.
model_executor
.
check_health
()
async
def
collective_rpc_async
(
self
,
method
:
str
,
timeout
:
Optional
[
float
]
=
None
,
args
:
tuple
=
(),
kwargs
:
Optional
[
dict
]
=
None
):
raise
NotImplementedError
async
def
build_guided_decoding_logits_processor_async
(
sampling_params
:
SamplingParams
,
tokenizer
:
AnyTokenizer
,
...
...
@@ -1236,6 +1243,17 @@ class AsyncLLMEngine(EngineClient):
async
def
add_lora
(
self
,
lora_request
:
LoRARequest
)
->
None
:
self
.
engine
.
add_lora
(
lora_request
)
async
def
collective_rpc
(
self
,
method
:
str
,
timeout
:
Optional
[
float
]
=
None
,
args
:
tuple
=
(),
kwargs
:
Optional
[
dict
]
=
None
):
"""
Perform a collective RPC call to the given path.
"""
return
await
self
.
engine
.
collective_rpc_async
(
method
,
timeout
,
args
,
kwargs
)
# TODO(v1): Remove this class proxy when V1 goes default.
if
envs
.
is_set
(
"VLLM_USE_V1"
)
and
envs
.
VLLM_USE_V1
:
...
...
vllm/v1/engine/async_llm.py
View file @
fe921763
...
...
@@ -492,6 +492,17 @@ class AsyncLLM(EngineClient):
"""Prevent an adapter from being evicted."""
return
await
self
.
engine_core
.
pin_lora_async
(
lora_id
)
async
def
collective_rpc
(
self
,
method
:
str
,
timeout
:
Optional
[
float
]
=
None
,
args
:
tuple
=
(),
kwargs
:
Optional
[
dict
]
=
None
):
"""
Perform a collective RPC call to the given path.
"""
return
await
self
.
engine_core
.
collective_rpc_async
(
method
,
timeout
,
args
,
kwargs
)
@
property
def
is_running
(
self
)
->
bool
:
# Is None before the loop is started.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment