File size: 1,249 Bytes
08fff1b
 
 
 
 
 
 
 
 
 
 
 
25f2efc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
08fff1b
25f2efc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
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](./img/Interface.png)

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

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