YC-Chen commited on
Commit
6a281a4
1 Parent(s): 21032c4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -2
README.md CHANGED
@@ -185,9 +185,9 @@ model = AutoModelForCausalLM.from_pretrained(
185
  )
186
  ```
187
 
188
- The structure of the query template follows that of Mistral-7B-Instruct, as shown below.
189
  ```txt
190
- <s> SYS_PROMPT [INST] QUERY1 [/INST] RESPONSE1 [INST] QUERY2 [/INST]
191
  ```
192
  where `SYS_PROMPT`, `QUERY1`, `RESPONSE1`, and `QUERY2` can be provided by the user.
193
 
@@ -196,6 +196,20 @@ The suggested default `SYS_PROMPT` is
196
  You are a helpful AI assistant built by MediaTek Research. The user you are helping speaks Traditional Chinese and comes from Taiwan.
197
  ```
198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  ## Citation
200
 
201
  ```
 
185
  )
186
  ```
187
 
188
+ The structure of the query is
189
  ```txt
190
+ <s>SYS_PROMPT [INST] QUERY1 [/INST] RESPONSE1 [INST] QUERY2 [/INST]
191
  ```
192
  where `SYS_PROMPT`, `QUERY1`, `RESPONSE1`, and `QUERY2` can be provided by the user.
193
 
 
196
  You are a helpful AI assistant built by MediaTek Research. The user you are helping speaks Traditional Chinese and comes from Taiwan.
197
  ```
198
 
199
+ We also integrate `chat_template` into [tokenizer_config.json](tokenizer_config.json), so you can `apply_chat_template` to get the prompt.
200
+
201
+ ```python
202
+ >>> from transformers import AutoTokenizer
203
+ >>> tokenizer = AutoTokenizer.from_pretrained("MediaTek-Research/Breeze-7B-Instruct-v0.1")
204
+ >>> chat = [
205
+ ... {"role": "user", "content": "Hello, how are you?"},
206
+ ... {"role": "assistant", "content": "I'm doing great. How can I help you today?"},
207
+ ... {"role": "user", "content": "I'd like to show off how chat templating works!"},
208
+ ... ]
209
+ >>> tokenizer.apply_chat_template(chat, tokenize=False)
210
+
211
+ ```
212
+
213
  ## Citation
214
 
215
  ```