Skip to content

Commit

Permalink
Skip minicpm3 in cpu; update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLight1337 committed Sep 14, 2024
1 parent e64b8ec commit 13ba77b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/source/models/supported_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Decoder-only Language Models
-
* - :code:`MiniCPM3ForCausalLM`
- MiniCPM3
- :code:`openbmb/MiniCPM3-4B`
- :code:`openbmb/MiniCPM3-4B`, etc.
-
* - :code:`MistralForCausalLM`
- Mistral, Mistral-Instruct
Expand Down
10 changes: 6 additions & 4 deletions tests/models/decoder_only/language/test_big_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
Run `pytest tests/models/test_big_models.py`.
"""
import pytest
import torch

from vllm.platforms import current_platform

from ...utils import check_outputs_equal

Expand All @@ -21,9 +22,7 @@
]

#TODO: remove this after CPU float16 support ready
target_dtype = "float"
if torch.cuda.is_available():
target_dtype = "half"
target_dtype = "float" if current_platform.is_cpu() else "half"


@pytest.mark.parametrize("model", MODELS)
Expand All @@ -37,6 +36,9 @@ def test_models(
dtype: str,
max_tokens: int,
) -> None:
if model.startswith("openbmb/MiniCPM3") and current_platform.is_cpu():
pytest.skip("MiniCPM requires fused_moe which is not supported by CPU")

with hf_runner(model, dtype=dtype) as hf_model:
hf_outputs = hf_model.generate_greedy(example_prompts, max_tokens)

Expand Down

0 comments on commit 13ba77b

Please sign in to comment.