Add chat templates to tokenizer_config.json

#46
by Rocketknight1 HF staff - opened

Hi, Matt from Hugging Face here! We held off on doing this for a while, since multiple templates weren't properly supported, but they're in the 4.39 release that's been out for a couple of weeks, so it might be safe to start changing over.

This PR just copies the default chat templates from the tokenizer class into tokenizer_config.json, making them accessible to users and to conversion tools (e.g. llama.cpp). Over time, we hope to deprecate hardcoded templates entirely!

Cohere For AI org

Thanks a lot Matt, this makes sense and looks very nice. I'm merging your PR.

ahmetustun changed pull request status to merged
Cohere For AI org
edited Apr 4, 2024

Hey Matt! After I merged the changes, automatic parsing gave this error:
Screenshot 2024-04-04 at 20.16.38.png

Sign up or log in to comment