[CI/Build] Simplify model loading for HfRunner (#5251)

This commit is contained in:
Cyrus Leung
2024-06-04 10:09:19 -07:00
committed by GitHub
parent 27208be66e
commit 9ba093b4f4
3 changed files with 18 additions and 13 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ def test_models(
model: str,
dtype: str,
) -> None:
hf_model = hf_runner(model, dtype=dtype)
hf_model = hf_runner(model, dtype=dtype, is_embedding_model=True)
hf_outputs = hf_model.encode(example_prompts)
del hf_model
+1 -1
View File
@@ -94,7 +94,7 @@ def test_models(hf_runner, vllm_runner, hf_image_prompts, hf_images,
"""
model_id, vision_language_config = model_and_config
hf_model = hf_runner(model_id, dtype=dtype)
hf_model = hf_runner(model_id, dtype=dtype, is_vision_model=True)
hf_outputs = hf_model.generate_greedy(hf_image_prompts,
max_tokens,
images=hf_images)