Skip to content

Commit

Permalink
Update prompt utils + bump version (Paligemma-2) (#143)
Browse files Browse the repository at this point in the history
* bump version (Paligemma-2)

* add prompt with image token
  • Loading branch information
Blaizzy authored Dec 5, 2024
1 parent 43d9934 commit 3f5e162
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mlx_vlm/prompt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def add_image_tokens(message, token_format):
" ".join([f"<|image_{i+1}|>" for i in range(num_images)]),
),
"prompt_only": lambda: prompt,
"prompt_with_image_token": lambda: "<image>" * num_images + prompt,
}

model_to_format = {
Expand All @@ -72,7 +73,7 @@ def add_image_tokens(message, token_format):
"phi3_v": "message_with_numbered_image_tokens",
"multi_modality": "message_with_image_token",
"pixtral": "message_list_with_image_type",
"paligemma": "prompt_only",
"paligemma": "prompt_with_image_token",
"florence2": "prompt_only",
"mllama": "message_list_with_image",
"molmo": "prompt_only",
Expand Down
2 changes: 1 addition & 1 deletion mlx_vlm/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.3"
__version__ = "0.1.4"

0 comments on commit 3f5e162

Please sign in to comment.