tjtanaa's picture
init repository
4d82421

A newer version of the Streamlit SDK is available: 1.40.1

Upgrade
metadata
title: Chat Template Generation
emoji: 🔥
colorFrom: red
colorTo: gray
sdk: streamlit
sdk_version: 1.28.2
app_file: app.py
pinned: false
license: apache-2.0

Chat Template Generation: Make Chat Easier with Huggingface Tokenizer

interface

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 tokenizer_config.json with chat-template attributes with predefined prompt template or custom template so that you can use tokenizer.apply_chat_template(chat, tokenize=False, add_generation_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. python -m pip install -r requirements.txt
  2. streamlit run app.py

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