CoolFace
Apppublic

EmbeddedLLM/chat-template-generation

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
12likes
App README

Chat Template Generation: Make Chat Easier with Huggingface Tokenizer

[image]

This streamlit app is to serve as an easier way to check and push the chat template to your/exisiting huggingface repo Current predefined templates:

  • open-orca.jinja2
  • mistral-7b-openorca.jinja2
  • orca2.jinja2
  • airoboros_v2.jinja2
  • airoboros_v1.jinja2
  • openhermes-2.5-mistral.jinja2
  • zephyr.jinja2
  • falcon-chat.jinja2
  • chat-ml.jinja2
  • llama-2.jinja2
  • vicuna_v1.1.jinja2

More templates will be predefined for easier setup of chat template.

With this interface you can easily

  • update your tokenizerconfig.json with chat-template attributes with predefined prompt template or custom template so that you can use `tokenizer.applychattemplate(chat, tokenize=False, addgeneration_prompt=True)` to generate chat prompt.
  • contribute to existing model repository to support chat-template attributes
  • review if your prompt template matches with your expected prompt

To run locally

  1. 1.python -m pip install -r requirements.txt
  2. 2.streamlit run app.py

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference