[Bug fix] Fix zmq core bug (#3357)

* [Bug fix] Fix zmq core bug due to concurrently used by threads

* Fix zmq core bug due to concurrently used by threads
This commit is contained in:
chenjian
2025-08-13 20:24:39 +08:00
committed by GitHub
parent 7573802a88
commit 89177d881c
3 changed files with 20 additions and 17 deletions

View File

@@ -525,7 +525,8 @@ class TokenProcessor:
for token_id in token_ids:
self.tokens_counter[task_id] += 1
if token_id != RECOVERY_STOP_SIGNAL:
result.outputs.token_ids.append(token_id)
if not (envs.FD_ENABLE_INTERNAL_ADAPTER and token_id in task.eos_token_ids):
result.outputs.token_ids.append(token_id)
task.output_token_ids.append(token_id)
if token_id in task.eos_token_ids or is_prefill or recovery_stop:
result.finished = True