update pad seq (#6303)

Co-authored-by: Tong Li <tong.li35271158@gmail.com>
This commit is contained in:
Tong Li
2025-05-13 16:51:27 +08:00
committed by YeAnbang
parent 9544c51a74
commit 4ac7d065a6
4 changed files with 3 additions and 28 deletions

View File

@@ -236,7 +236,7 @@ class VLLMInferenceBackend(BaseInferenceBackend):
log_probs.append(p)
# pad them
max_len = max(out_len)
max_len = self.generate_config.max_tokens
action_mask = torch.ones(len(out_tokens), max_len, dtype=attention_mask.dtype)
for i, new_token_ids in enumerate(out_tokens):