Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
a08b7733
Unverified
Commit
a08b7733
authored
Mar 30, 2026
by
haosdent
Committed by
GitHub
Mar 30, 2026
Browse files
[CI] Fix SPLADE pooler test broken by #38139 (#38495)
Signed-off-by:
haosdent
<
haosdent@gmail.com
>
parent
85c0950b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
tests/models/language/pooling/test_splade_sparse_pooler.py
tests/models/language/pooling/test_splade_sparse_pooler.py
+8
-4
No files found.
tests/models/language/pooling/test_splade_sparse_pooler.py
View file @
a08b7733
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
types
import
pytest
import
torch
import
torch.nn
as
nn
...
...
@@ -11,6 +9,8 @@ from vllm.model_executor.models.bert import (
BertMLMHead
,
SPLADESparsePooler
,
)
from
vllm.pooling_params
import
PoolingParams
from
vllm.v1.pool.metadata
import
PoolingMetadata
,
PoolingStates
# ---------------------------------------------------------------------
# Functional test: SPLADE formula correctness (no HF download needed)
...
...
@@ -38,8 +38,12 @@ def test_splade_pooler_matches_reference_formula(B, T, H, V):
],
dtype
=
torch
.
long
,
)
meta
=
types
.
SimpleNamespace
(
prompt_lens
=
prompt_lens_tenser
,
prompt_token_ids
=
token_ids
meta
=
PoolingMetadata
(
prompt_lens
=
prompt_lens_tenser
,
prompt_token_ids
=
token_ids
,
prompt_token_ids_cpu
=
token_ids
,
pooling_params
=
[
PoolingParams
(
task
=
"embed"
)]
*
B
,
pooling_states
=
[
PoolingStates
()
for
_
in
range
(
B
)],
)
# MLM head (prefer BertMLMHead, fallback to Linear if unavailable)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment