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
2be1a0f7
Unverified
Commit
2be1a0f7
authored
Mar 19, 2026
by
Wentao Ye
Committed by
GitHub
Mar 20, 2026
Browse files
[Refactor] Remove dead code in pooling model (#37572)
Signed-off-by:
yewentao256
<
zhyanwentao@126.com
>
parent
4120a05f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
12 deletions
+0
-12
vllm/entrypoints/pooling/utils.py
vllm/entrypoints/pooling/utils.py
+0
-8
vllm/v1/pool/metadata.py
vllm/v1/pool/metadata.py
+0
-4
No files found.
vllm/entrypoints/pooling/utils.py
View file @
2be1a0f7
...
@@ -60,14 +60,6 @@ def encode_pooling_output_float(output: PoolingRequestOutput) -> list[float]:
...
@@ -60,14 +60,6 @@ def encode_pooling_output_float(output: PoolingRequestOutput) -> list[float]:
return
output
.
outputs
.
data
.
tolist
()
return
output
.
outputs
.
data
.
tolist
()
def
encode_pooling_output_binary
(
output
:
PoolingRequestOutput
,
embed_dtype
:
EmbedDType
,
endianness
:
Endianness
,
)
->
bytes
:
return
tensor2binary
(
output
.
outputs
.
data
,
embed_dtype
,
endianness
)
def
encode_pooling_output_base64
(
def
encode_pooling_output_base64
(
output
:
PoolingRequestOutput
,
output
:
PoolingRequestOutput
,
embed_dtype
:
EmbedDType
,
embed_dtype
:
EmbedDType
,
...
...
vllm/v1/pool/metadata.py
View file @
2be1a0f7
...
@@ -14,7 +14,6 @@ pin_memory = is_pin_memory_available()
...
@@ -14,7 +14,6 @@ pin_memory = is_pin_memory_available()
@
dataclass
@
dataclass
class
PoolingCursor
:
class
PoolingCursor
:
index
:
list
[
int
]
first_token_indices_gpu
:
torch
.
Tensor
first_token_indices_gpu
:
torch
.
Tensor
last_token_indices_gpu
:
torch
.
Tensor
last_token_indices_gpu
:
torch
.
Tensor
prompt_lens_cpu
:
torch
.
Tensor
prompt_lens_cpu
:
torch
.
Tensor
...
@@ -23,7 +22,6 @@ class PoolingCursor:
...
@@ -23,7 +22,6 @@ class PoolingCursor:
def
__getitem__
(
self
,
indices
:
slice
):
def
__getitem__
(
self
,
indices
:
slice
):
return
PoolingCursor
(
return
PoolingCursor
(
index
=
self
.
index
[
indices
],
first_token_indices_gpu
=
self
.
first_token_indices_gpu
[
indices
],
first_token_indices_gpu
=
self
.
first_token_indices_gpu
[
indices
],
last_token_indices_gpu
=
self
.
last_token_indices_gpu
[
indices
],
last_token_indices_gpu
=
self
.
last_token_indices_gpu
[
indices
],
prompt_lens_cpu
=
self
.
prompt_lens_cpu
[
indices
],
prompt_lens_cpu
=
self
.
prompt_lens_cpu
[
indices
],
...
@@ -108,7 +106,6 @@ class PoolingMetadata:
...
@@ -108,7 +106,6 @@ class PoolingMetadata:
assert
len
(
prompt_lens
)
==
n_seq
assert
len
(
prompt_lens
)
==
n_seq
index
=
list
(
range
(
n_seq
))
num_scheduled_tokens_cpu
=
torch
.
from_numpy
(
num_scheduled_tokens_np
)
num_scheduled_tokens_cpu
=
torch
.
from_numpy
(
num_scheduled_tokens_np
)
if
query_start_loc_gpu
is
None
:
if
query_start_loc_gpu
is
None
:
cumsum
=
torch
.
zeros
(
cumsum
=
torch
.
zeros
(
...
@@ -130,7 +127,6 @@ class PoolingMetadata:
...
@@ -130,7 +127,6 @@ class PoolingMetadata:
)
)
cumsum
=
query_start_loc_gpu
cumsum
=
query_start_loc_gpu
self
.
pooling_cursor
=
PoolingCursor
(
self
.
pooling_cursor
=
PoolingCursor
(
index
=
index
,
first_token_indices_gpu
=
cumsum
[:
n_seq
],
first_token_indices_gpu
=
cumsum
[:
n_seq
],
last_token_indices_gpu
=
cumsum
[
1
:]
-
1
,
last_token_indices_gpu
=
cumsum
[
1
:]
-
1
,
prompt_lens_cpu
=
prompt_lens
,
prompt_lens_cpu
=
prompt_lens
,
...
...
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