Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AllentDan committed Apr 19, 2024
1 parent 20c86c8 commit 0a53f88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lmdeploy/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def match(cls, model_path: str) -> Optional[str]:
Args:
model_path (str): the model path used for matching.
"""
if 'llama-3' in model_path.lower() or 'llama3' in model_path.lower():
if 'llama-3-' in model_path.lower() or 'llama3-' in model_path.lower():
return 'llama3'


Expand Down
2 changes: 2 additions & 0 deletions lmdeploy/vl/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ class MiniGeminiLlamaTempateWrapper(VLChatTemplateWrapper):

def append_image_token(self, prompt, num_images: int):
"""append image tokens to user prompt."""
if num_images == 0:
return prompt
res = f'{IMAGE_TOKEN}\n'
assert num_images <= 1, 'MiniGeminiLlama accepts 1 input image'
res = res + prompt
Expand Down

0 comments on commit 0a53f88

Please sign in to comment.