A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 10:45 UTC
[Bugfix] Molmo text-only input bug fix (#9397)
Co-authored-by: sanghol <sanghol@allenai.org> Co-authored-by: Roger Wang <136131678+ywang96@users.noreply.github.com> Co-authored-by: Roger Wang <ywang@roblox.com>
Reza Salehi committed
Oct 15, 2024 at 21:56 UTC
ed920135c8490440453a64e197fce5e1e6459225
1 file changed
+6
-3
vllm/model_executor/models/molmo.py
+6
-3
@@ -946,9 +946,12 @@ def pad_images(
946
947
948
def input_processor_for_molmo(ctx: InputContext, llm_inputs: LLMInputs):
949
- prompt = llm_inputs["prompt"]
950
- multi_modal_data = llm_inputs.get("multi_modal_data")
951
- image = multi_modal_data.get("image")
949
+ prompt = llm_inputs.get("prompt", None)
950
+ multi_modal_data = llm_inputs.get("multi_modal_data", None)
951
+ if multi_modal_data is not None:
952
+ image = multi_modal_data.get("image", None)
953
+ else:
954
+ image = None
955
processor = cached_get_processor(ctx.model_config.model,
956
trust_remote_code=True,
957
revision=ctx.model_config.code_revision)