karakuri-lm-7b-apm-v0.1 / tokenizer_config.json
ynakashima's picture
Update tokenizer_config.json
b6bc539 verified
raw
history blame
2.05 kB
{
"add_bos_token": true,
"add_eos_token": false,
"added_tokens_decoder": {
"0": {
"content": "<pad>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"1": {
"content": "<eos>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"2": {
"content": "<bos>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"3": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
}
},
"bos_token": "<bos>",
"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": "<eos>",
"legacy": null,
"model_max_length": 1000000000000000019884624838656,
"pad_token": "<pad>",
"sp_model_kwargs": {},
"spaces_between_special_tokens": false,
"tokenizer_class": "GemmaTokenizer",
"unk_token": "<unk>",
"use_default_system_prompt": false
}