Skip to content

Commit 8a0ffd6

Browse files
authored
Remove mamba_ssm from vLLM requirements; install inside test container using --no-build-isolation (#22541)
Signed-off-by: Thomas Parnell <[email protected]>
1 parent 23472ff commit 8a0ffd6

File tree

6 files changed

+26
-45
lines changed

6 files changed

+26
-45
lines changed

.buildkite/test-pipeline.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ steps:
535535
- vllm/
536536
- tests/models/language
537537
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/[email protected]'
540538
- pip freeze | grep -E 'torch'
541539
- pytest -v -s models/language -m core_model
542540

@@ -547,8 +545,10 @@ steps:
547545
- vllm/
548546
- tests/models/language/generation
549547
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/[email protected]'
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/[email protected]'
551+
- uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/[email protected]'
552552
- pytest -v -s models/language/generation -m hybrid_model
553553

554554
- label: Language Models Test (Extended Generation) # 1hr20min

docs/contributing/ci/update_pytorch_version.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,6 @@ MAX_JOBS=16 uv pip install --system \
131131
--no-build-isolation "git+https://github.com/facebookresearch/[email protected]"
132132
```
133133
134-
### Mamba
135-
136-
```bash
137-
uv pip install --system \
138-
--no-build-isolation "git+https://github.com/state-spaces/[email protected]"
139-
```
140-
141-
### causal-conv1d
142-
143-
```bash
144-
uv pip install 'git+https://github.com/Dao-AILab/[email protected]'
145-
```
146-
147134
## Update all the different vLLM platforms
148135
149136
Rather than attempting to update all vLLM platforms in a single pull request, it's more manageable

requirements/test.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pytest-timeout
1010
# testing utils
1111
backoff # required for phi4mm test
1212
blobfile # required for kimi-vl test
13-
einops # required for MPT, qwen-vl and Mamba
13+
einops # required for MPT, qwen-vl
1414
httpx
1515
librosa # required for audio tests
1616
vector_quantize_pytorch # required for minicpmo_26 test
@@ -26,7 +26,6 @@ torch==2.7.1
2626
torchaudio==2.7.1
2727
torchvision==0.22.1
2828
transformers_stream_generator # required for qwen-vl test
29-
mamba_ssm==2.2.5 # required for plamo2 test
3029
matplotlib # required for qwen-vl test
3130
mistral_common[image,audio] >= 1.8.2 # required for voxtral test
3231
num2words # required for smolvlm test
@@ -53,4 +52,4 @@ runai-model-streamer==0.11.0
5352
runai-model-streamer-s3==0.11.0
5453
fastsafetensors>=0.1.10
5554
pydantic>=2.10 # 2.9 leads to error on python 3.10
56-
terratorch==1.1rc2 # required for PrithviMAE test
55+
terratorch==1.1rc2 # required for PrithviMAE test

requirements/test.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ einops==0.8.1
178178
# via
179179
# -r requirements/test.in
180180
# encodec
181-
# mamba-ssm
182181
# terratorch
183182
# torchgeo
184183
# vector-quantize-pytorch
@@ -417,8 +416,6 @@ lxml==5.3.0
417416
# sacrebleu
418417
mako==1.3.10
419418
# via alembic
420-
mamba-ssm==2.2.5
421-
# via -r requirements/test.in
422419
markdown==3.8.2
423420
# via mlflow
424421
markdown-it-py==3.0.0
@@ -475,8 +472,6 @@ networkx==3.2.1
475472
# via
476473
# scikit-image
477474
# torch
478-
ninja==1.11.1.3
479-
# via mamba-ssm
480475
nltk==3.9.1
481476
# via rouge-score
482477
num2words==0.5.14
@@ -629,7 +624,6 @@ packaging==24.2
629624
# lazy-loader
630625
# lightning
631626
# lightning-utilities
632-
# mamba-ssm
633627
# matplotlib
634628
# mlflow-skinny
635629
# peft
@@ -973,7 +967,6 @@ sentencepiece==0.2.0
973967
setuptools==77.0.3
974968
# via
975969
# lightning-utilities
976-
# mamba-ssm
977970
# pytablewriter
978971
# torch
979972
# triton
@@ -1085,7 +1078,6 @@ torch==2.7.1+cu128
10851078
# lightly
10861079
# lightning
10871080
# lm-eval
1088-
# mamba-ssm
10891081
# mteb
10901082
# open-clip-torch
10911083
# peft
@@ -1152,16 +1144,13 @@ transformers==4.55.0
11521144
# -r requirements/test.in
11531145
# genai-perf
11541146
# lm-eval
1155-
# mamba-ssm
11561147
# peft
11571148
# sentence-transformers
11581149
# transformers-stream-generator
11591150
transformers-stream-generator==0.0.5
11601151
# via -r requirements/test.in
11611152
triton==3.3.1
1162-
# via
1163-
# mamba-ssm
1164-
# torch
1153+
# via torch
11651154
tritonclient==2.51.0
11661155
# via
11671156
# -r requirements/test.in

tests/models/language/generation/test_hybrid.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@
2525

2626
HYBRID_MODELS = [
2727
"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",
3230
"Zyphra/Zamba2-1.2B-instruct",
3331
"hmellor/tiny-random-BambaForCausalLM",
3432
"ibm-ai-platform/Bamba-9B-v1",
@@ -83,12 +81,16 @@ def test_models(
8381
try:
8482
model_info = HF_EXAMPLE_MODELS.find_hf_info(model)
8583
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")
8786
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}")
8991

9092
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:
9294
hf_outputs = hf_model.generate_greedy_logprobs_limit(
9395
example_prompts, max_tokens, num_logprobs)
9496
else:

tests/models/registry.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@ class _HfExamplesInfo:
7979
def check_transformers_version(
8080
self,
8181
*,
82-
on_fail: Literal["error", "skip"],
82+
on_fail: Literal["error", "skip", "return"],
8383
check_min_version: bool = True,
8484
check_max_version: bool = True,
85-
) -> None:
85+
) -> Optional[str]:
8686
"""
8787
If the installed transformers version does not meet the requirements,
8888
perform the given action.
8989
"""
9090
if (self.min_transformers_version is None
9191
and self.max_transformers_version is None):
92-
return
92+
return None
9393

9494
current_version = TRANSFORMERS_VERSION
9595
cur_base_version = Version(current_version).base_version
@@ -105,16 +105,18 @@ def check_transformers_version(
105105
and Version(cur_base_version) > Version(max_version)):
106106
msg += f"<={max_version}` is required to run this model."
107107
else:
108-
return
108+
return None
109109

110110
if self.transformers_version_reason:
111111
msg += f" Reason: {self.transformers_version_reason}"
112112

113113
if on_fail == "error":
114114
raise RuntimeError(msg)
115-
else:
115+
elif on_fail == "skip":
116116
pytest.skip(msg)
117117

118+
return msg
119+
118120
def check_available_online(
119121
self,
120122
*,
@@ -148,7 +150,8 @@ def check_available_online(
148150
trust_remote_code=True),
149151
"BailingMoeForCausalLM": _HfExamplesInfo("inclusionAI/Ling-lite-1.5",
150152
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",
152155
extras={"tiny": "hmellor/tiny-random-BambaForCausalLM"}), # noqa: E501
153156
"BloomForCausalLM": _HfExamplesInfo("bigscience/bloom-560m",
154157
{"1b": "bigscience/bloomz-1b1"}),
@@ -223,6 +226,7 @@ def check_available_online(
223226
trust_remote_code=True),
224227
"JAISLMHeadModel": _HfExamplesInfo("inceptionai/jais-13b-chat"),
225228
"JambaForCausalLM": _HfExamplesInfo("ai21labs/AI21-Jamba-1.5-Mini",
229+
min_transformers_version="4.55.1",
226230
extras={
227231
"tiny": "ai21labs/Jamba-tiny-dev",
228232
"random": "ai21labs/Jamba-tiny-random", # noqa: E501

0 commit comments

Comments
 (0)