[Bugfix] Fix BAGEL online serving for text and image understanding (#31546)
Signed-off-by: Dylan1229 <yvanphys@gmail.com> Signed-off-by: UED <zxr3611244710@gmail.com> Signed-off-by: mr-ye-cao <yecaoyc2019@gmail.com> Co-authored-by: UED <zxr3611244710@gmail.com> Co-authored-by: mr-ye-cao <yecaoyc2019@gmail.com> Co-authored-by: Mr-Ye-Cao <60802056+Mr-Ye-Cao@users.noreply.github.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -346,6 +346,13 @@ class BagelForConditionalGeneration(
|
||||
}
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def get_placeholder_str(cls, modality: str, i: int) -> str | None:
|
||||
if modality.startswith("image"):
|
||||
return "<|image_pad|>"
|
||||
|
||||
raise ValueError("Only image modality is supported")
|
||||
|
||||
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
|
||||
super().__init__()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user