TheBloke commited on
Commit
028036d
1 Parent(s): 38da042

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -0
README.md CHANGED
@@ -376,6 +376,23 @@ For more detailed discussions, please check out our [blog post](https://starling
376
  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.
377
  In addition, our model is hosted on LMSYS [Chatbot Arena](https://chat.lmsys.org) for free test.
378
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
 
380
 
381
  ## License
 
376
  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.
377
  In addition, our model is hosted on LMSYS [Chatbot Arena](https://chat.lmsys.org) for free test.
378
 
379
+ The conversation template is the same as Openchat 3.5:
380
+ ```
381
+ import transformers
382
+ tokenizer = transformers.AutoTokenizer.from_pretrained("openchat/openchat_3.5")
383
+
384
+ # Single-turn
385
+ tokens = tokenizer("GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant:").input_ids
386
+ assert tokens == [1, 420, 6316, 28781, 3198, 3123, 1247, 28747, 22557, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747]
387
+
388
+ # Multi-turn
389
+ 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
390
+ 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]
391
+
392
+ # Coding Mode
393
+ tokens = tokenizer("Code User: Implement quicksort using C++<|end_of_turn|>Code Assistant:").input_ids
394
+ assert tokens == [1, 7596, 1247, 28747, 26256, 2936, 7653, 1413, 334, 1680, 32000, 7596, 21631, 28747]
395
+ ```
396
 
397
 
398
  ## License