-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs to explain how to use tokenizer
field for chat prompt formats
#1476
Comments
Hi! You can now use the |
tokenizer
field for chat prompt formats
Thanks, I suspected you were doing something like that. My problem is that I'm using a kind of hackish and hybrid solution to get the tools support working. I'm running inference on fireworks.ai, where there's only their version of the OpenAI API endpoint and their own custom one. Neither provides me with sufficient control with the template, so I had to use the completions API instead of chat_completions and format the template in chat-ui using JavaScript (it's trivial in Python since the standard template is easy to apply there with Jinja2, but less so in JS). But I implemented a hardcoded template-generator that will do for now. I didn't think I could just load the tokenizer unless I was using a TGI endpoint but maybe I'm wrong? A quick attempt doesn't look like it.
(I put "tokenizer": {"tokenizerUrl": "https://huggingface.co/nsarrazin/llama3.1-tokenizer/resolve/main/tokenizer.json", "tokenizerConfigUrl": "https://huggingface.co/nsarrazin/llama3.1-tokenizer/raw/main/tokenizer_config.json"} in my model definiton, and I checked that I can get the files with curl from the server, and tried to get the tokenizer with EDIT: I now see it's not that and it should work, but it's some kind of dependency issue which could hint at the dependencies in package.json needing an update? EDIT2: I found that "npm upgrade @hugginface/transfomers" was enough, and I now have the tokenizer working, so I can scrap the ugly hack I'd made for template generation. Can you provide any insights on how I should get tools support integrated "cleanly" in my scenario? I'm currently using a bunch of hacks based on (outdated) documentation guessing, and experimentation and it could work better... |
Bug description
In README.md, it's stated that the prompts used in production for HuggingChat can be found in PROMPTS.md.
However, PROMPTS.md has not been updated for 7 months and there are several prompts missing for newer models.
The text was updated successfully, but these errors were encountered: