File size: 1,349 Bytes
02ccab2
 
 
 
 
 
 
 
 
 
 
 
e698fdb
 
02ccab2
e698fdb
02ccab2
e698fdb
02ccab2
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "add_prefix_space": false,
  "added_tokens_decoder": {
    "0": {
      "content": "<|endoftext|>",
      "lstrip": false,
      "normalized": false,
      "rstrip": false,
      "single_word": false,
      "special": true
    }
  },
  "bos_token": "<|endoftext|>",
  "chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{{ system_message }}{% else %}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% elif (message['role'] == 'assistant') != (loop.index0 % 2 == 1) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{'\n\n' + 'Human: ' + message['content']}}{% elif message['role'] == 'assistant' %}{{'\n\n' + 'Assistant: ' + message['content']}}{% endif %}{% endfor %}{% if add_generation_prompt and messages[-1]['role'] == 'user' %}{{ '\n\n' + 'Assistant:' }}{% endif %}",
  "clean_up_tokenization_spaces": true,
  "eos_token": "<|endoftext|>",
  "model_max_length": 1024,
  "pad_token": "<|endoftext|>",
  "tokenizer_class": "GPT2Tokenizer",
  "unk_token": "<|endoftext|>"
}