A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 3, 10:30 UTC
[Model Runner v2] Support update_config (#42783)
Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Michael Goin committed
May 18, 2026 at 10:26 UTC
f5d3dc7115cf77472ba5e274f6becbbeddbf4bd5
1 file changed
+11
vllm/v1/worker/gpu/model_runner.py
+11
@@ -337,6 +337,17 @@ class GPUModelRunner(LoRAModelRunnerMixin):
337
self.reset_encoder_cache()
338
self.reset_mm_cache()
339
340
+ def update_config(self, *args, **kwargs) -> None:
341
+ # TODO(Wentao): Use full version instead of import when fully migrated to v2
342
+ from vllm.v1.worker.gpu_model_runner import GPUModelRunner as GPUModelRunnerV1
343
+
344
+ GPUModelRunnerV1.update_config(self, *args, **kwargs) # type: ignore[arg-type]
345
+
346
+ # v2 reads config via self.vllm_config (e.g. in load_model), so keep it
347
+ # in sync with the attributes the v1 helper just replaced.
348
+ self.vllm_config.model_config = self.model_config
349
+ self.vllm_config.load_config = self.load_config
350
+
351
@functools.cached_property
352
def main_stream(self) -> torch.cuda.Stream:
353
# Cache the default CUDA stream to avoid lookup overhead.