[V1] Allow tokenizer_mode and trust_remote_code for Detokenizer (#10211)

Signed-off-by: Roger Wang <ywang@roblox.com>
This commit is contained in:
Roger Wang
2024-11-11 18:01:18 +08:00
committed by GitHub
parent 36e4acd02a
commit 5fb1f935b0
2 changed files with 19 additions and 5 deletions
+4 -1
View File
@@ -125,7 +125,10 @@ class LLMEngine:
# Ping the tokenizer to ensure liveness if it runs in a
# different process.
self.tokenizer.ping()
self.detokenizer = Detokenizer(self.model_config.tokenizer)
self.detokenizer = Detokenizer(
tokenizer_name=self.model_config.tokenizer,
tokenizer_mode=self.model_config.tokenizer_mode,
trust_remote_code=self.model_config.trust_remote_code)
self.generation_config_fields = _load_generation_config_dict(
model_config)