remove seq_lens_this_time (#4821)

This commit is contained in:
周周周
2025-11-06 11:06:28 +08:00
committed by GitHub
parent 62dfad4a5f
commit 69fa741763
2 changed files with 4 additions and 16 deletions

View File

@@ -91,12 +91,7 @@ else:
from fastdeploy.output.pooler import PoolerOutput, PoolingSequenceGroupOutput
from fastdeploy.output.stream_transfer_data import DecoderState, StreamTransferData
from fastdeploy.worker.output import (
LogprobsTensors,
ModelOutputData,
ModelRunnerOutput,
SamplerOutput,
)
from fastdeploy.worker.output import LogprobsTensors, ModelOutputData, SamplerOutput
DISABLE_RECOVER = envs.FD_DISABLED_RECOVER == "1"
@@ -208,7 +203,7 @@ def pre_process(
"""
token_num = paddle.sum(seq_lens_this_time)
if current_platform.is_cuda() and not speculative_decoding:
if (current_platform.is_cuda() or current_platform.is_iluvatar()) and not speculative_decoding:
# Note(ZKK): This case's code is very simple!
ids_remove_padding, batch_id_per_token, cu_seqlens_q, cu_seqlens_k = get_padding_offset(
input_ids, token_num, seq_lens_this_time
@@ -322,7 +317,7 @@ def post_process_normal(
async_output_queue: queue.Queue = None,
think_end_id: int = -1,
line_break_id: int = -1,
) -> ModelRunnerOutput:
):
"""Post-processing steps after completing a single token generation."""
if think_end_id > 0:
limit_thinking_content_length(