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
53da4cd3
Unverified
Commit
53da4cd3
authored
Jun 24, 2025
by
Li, Jiang
Committed by
GitHub
Jun 24, 2025
Browse files
[Bugfix][CPU] Fix InputBatch for pooling models in the CPU v1 (#20014)
Signed-off-by:
jiang1.li
<
jiang1.li@intel.com
>
parent
9a3b8832
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
tests/models/language/pooling/test_reward.py
tests/models/language/pooling/test_reward.py
+1
-1
vllm/v1/worker/cpu_model_runner.py
vllm/v1/worker/cpu_model_runner.py
+4
-0
No files found.
tests/models/language/pooling/test_reward.py
View file @
53da4cd3
...
...
@@ -101,4 +101,4 @@ def test_prm_models(
hf_output
=
torch
.
tensor
(
hf_output
)
vllm_output
=
torch
.
tensor
(
vllm_output
)
assert
torch
.
allclose
(
hf_output
,
vllm_output
,
1e-2
)
assert
torch
.
allclose
(
hf_output
,
vllm_output
,
1
.5
e-2
)
vllm/v1/worker/cpu_model_runner.py
View file @
53da4cd3
...
...
@@ -7,6 +7,7 @@ import torch
from
vllm.config
import
VllmConfig
from
vllm.logger
import
init_logger
from
vllm.model_executor.model_loader
import
get_model
from
vllm.model_executor.models.interfaces
import
has_step_pooler
from
vllm.v1.worker.gpu_model_runner
import
GPUModelRunner
logger
=
init_logger
(
__name__
)
...
...
@@ -52,6 +53,9 @@ class CPUModelRunner(GPUModelRunner):
logger
.
info
(
"Starting to load model %s..."
,
self
.
model_config
.
model
)
self
.
model
=
get_model
(
vllm_config
=
self
.
vllm_config
)
if
has_step_pooler
(
self
.
model
):
self
.
input_batch
.
logits_processing_needs_token_ids
=
True
if
self
.
lora_config
:
self
.
model
=
self
.
load_lora_model
(
self
.
model
,
self
.
model_config
,
self
.
scheduler_config
,
...
...
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