[Model] Support Cohere2ForCausalLM (Cohere R7B) (#11203)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
import transformers
|
||||
from transformers import PretrainedConfig
|
||||
|
||||
from vllm import LLM
|
||||
@@ -11,6 +12,9 @@ from .registry import HF_EXAMPLE_MODELS
|
||||
@pytest.mark.parametrize("model_arch", HF_EXAMPLE_MODELS.get_supported_archs())
|
||||
def test_can_initialize(model_arch):
|
||||
model_info = HF_EXAMPLE_MODELS.get_hf_info(model_arch)
|
||||
if (model_arch == "Cohere2ForCausalLM"
|
||||
and transformers.__version__ < "4.48.0"):
|
||||
pytest.skip(reason="Model introduced in HF >= 4.48.0")
|
||||
if not model_info.is_available_online:
|
||||
pytest.skip("Model is not available online")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user