Skip to content

Commit ae96da0

Browse files
committed
update
1 parent 076f94d commit ae96da0

File tree

2 files changed

+99
-4
lines changed

2 files changed

+99
-4
lines changed

components/src/dynamo/frontend/frontend_args.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ class FrontendConfig(KvRouterConfigBase):
7878
preprocess_workers: int
7979
tokenizer_backend: str
8080

81+
_VALID_TOKENIZER_BACKENDS = {"default", "fastokens"}
82+
8183
def validate(self) -> None:
8284
if bool(self.tls_cert_path) ^ bool(self.tls_key_path): # ^ is XOR
8385
raise ValueError(
@@ -89,6 +91,11 @@ def validate(self) -> None:
8991
)
9092
if self.router_enable_cache_control and self.router_mode != "kv":
9193
raise ValueError("--enable-cache-control requires --router-mode=kv")
94+
if self.tokenizer_backend not in self._VALID_TOKENIZER_BACKENDS:
95+
raise ValueError(
96+
f"--tokenizer: invalid value '{self.tokenizer_backend}' "
97+
f"(choose from {sorted(self._VALID_TOKENIZER_BACKENDS)})"
98+
)
9299

93100

94101
@register_encoder(FrontendConfig)

lib/bindings/kvbm/Cargo.lock

Lines changed: 92 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)