Text Generation
Transformers
PyTorch
Safetensors
Japanese
English
qwen
custom_code
nekomata-14b-instruction / tokenizer_config.json
torotoki's picture
Add chat template
2e5d201 verified
raw
history blame
944 Bytes
{
"model_max_length": 32768,
"tokenizer_class": "QWenTokenizer",
"auto_map": {
"AutoTokenizer": [
"tokenization_qwen.QWenTokenizer",
null
]
},
"bos_token": "<|endoftext|>",
"eos_token": "<|endoftext|>",
"pad_token": "<|extra_204|>",
"chat_template": "{{ bos_token }}{{ '以下は、タスクを説明する指示と、文脈のある入力の組み合わせです。要求を適切に満たす応答を書きなさい。\n\n' }}{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] + '\n\n' }}{% set messages = messages[1:] %}{% endif %}{% for message in messages %}{% if message['role'] == 'user' %}{{ '### 指示:\n' + message['content'] + '\n\n' }}{% elif message['role'] == 'assistant' %}{{ '### 応答:\n' + message['content'] + eos_token }}{% if not loop.last %}{{ '\n\n' }}{% endif %}{% endif %}{% if loop.last and add_generation_prompt %}{{ '### 応答:\n' }}{% endif %}{% endfor %}"
}