TGI : Llama2 : Call tokenizer from TGI server for token counting in given string #1430
-
I have sucessfully setup TGI end point for Llama2 model. Is there a way to call the tokenizer to count number of tokens in given string using TGI ? Without using TGI, i used to count the number of token using below code, by directly pointing the directory of the Llama2 model weights.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Any thoughts on how to call tokenizer using HF TGI or lorax (LoRA eXchange) ? |
Beta Was this translation helpful? Give feedback.
-
You can do it now. https://huggingface.github.io/text-generation-inference/#/Text%20Generation%20Inference/tokenize |
Beta Was this translation helpful? Give feedback.
You can do it now. https://huggingface.github.io/text-generation-inference/#/Text%20Generation%20Inference/tokenize