test-LFM2-350M / tokenizer_config.json
madoss's picture
(Trained with Unsloth)
fc9d145 verified
{
"backend": "tokenizers",
"bos_token": "<|startoftext|>",
"clean_up_tokenization_spaces": true,
"eos_token": "<|im_end|>",
"is_local": false,
"legacy": false,
"model_input_names": [
"input_ids",
"attention_mask"
],
"model_max_length": 1000000000000000019884624838656,
"pad_token": "<|pad|>",
"padding_side": "left",
"sp_model_kwargs": {},
"spaces_between_special_tokens": false,
"tokenizer_class": "TokenizersBackend",
"use_default_system_prompt": false,
"use_fast": true,
"chat_template": "{{- bos_token -}}\n{%- set system_prompt = \"\" -%}\n{%- set ns = namespace(system_prompt=\"\") -%}\n{%- if messages[0][\"role\"] == \"system\" -%}\n\t{%- set ns.system_prompt = messages[0][\"content\"] -%}\n\t{%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n\t{%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: <|tool_list_start|>[\" -%}\n\t{%- for tool in tools -%}\n\t\t{%- if tool is not string -%}\n {%- set tool = tool | tojson -%}\n\t\t{%- endif -%}\n\t\t{%- set ns.system_prompt = ns.system_prompt + tool -%}\n {%- if not loop.last -%}\n {%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n {%- endif -%}\n\t{%- endfor -%}\n\t{%- set ns.system_prompt = ns.system_prompt + \"]<|tool_list_end|>\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n\t{{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n\t{{- \"<|im_start|>\" + message[\"role\"] + \"\\n\" -}}\n\t{%- set content = message[\"content\"] -%}\n\t{%- if content is not string -%}\n\t\t{%- set content = content | tojson -%}\n\t{%- endif -%}\n\t{%- if message[\"role\"] == \"tool\" -%}\n\t\t{%- set content = \"<|tool_response_start|>\" + content + \"<|tool_response_end|>\" -%}\n\t{%- endif -%}\n\t{{- content + \"<|im_end|>\\n\" -}}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n\t{{- \"<|im_start|>assistant\\n\" -}}\n{%- endif -%}"
}