[Bugfix][Model] Remove SciPy dependency from Inkling scale planning (#49485)
Signed-off-by: Michael Gschwind <mgschwind@nvidia.com> Co-authored-by: Michael Gschwind <mgschwind@nvidia.com> Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
co-authored by
Michael Gschwind
OpenAI Codex
parent
fc5fda105f
commit
4080263bb2
@@ -6,6 +6,7 @@ import pytest
|
||||
|
||||
from vllm.config.compilation import CompilationConfig, CUDAGraphMode
|
||||
from vllm.models.inkling.common.mm_preprocess import InklingMultiModalDataParser
|
||||
from vllm.models.inkling.common.towers import plan_out_scales
|
||||
from vllm.models.inkling.configs import (
|
||||
InklingAudioConfig,
|
||||
InklingModelConfig,
|
||||
@@ -17,6 +18,22 @@ from vllm.models.inkling.nvidia.sconv_swa_attn import (
|
||||
from vllm.v1.attention.backend import AttentionCGSupport
|
||||
|
||||
|
||||
def test_vision_scale_plan_matches_released_config():
|
||||
assert plan_out_scales(2, 40, 4) == [
|
||||
(1, 1, 1, 3),
|
||||
(1, 5, 5, 128),
|
||||
(1, 10, 10, 320),
|
||||
(1, 40, 40, 4800),
|
||||
(2, 40, 40, 9600),
|
||||
]
|
||||
|
||||
|
||||
def test_vision_scale_plan_breaks_assignment_ties_in_order():
|
||||
reductions = [np.prod(scale[:-1]) for scale in plan_out_scales(2, 52, 4)]
|
||||
|
||||
assert reductions == sorted(set(reductions))
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("config_cls", "kwargs", "missing"),
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user