Skip to content

Commit d975885

Browse files
authored
feat: add tokenizer-config-path to launcher args (#1495)
This PR adds the `tokenizer-config-path` to the launcher and passes it to the router Fixes: #1427
1 parent 650fea1 commit d975885

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docs/source/basic_tutorials/launcher.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,14 @@ Options:
354354
355355
[env: NGROK_EDGE=]
356356
357+
```
358+
## TOKENIZER_CONFIG_PATH
359+
```shell
360+
--tokenizer-config-path <TOKENIZER_CONFIG_PATH>
361+
The path to the tokenizer config file. This path is used to load the tokenizer configuration which may include a `chat_template`. If not provided, the default config will be used from the model hub
362+
363+
[env: TOKENIZER_CONFIG_PATH=]
364+
357365
```
358366
## ENV
359367
```shell

launcher/src/main.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@ struct Args {
368368
#[clap(long, env)]
369369
ngrok_edge: Option<String>,
370370

371+
/// The path to the tokenizer config file. This path is used to load the tokenizer configuration which may
372+
/// include a `chat_template`. If not provided, the default config will be used from the model hub.
373+
#[clap(long, env)]
374+
tokenizer_config_path: Option<String>,
375+
371376
/// Display a lot of information about your runtime environment
372377
#[clap(long, short, action)]
373378
env: bool,
@@ -1016,6 +1021,12 @@ fn spawn_webserver(
10161021
args.model_id,
10171022
];
10181023

1024+
// Tokenizer config path
1025+
if let Some(ref tokenizer_config_path) = args.tokenizer_config_path {
1026+
router_args.push("--tokenizer-config-path".to_string());
1027+
router_args.push(tokenizer_config_path.to_string());
1028+
}
1029+
10191030
// Model optional max batch total tokens
10201031
if let Some(max_batch_total_tokens) = args.max_batch_total_tokens {
10211032
router_args.push("--max-batch-total-tokens".to_string());

0 commit comments

Comments
 (0)