[MRV2] Also enable MRV2 for Llama and Mistral dense models (#43458)
Signed-off-by: Nick Hill <nickhill123@gmail.com> Signed-off-by: yewentao256 <zhyanwentao@126.com> Co-authored-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
+7
-1
@@ -66,7 +66,13 @@ else:
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
DEFAULT_V2_MODEL_RUNNER_ARCHITECTURES = frozenset({"Qwen3ForCausalLM"})
|
||||
DEFAULT_V2_MODEL_RUNNER_ARCHITECTURES = frozenset(
|
||||
{
|
||||
"LlamaForCausalLM",
|
||||
"MistralForCausalLM",
|
||||
"Qwen3ForCausalLM",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class OptimizationLevel(IntEnum):
|
||||
|
||||
@@ -344,6 +344,12 @@ class GPUModelRunner(LoRAModelRunnerMixin):
|
||||
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
|
||||
from vllm.v1.worker.gpu_model_runner import GPUModelRunner as GPUModelRunnerV1
|
||||
|
||||
GPUModelRunnerV1.apply_sparse_weight_patches(self, *args, **kwargs) # type: ignore[arg-type]
|
||||
|
||||
def update_config(self, *args, **kwargs) -> None:
|
||||
# TODO(Wentao): Use full version instead of import when fully migrated to v2
|
||||
from vllm.v1.worker.gpu_model_runner import GPUModelRunner as GPUModelRunnerV1
|
||||
|
||||
Reference in New Issue
Block a user