[BugFix] Preserve tokenizer worker fanout when skip_tokenizer_init is enabled (#30682)

Co-authored-by: hjzhang <zhanghjzzz@qq.com>
Co-authored-by: hnyls2002 <lsyincs@gmail.com>
This commit is contained in:
hjzhang
2026-07-16 01:29:46 -07:00
committed by GitHub
co-authored by hjzhang hnyls2002
parent 4d60c4540c
commit db7e6807de
5 changed files with 35 additions and 11 deletions
@@ -232,6 +232,22 @@ class TestLoadBalanceMethod(unittest.TestCase):
self.assertEqual(server_args.disaggregation_transfer_backend, "mooncake")
class TestSkipTokenizerInit(unittest.TestCase):
def test_skip_tokenizer_worker_counts(self):
server_args = ServerArgs(
model_path="dummy",
skip_tokenizer_init=True,
tokenizer_worker_num=4,
detokenizer_worker_num=3,
)
server_args._handle_tokenizer_batching()
# Tokenizer fanout preserved; detokenizer coerced to 1 (no decode work).
self.assertEqual(server_args.tokenizer_worker_num, 4)
self.assertEqual(server_args.detokenizer_worker_num, 1)
class TestHiSparseDsaBackendPolicy(unittest.TestCase):
# The backend selection moved to the resolution pipeline; these policy
# tests drive the pass through its read-only view.