Clean up unit tests (#1020)

This commit is contained in:
Lianmin Zheng
2024-08-10 15:09:03 -07:00
committed by GitHub
parent b68c4c073b
commit 54fb1c80c0
24 changed files with 82 additions and 157 deletions

View File

@@ -461,8 +461,11 @@ class ModelTpServer:
next_token_ids = next_token_ids.tolist()
else:
if self.tokenizer is None:
for i, req in enumerate(batch.reqs):
next_token_ids.extend(req.sampling_params.stop_token_ids)
next_token_ids = []
for req in batch.reqs:
next_token_ids.append(
next(iter(req.sampling_params.stop_token_ids))
)
else:
next_token_ids = [self.tokenizer.eos_token_id] * len(batch.reqs)