Lissa-1.5B-Instruct / tokenizer_config.json
CastIronMind's picture
Add files using upload-large-folder tool
16de7bc verified
Raw History Blame Contribute Delete
2.72 kB
{
"add_bos_token": false,
"add_eos_token": false,
"bos_token": "<bos>",
"eos_token": "<eos>",
"pad_token": "<eos>",
"unk_token": null,
"clean_up_tokenization_spaces": false,
"model_max_length": 16384,
"tokenizer_class": "PreTrainedTokenizerFast",
"chat_template": "{#-\n Lissa 1.5B - chat template (ChatML variant with a reasoning block).\n\n Canonical sequence, as used for the SFT run:\n\n <bos><im_start><system>{system}<im_end>\n <im_start><user>{user}<im_end>\n <im_start><assistant>[<|think|>{think}<|/think|>]{answer}<im_end><eos>\n\n Notes:\n\n * <bos> is emitted by this template. The shipped tokenizer.json has a ByteLevel\n post-processor, not a TemplateProcessing one, so no BOS is added automatically\n and add_special_tokens has no effect on it.\n\n * <eos> is emitted only when the conversation ends on an assistant turn, i.e. when\n the rendered text is a complete training sequence. With add_generation_prompt=True\n it is not emitted, so the model generates the assistant turn itself.\n\n * The <|think|> block is optional and is read from the `reasoning_content` field of\n an assistant message (the `think` field is accepted as an alias). The model is\n reasoning-first: it opens the block on its own, so it does not need to be\n prefilled at generation time.\n\n * <en>, <ru>, </en>, </ru> and <endofprompt> are never emitted. They exist in the\n vocabulary but were removed from the supervised data.\n\n * A non-empty system message is required. The model was supervised with one on every\n example; \"You are a helpful assistant.\" specifically should not be used, it pulls\n the model towards a generic assistant identity.\n-#}\n{{- '<bos>' -}}\n{%- for message in messages -%}\n {%- set content = message['content'] if message['content'] is not none else '' -%}\n {%- if message['role'] == 'system' -%}\n {{- '<im_start><system>' + content + '<im_end>' -}}\n {%- elif message['role'] == 'user' -%}\n {{- '<im_start><user>' + content + '<im_end>' -}}\n {%- elif message['role'] == 'assistant' -%}\n {%- set think = message.get('reasoning_content') or message.get('think') -%}\n {{- '<im_start><assistant>' -}}\n {%- if think -%}\n {{- '<|think|>' + think + '<|/think|>' -}}\n {%- endif -%}\n {{- content + '<im_end>' -}}\n {%- else -%}\n {{- raise_exception('Lissa chat template: unexpected role \"' + message['role'] + '\"') -}}\n {%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{- '<im_start><assistant>' -}}\n{%- elif messages and messages[-1]['role'] == 'assistant' -%}\n {{- '<eos>' -}}\n{%- endif -%}\n"
}