[Model] Initialize Phi-3-vision support (#4986)

This commit is contained in:
Isotr0py
2024-06-17 19:34:33 -07:00
committed by GitHub
parent fa9e385229
commit daef218b55
8 changed files with 571 additions and 0 deletions
+2
View File
@@ -79,6 +79,8 @@ def get_full_image_text_prompt(image_prompt: str, text_prompt: str,
if config.hf_config.model_type in ("llava", "llava_next"):
full_prompt = f"{image_prompt}\n{text_prompt}"
elif config.hf_config.model_type == 'phi3_v':
full_prompt = f"{image_prompt}<s>\n{text_prompt}"
else:
raise ValueError(
f"Unsupported model type: {config.hf_config.model_type}")