Add chat template
#3
by
torotoki
- opened
- tokenizer_config.json +2 -1
tokenizer_config.json
CHANGED
@@ -9,5 +9,6 @@
|
|
9 |
},
|
10 |
"bos_token": "<|endoftext|>",
|
11 |
"eos_token": "<|endoftext|>",
|
12 |
-
"pad_token": "<|extra_204|>"
|
|
|
13 |
}
|
|
|
9 |
},
|
10 |
"bos_token": "<|endoftext|>",
|
11 |
"eos_token": "<|endoftext|>",
|
12 |
+
"pad_token": "<|extra_204|>",
|
13 |
+
"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 %}"
|
14 |
}
|