[Perf] Optimize token_embed for pooling models, 1.0% token throughput improvement (#37347)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-03-19 10:27:51 +08:00
committed by GitHub
parent 6accb21f2a
commit e37ff5b5c8
2 changed files with 24 additions and 6 deletions
+4 -1
View File
@@ -2928,7 +2928,10 @@ class GPUModelRunner(
pooling_metadata = self.input_batch.get_pooling_metadata()
pooling_metadata.build_pooling_cursor(
num_scheduled_tokens_np, seq_lens_cpu, device=hidden_states.device
num_scheduled_tokens_np,
seq_lens_cpu,
device=hidden_states.device,
query_start_loc_gpu=self.query_start_loc.gpu[: num_reqs + 1],
)
model = cast(VllmModelForPooling, self.model)