From d65a3f7cb6dcd34e9a3ff9e30dffc52a7671d50b Mon Sep 17 00:00:00 2001 From: Arthur Kim Date: Wed, 12 Jun 2024 16:49:12 +0900 Subject: [PATCH] Support vllm==0.5.0 --- src/llamafactory/chat/vllm_engine.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/llamafactory/chat/vllm_engine.py b/src/llamafactory/chat/vllm_engine.py index 87ce8684..d096f6eb 100644 --- a/src/llamafactory/chat/vllm_engine.py +++ b/src/llamafactory/chat/vllm_engine.py @@ -13,7 +13,10 @@ from .base_engine import BaseEngine, Response if is_vllm_available(): from vllm import AsyncEngineArgs, AsyncLLMEngine, RequestOutput, SamplingParams from vllm.lora.request import LoRARequest - from vllm.sequence import MultiModalData + try: + from vllm.multimodal import MultiModalData # vllm==0.5.0 + except ImportError: + from vllm.sequence import MultiModalData # vllm<0.5.0 if TYPE_CHECKING: