-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[Core] Add update_config
RPC method
#20095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9b56a6f
4709e7a
e17a929
7129f12
ee6b2bb
9a8d179
17284b8
a7362af
df819bf
fd6353e
7729cc8
32ad258
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
from vllm.attention.layer import Attention | ||
from vllm.compilation.counter import compilation_counter | ||
from vllm.config import (CompilationLevel, VllmConfig, | ||
get_layers_from_vllm_config) | ||
get_layers_from_vllm_config, update_config) | ||
from vllm.distributed.eplb.eplb_state import EplbState | ||
from vllm.distributed.kv_transfer import (get_kv_transfer_group, | ||
has_kv_transfer_group) | ||
|
@@ -1721,6 +1721,16 @@ def generate_draft_token_ids( | |
draft_token_ids.append(drafter_output.tolist()) | ||
return draft_token_ids | ||
|
||
def update_config(self, overrides: dict[str, Any]) -> None: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this function feels a bit scary to to be really honest. due to: potentially we can limit updates to limited known good configs first There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
allowed_config_names = {"load_config", "model_config"} | ||
for config_name, config_overrides in overrides.items(): | ||
assert config_name in allowed_config_names, \ | ||
f"Config `{config_name}` not supported. " \ | ||
f"Allowed configs: {allowed_config_names}" | ||
config = getattr(self, config_name) | ||
new_config = update_config(config, config_overrides) | ||
setattr(self, config_name, new_config) | ||
aarnphm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
def load_model(self) -> None: | ||
logger.info("Starting to load model %s...", self.model_config.model) | ||
with DeviceMemoryProfiler() as m: # noqa: SIM117 | ||
|
Uh oh!
There was an error while loading. Please reload this page.