[Bug] Migrate Reset cache for both v2 and v1 model runner (#42759)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Wentao Ye
2026-06-12 09:38:12 -04:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 4171ae406c
commit fbc3a1907a
2 changed files with 3 additions and 2 deletions
-2
View File
@@ -367,8 +367,6 @@ class GPUModelRunner(LoRAModelRunnerMixin):
from vllm.v1.worker.gpu_model_runner import GPUModelRunner as GPUModelRunnerV1
GPUModelRunnerV1.reload_weights(self, *args, **kwargs) # type: ignore[arg-type]
self.reset_encoder_cache()
self.reset_mm_cache()
def apply_sparse_weight_patches(self, *args, **kwargs) -> None:
# TODO: Use full version instead of import when fully migrated to v2
+3
View File
@@ -5391,6 +5391,9 @@ class GPUModelRunner(
weights_not_loaded,
)
self.reset_encoder_cache()
self.reset_mm_cache()
def _get_prompt_logprobs_dict(
self,
hidden_states: torch.Tensor,