mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
remove seq_lens_this_time (#4821)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user