From 826a4de0626a9107bb4c65436f021d6ec17e1d30 Mon Sep 17 00:00:00 2001 From: Mick Date: Sun, 24 May 2026 15:09:36 +0800 Subject: [PATCH] [srt] store req input ids as arrays (#26165) --- python/sglang/srt/managers/schedule_batch.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/python/sglang/srt/managers/schedule_batch.py b/python/sglang/srt/managers/schedule_batch.py index 4634b351e..e64d0e945 100755 --- a/python/sglang/srt/managers/schedule_batch.py +++ b/python/sglang/srt/managers/schedule_batch.py @@ -680,12 +680,10 @@ class Req(ReqDllmMixin): ): # Input and output info self.rid = rid - self.origin_input_ids_unpadded = ( - origin_input_ids_unpadded - if origin_input_ids_unpadded - else origin_input_ids # Before image padding - ) - self.origin_input_ids = origin_input_ids + self.origin_input_ids_unpadded = array( + "q", origin_input_ids_unpadded or origin_input_ids + ) # Before image padding + self.origin_input_ids = array("q", origin_input_ids) # Each decode stage's output ids self.output_ids = array("q") # fill_ids = origin_input_ids + output_ids. Updated if chunked.