Support LLaVA v1.5 7B (#4348)

This commit is contained in:
Jiashu Xu 2023-10-22 11:49:04 -04:00 committed by GitHub
parent 05741821a5
commit c544f5cc51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 1 deletions

View file

@ -2,7 +2,7 @@ from typing import Optional
from extensions.multimodal.abstract_pipeline import AbstractMultimodalPipeline
available_pipelines = ['llava-7b', 'llava-13b', 'llava-llama-2-13b', 'llava-v1.5-13b']
available_pipelines = ['llava-7b', 'llava-13b', 'llava-llama-2-13b', 'llava-v1.5-13b', 'llava-v1.5-7b']
def get_pipeline(name: str, params: dict) -> Optional[AbstractMultimodalPipeline]:
@ -15,6 +15,9 @@ def get_pipeline(name: str, params: dict) -> Optional[AbstractMultimodalPipeline
if name == 'llava-llama-2-13b':
from .llava import LLaVA_LLaMA_2_13B_Pipeline
return LLaVA_LLaMA_2_13B_Pipeline(params)
if name == 'llava-v1.5-7b':
from .llava import LLaVA_v1_5_7B_Pipeline
return LLaVA_v1_5_7B_Pipeline(params)
if name == 'llava-v1.5-13b':
from .llava import LLaVA_v1_5_13B_Pipeline
return LLaVA_v1_5_13B_Pipeline(params)
@ -32,6 +35,9 @@ def get_pipeline_from_model_name(model_name: str, params: dict) -> Optional[Abst
if '13b' in model_name.lower():
from .llava import LLaVA_v1_5_13B_Pipeline
return LLaVA_v1_5_13B_Pipeline(params)
if '7b' in model_name.lower():
from .llava import LLaVA_v1_5_7B_Pipeline
return LLaVA_v1_5_7B_Pipeline(params)
else:
if '7b' in model_name.lower():
from .llava import LLaVA_v0_7B_Pipeline