@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8a0ffd6285
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

Remove mamba_ssm from vLLM requirements; install inside test container using `--no-build-isolation` (#22541)

Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>

Thomas Parnell committed Aug 9, 2025 at 08:05 UTC 8a0ffd6285f6a0d8137d9363f448cef78ce97712
6 files changed +26 -45
.buildkite/test-pipeline.yaml
+4 -4
@@ -535,8 +535,6 @@ steps:
535 - vllm/
536 - tests/models/language
537 commands:
538 - # Install causal-conv1d for plamo2 models here, as it is not compatible with pip-compile.
539 - - pip install 'git+https://github.com/Dao-AILab/causal-conv1d@v1.5.0.post8'
538 - pip freeze | grep -E 'torch'
539 - pytest -v -s models/language -m core_model
540
@@ -547,8 +545,10 @@ steps:
545 - vllm/
546 - tests/models/language/generation
547 commands:
550 - # Install causal-conv1d for plamo2 models here, as it is not compatible with pip-compile.
551 - - pip install 'git+https://github.com/Dao-AILab/causal-conv1d@v1.5.0.post8'
548 + # Install fast path packages for testing against transformers
549 + # Note: also needed to run plamo2 model in vLLM
550 + - uv pip install --system --no-build-isolation 'git+https://github.com/state-spaces/mamba@v2.2.5'
551 + - uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/causal-conv1d@v1.5.2'
552 - pytest -v -s models/language/generation -m hybrid_model
553
554 - label: Language Models Test (Extended Generation) # 1hr20min
docs/contributing/ci/update_pytorch_version.md
-13
@@ -131,19 +131,6 @@ MAX_JOBS=16 uv pip install --system \
131 --no-build-isolation "git+https://github.com/facebookresearch/xformers@v0.0.30"
132 ```
133
134 -### Mamba
135 -
136 -```bash
137 -uv pip install --system \
138 - --no-build-isolation "git+https://github.com/state-spaces/mamba@v2.2.5"
139 -```
140 -
141 -### causal-conv1d
142 -
143 -```bash
144 -uv pip install 'git+https://github.com/Dao-AILab/causal-conv1d@v1.5.0.post8'
145 -```
146 -
134 ## Update all the different vLLM platforms
135
136 Rather than attempting to update all vLLM platforms in a single pull request, it's more manageable
requirements/test.in
+2 -3
@@ -10,7 +10,7 @@ pytest-timeout
10 # testing utils
11 backoff # required for phi4mm test
12 blobfile # required for kimi-vl test
13 -einops # required for MPT, qwen-vl and Mamba
13 +einops # required for MPT, qwen-vl
14 httpx
15 librosa # required for audio tests
16 vector_quantize_pytorch # required for minicpmo_26 test
@@ -26,7 +26,6 @@ torch==2.7.1
26 torchaudio==2.7.1
27 torchvision==0.22.1
28 transformers_stream_generator # required for qwen-vl test
29 -mamba_ssm==2.2.5 # required for plamo2 test
29 matplotlib # required for qwen-vl test
30 mistral_common[image,audio] >= 1.8.2 # required for voxtral test
31 num2words # required for smolvlm test
@@ -53,4 +52,4 @@ runai-model-streamer==0.11.0
52 runai-model-streamer-s3==0.11.0
53 fastsafetensors>=0.1.10
54 pydantic>=2.10 # 2.9 leads to error on python 3.10
56 -terratorch==1.1rc2 # required for PrithviMAE test
\ No newline at end of file
55 +terratorch==1.1rc2 # required for PrithviMAE test
requirements/test.txt
+1 -12
@@ -178,7 +178,6 @@ einops==0.8.1
178 # via
179 # -r requirements/test.in
180 # encodec
181 - # mamba-ssm
181 # terratorch
182 # torchgeo
183 # vector-quantize-pytorch
@@ -417,8 +416,6 @@ lxml==5.3.0
416 # sacrebleu
417 mako==1.3.10
418 # via alembic
420 -mamba-ssm==2.2.5
421 - # via -r requirements/test.in
419 markdown==3.8.2
420 # via mlflow
421 markdown-it-py==3.0.0
@@ -475,8 +472,6 @@ networkx==3.2.1
472 # via
473 # scikit-image
474 # torch
478 -ninja==1.11.1.3
479 - # via mamba-ssm
475 nltk==3.9.1
476 # via rouge-score
477 num2words==0.5.14
@@ -629,7 +624,6 @@ packaging==24.2
624 # lazy-loader
625 # lightning
626 # lightning-utilities
632 - # mamba-ssm
627 # matplotlib
628 # mlflow-skinny
629 # peft
@@ -973,7 +967,6 @@ sentencepiece==0.2.0
967 setuptools==77.0.3
968 # via
969 # lightning-utilities
976 - # mamba-ssm
970 # pytablewriter
971 # torch
972 # triton
@@ -1085,7 +1078,6 @@ torch==2.7.1+cu128
1078 # lightly
1079 # lightning
1080 # lm-eval
1088 - # mamba-ssm
1081 # mteb
1082 # open-clip-torch
1083 # peft
@@ -1152,16 +1144,13 @@ transformers==4.55.0
1144 # -r requirements/test.in
1145 # genai-perf
1146 # lm-eval
1155 - # mamba-ssm
1147 # peft
1148 # sentence-transformers
1149 # transformers-stream-generator
1150 transformers-stream-generator==0.0.5
1151 # via -r requirements/test.in
1152 triton==3.3.1
1162 - # via
1163 - # mamba-ssm
1164 - # torch
1153 + # via torch
1154 tritonclient==2.51.0
1155 # via
1156 # -r requirements/test.in
tests/models/language/generation/test_hybrid.py
+9 -7
@@ -25,10 +25,8 @@ SSM_MODELS = [
25
26 HYBRID_MODELS = [
27 "ai21labs/Jamba-tiny-dev",
28 - # NOTE: Running Plamo2 in transformers implementation requires to install
29 - # causal-conv1d package, which is not listed as a test dependency as it's
30 - # not compatible with pip-compile.
31 - "pfnet/plamo-2-1b",
28 + # skipping until vLLM implementation issues are resolved
29 + # "pfnet/plamo-2-1b",
30 "Zyphra/Zamba2-1.2B-instruct",
31 "hmellor/tiny-random-BambaForCausalLM",
32 "ibm-ai-platform/Bamba-9B-v1",
@@ -83,12 +81,16 @@ def test_models(
81 try:
82 model_info = HF_EXAMPLE_MODELS.find_hf_info(model)
83 model_info.check_available_online(on_fail="skip")
86 - model_info.check_transformers_version(on_fail="skip")
84 + hf_version_check = model_info.check_transformers_version(
85 + on_fail="return")
86 except ValueError:
88 - pass
87 + hf_version_check = None
88 +
89 + if hf_version_check is not None:
90 + print(f"Skipping transformers comparison because: {hf_version_check}")
91
92 with hf_runner(model) as hf_model:
91 - if model not in HF_UNSUPPORTED_MODELS:
93 + if model not in HF_UNSUPPORTED_MODELS and hf_version_check is None:
94 hf_outputs = hf_model.generate_greedy_logprobs_limit(
95 example_prompts, max_tokens, num_logprobs)
96 else:
tests/models/registry.py
+10 -6
@@ -79,17 +79,17 @@ class _HfExamplesInfo:
79 def check_transformers_version(
80 self,
81 *,
82 - on_fail: Literal["error", "skip"],
82 + on_fail: Literal["error", "skip", "return"],
83 check_min_version: bool = True,
84 check_max_version: bool = True,
85 - ) -> None:
85 + ) -> Optional[str]:
86 """
87 If the installed transformers version does not meet the requirements,
88 perform the given action.
89 """
90 if (self.min_transformers_version is None
91 and self.max_transformers_version is None):
92 - return
92 + return None
93
94 current_version = TRANSFORMERS_VERSION
95 cur_base_version = Version(current_version).base_version
@@ -105,16 +105,18 @@ class _HfExamplesInfo:
105 and Version(cur_base_version) > Version(max_version)):
106 msg += f"<={max_version}` is required to run this model."
107 else:
108 - return
108 + return None
109
110 if self.transformers_version_reason:
111 msg += f" Reason: {self.transformers_version_reason}"
112
113 if on_fail == "error":
114 raise RuntimeError(msg)
115 - else:
115 + elif on_fail == "skip":
116 pytest.skip(msg)
117
118 + return msg
119 +
120 def check_available_online(
121 self,
122 *,
@@ -148,7 +150,8 @@ _TEXT_GENERATION_EXAMPLE_MODELS = {
150 trust_remote_code=True),
151 "BailingMoeForCausalLM": _HfExamplesInfo("inclusionAI/Ling-lite-1.5",
152 trust_remote_code=True),
151 - "BambaForCausalLM": _HfExamplesInfo("ibm-ai-platform/Bamba-9B",
153 + "BambaForCausalLM": _HfExamplesInfo("ibm-ai-platform/Bamba-9B-v1",
154 + min_transformers_version="4.55.1",
155 extras={"tiny": "hmellor/tiny-random-BambaForCausalLM"}), # noqa: E501
156 "BloomForCausalLM": _HfExamplesInfo("bigscience/bloom-560m",
157 {"1b": "bigscience/bloomz-1b1"}),
@@ -223,6 +226,7 @@ _TEXT_GENERATION_EXAMPLE_MODELS = {
226 trust_remote_code=True),
227 "JAISLMHeadModel": _HfExamplesInfo("inceptionai/jais-13b-chat"),
228 "JambaForCausalLM": _HfExamplesInfo("ai21labs/AI21-Jamba-1.5-Mini",
229 + min_transformers_version="4.55.1",
230 extras={
231 "tiny": "ai21labs/Jamba-tiny-dev",
232 "random": "ai21labs/Jamba-tiny-random", # noqa: E501