FastChat icon indicating copy to clipboard operation
FastChat copied to clipboard

[Feature Request] Support for Huggingface Chat Templates

Open PyroGenesis opened this issue 10 months ago • 2 comments

Now that many newer Huggingface models come with a chat template in their tokenizer, FastChat should use it as the primary way to build conversations, falling back to conversation.py when a template isn't available.

This would reduce the burden to add conversation templates every time a new popular model is released. For example, Llama 3 could be supported right on release this way.

Relevant links: https://huggingface.co/docs/transformers/v4.34.0/en/chat_templating https://github.com/vllm-project/vllm/issues/1361

PyroGenesis avatar Apr 22 '24 16:04 PyroGenesis

I am also facing this problem, as i am trying to use transformer converse to create simple ways of conversation with vicuna

cywuuuu avatar Apr 25 '24 16:04 cywuuuu

I agree. We should a a template to use any model served via an API without having to wait for a new release.

soufianechami avatar May 09 '24 08:05 soufianechami