TheBloke commited on
Commit
f0a87c4
1 Parent(s): 15cc7d9

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -0
README.md CHANGED
@@ -396,6 +396,23 @@ For more detailed discussions, please check out our [blog post](https://starling
396
  Our model follows the exact chat template and usage as [Openchat 3.5](https://huggingface.co/openchat/openchat_3.5). Please refer to their model card for more details.
397
  In addition, our model is hosted on LMSYS [Chatbot Arena](https://chat.lmsys.org) for free test.
398
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
 
400
 
401
  ## License
 
396
  Our model follows the exact chat template and usage as [Openchat 3.5](https://huggingface.co/openchat/openchat_3.5). Please refer to their model card for more details.
397
  In addition, our model is hosted on LMSYS [Chatbot Arena](https://chat.lmsys.org) for free test.
398
 
399
+ The conversation template is the same as Openchat 3.5:
400
+ ```
401
+ import transformers
402
+ tokenizer = transformers.AutoTokenizer.from_pretrained("openchat/openchat_3.5")
403
+
404
+ # Single-turn
405
+ tokens = tokenizer("GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant:").input_ids
406
+ assert tokens == [1, 420, 6316, 28781, 3198, 3123, 1247, 28747, 22557, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747]
407
+
408
+ # Multi-turn
409
+ tokens = tokenizer("GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant: Hi<|end_of_turn|>GPT4 Correct User: How are you today?<|end_of_turn|>GPT4 Correct Assistant:").input_ids
410
+ assert tokens == [1, 420, 6316, 28781, 3198, 3123, 1247, 28747, 22557, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747, 15359, 32000, 420, 6316, 28781, 3198, 3123, 1247, 28747, 1602, 460, 368, 3154, 28804, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747]
411
+
412
+ # Coding Mode
413
+ tokens = tokenizer("Code User: Implement quicksort using C++<|end_of_turn|>Code Assistant:").input_ids
414
+ assert tokens == [1, 7596, 1247, 28747, 26256, 2936, 7653, 1413, 334, 1680, 32000, 7596, 21631, 28747]
415
+ ```
416
 
417
 
418
  ## License