{ "add_bos_token": true, "add_eos_token": false, "added_tokens_decoder": { "0": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [], "bos_token": "", "chat_template": "{% if messages[0]['role'] == 'system' %}{% if messages[1]['role'] == 'user' %}{% set sequence_start = 'user' %}{% elif messages[1]['role'] == 'assistant' %}{% set sequence_start = 'assistant' %}{% else %}{{ raise_exception('Second message must be either user or assistant after system') }}{% endif %}{% else %}{{ raise_exception('First message must be from system') }}{% endif %}{{ bos_token }}{% for message in messages %}{% if sequence_start == 'user' %}{% if (message['role'] == 'user') != ((loop.index0) % 2 == 1) %}{{ raise_exception('Conversation roles must alternate starting with user after system') }}{% endif %}{% elif sequence_start == 'assistant' %}{% if (message['role'] == 'assistant') != ((loop.index0) % 2 == 1) %}{{ raise_exception('Conversation roles must alternate starting with assistant after system') }}{% endif %}{% endif %}{% if message['role'] == 'system' %}{{ '[INST] <>' + message['content'].strip() + '<>' }}{% elif message['role'] == 'user' %}{{ '[INST] ' + message['content'].strip() + ' [/INST] ' }}{% elif message['role'] == 'assistant' %}{{ message['content'].strip() + eos_token}}{% else %}{{ raise_exception('Only system, user, and assistant roles are supported!') }}{% endif %}{% endfor %}", "clean_up_tokenization_spaces": false, "eos_token": "", "legacy": true, "model_max_length": 1000000000000000019884624838656, "pad_token": null, "sp_model_kwargs": {}, "spaces_between_special_tokens": false, "tokenizer_class": "LlamaTokenizer", "unk_token": "", "use_default_system_prompt": false }