set vllm backend default when build llm_pipeline from pipeline()

This commit is contained in:
suluyan.sly
2023-12-05 14:05:08 +08:00
parent 864fb48872
commit 954bd64919

View File

@@ -153,6 +153,10 @@ def pipeline(task: str = None,
pipeline_props['device'] = device
cfg = ConfigDict(pipeline_props)
# support set llm_framework=None
if pipeline_name == 'llm' and kwargs.get('llm_framework', '') == '':
kwargs['llm_framework'] = 'vllm'
if kwargs:
cfg.update(kwargs)