text-generation-inference/router/src
drbh ee1cf51ce7
fix: tokenizer config should use local model path when possible (#1518)
This PR fixes the issue with loading a local tokenizer config.
Previously the default functionality would look in the current working
directory. Now if a local model path is specified we will check that
directory for the tokenizer_config.

## Examples of valid commands

uses tokenizer_config from hub
```
text-generation-launcher --model-id HuggingFaceH4/zephyr-7b-beta
```

use tokenizer_config from local model path
```
text-generation-launcher \
  --model-id ~/.cache/huggingface/hub/models--HuggingFaceH4--zephyr-7b-beta/snapshots/dc24cabd13eacd3ae3a5fe574bd645483a335a4a/
```

use specific tokenizer_config file
```
 text-generation-launcher \
  --model-id ~/.cache/huggingface/hub/models--HuggingFaceH4--zephyr-7b-beta/snapshots/dc24cabd13eacd3ae3a5fe574bd645483a335a4a/ \
  --tokenizer-config-path ~/.cache/huggingface/hub/models--HuggingFaceH4--zephyr-7b-beta/snapshots/dc24cabd13eacd3ae3a5fe574bd645483a335a4a/tokenizer_config.json


```

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
2024-02-01 09:39:32 -05:00
..
health.rs Rebased #617 (#868) 2023-08-28 11:43:47 +02:00
infer.rs Add a new /tokenize route to get the tokenized input (#1471) 2024-01-25 14:19:03 +01:00
lib.rs fix: tokenizer config should use local model path when possible (#1518) 2024-02-01 09:39:32 -05:00
main.rs fix: tokenizer config should use local model path when possible (#1518) 2024-02-01 09:39:32 -05:00
queue.rs Speculative (#1308) 2023-12-11 12:46:30 +01:00
server.rs Hotfix the / health - route. (#1515) 2024-02-01 13:29:04 +01:00
validation.rs Add a new /tokenize route to get the tokenized input (#1471) 2024-01-25 14:19:03 +01:00