karakuri-lm-7b-apm-v0.2 / tokenizer_config.json
ynakashima's picture
Upload tokenizer
4f0daec verified
{
"add_bos_token": true,
"add_eos_token": false,
"added_tokens_decoder": {
"0": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"1": {
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"2": {
"content": "</s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
}
},
"additional_special_tokens": [],
"bos_token": "<s>",
"chat_template": "{{ bos_token }}{% if label|lower == 'helpsteer' %}{% set attr = 'ATTR_1' %}{% elif label|lower == 'oasst' %}{% set attr = 'ATTR_2' %}{% else %}{{ raise_exception('Labels other than helpsteer and oasst not supported.') }}{% endif %}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 3 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/label/user/assistant/label/...') }}{% endif %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content.strip() }}{% elif message['role'] == 'label' %}{{ ' [' + attr + '] ' + content.strip() + ' [/' + attr + ']' + eos_token }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ ' [' + attr + ']' }}{% endif %}",
"clean_up_tokenization_spaces": false,
"eos_token": "</s>",
"model_max_length": 1000000000000000019884624838656,
"pad_token": null,
"sp_model_kwargs": {},
"spaces_between_special_tokens": false,
"tokenizer_class": "LlamaTokenizer",
"unk_token": "<unk>",
"use_default_system_prompt": false
}