cllatMTK commited on
Commit
695211a
1 Parent(s): dc88b1c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -203,7 +203,10 @@ We also integrate `chat_template` into [tokenizer_config.json](tokenizer_config.
203
  # ['▁', '你好', ',', '請問', '你', '可以', '完成', '什麼', '任務', '?']
204
  # ['▁', '你好', ',', '我', '可以', '幫助', '您', '解決', '各種', '問題', '、', '提供', '資訊', '和', '協助', '您', '完成', '許多', '不同', '的', '任務', '。', '例如', ':', '回答', '技術', '問題', '、', '提供', '建議', '、', '翻譯', '文字', '、', '尋找', '資料', '或', '協助', '您', '安排', '行程', '等', '。', '請', '告訴', '我', '如何', '能', '幫助', '您', '。']
205
  # ['▁', '太', '棒', '了', '!']
 
206
 
 
 
207
  >>> outputs = model.generate(tokenizer.apply_chat_template(chat, return_tensors="pt"),
208
  >>> # adjust below parameters if necessary
209
  >>> max_new_tokens=128,
@@ -213,7 +216,6 @@ We also integrate `chat_template` into [tokenizer_config.json](tokenizer_config.
213
  >>> temperature=0.01)
214
  >>>
215
  >>> print(tokenizer.decode(outputs[0]))
216
-
217
  ```
218
 
219
  ## Citation
 
203
  # ['▁', '你好', ',', '請問', '你', '可以', '完成', '什麼', '任務', '?']
204
  # ['▁', '你好', ',', '我', '可以', '幫助', '您', '解決', '各種', '問題', '、', '提供', '資訊', '和', '協助', '您', '完成', '許多', '不同', '的', '任務', '。', '例如', ':', '回答', '技術', '問題', '、', '提供', '建議', '、', '翻譯', '文字', '、', '尋找', '資料', '或', '協助', '您', '安排', '行程', '等', '。', '請', '告訴', '我', '如何', '能', '幫助', '您', '。']
205
  # ['▁', '太', '棒', '了', '!']
206
+ ```
207
 
208
+ Text generation can be done by `generate` and `apply_chat_template` functions:
209
+ ```python
210
  >>> outputs = model.generate(tokenizer.apply_chat_template(chat, return_tensors="pt"),
211
  >>> # adjust below parameters if necessary
212
  >>> max_new_tokens=128,
 
216
  >>> temperature=0.01)
217
  >>>
218
  >>> print(tokenizer.decode(outputs[0]))
 
219
  ```
220
 
221
  ## Citation