[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:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
4171ae406c
commit
fbc3a1907a
@@ -367,8 +367,6 @@ class GPUModelRunner(LoRAModelRunnerMixin):
|
|||||||
from vllm.v1.worker.gpu_model_runner import GPUModelRunner as GPUModelRunnerV1
|
from vllm.v1.worker.gpu_model_runner import GPUModelRunner as GPUModelRunnerV1
|
||||||
|
|
||||||
GPUModelRunnerV1.reload_weights(self, *args, **kwargs) # type: ignore[arg-type]
|
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:
|
def apply_sparse_weight_patches(self, *args, **kwargs) -> None:
|
||||||
# TODO: Use full version instead of import when fully migrated to v2
|
# TODO: Use full version instead of import when fully migrated to v2
|
||||||
|
|||||||
@@ -5391,6 +5391,9 @@ class GPUModelRunner(
|
|||||||
weights_not_loaded,
|
weights_not_loaded,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.reset_encoder_cache()
|
||||||
|
self.reset_mm_cache()
|
||||||
|
|
||||||
def _get_prompt_logprobs_dict(
|
def _get_prompt_logprobs_dict(
|
||||||
self,
|
self,
|
||||||
hidden_states: torch.Tensor,
|
hidden_states: torch.Tensor,
|
||||||
|
|||||||
Reference in New Issue
Block a user