episod commited on
Commit
5c560e1
·
verified ·
1 Parent(s): fd37c60

tokenizer_config: plain continuation chat template (the trained format; no roles)

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +2 -1
tokenizer_config.json CHANGED
@@ -41,5 +41,6 @@
41
  "model_max_length": 1000000000000000019884624838656,
42
  "pad_token": "<pad>",
43
  "tokenizer_class": "PreTrainedTokenizerFast",
44
- "unk_token": "<unk>"
 
45
  }
 
41
  "model_max_length": 1000000000000000019884624838656,
42
  "pad_token": "<pad>",
43
  "tokenizer_class": "PreTrainedTokenizerFast",
44
+ "unk_token": "<unk>",
45
+ "chat_template": "{%- macro flat(c) -%}{%- set f = namespace(o='') -%}{%- for line in (c or '').split('\n') -%}{%- set l = line.rstrip(' \t\r') -%}{%- if l -%}{%- if f.o and not l.startswith(' ') -%}{%- set f.o = f.o + ' ' + l -%}{%- else -%}{%- set f.o = f.o + l -%}{%- endif -%}{%- endif -%}{%- endfor -%}{{- f.o -}}{%- endmacro -%}{%- macro join(a, b) -%}{{- a + b if (not a or not b or b.startswith(' ')) else a + ' ' + b -}}{%- endmacro -%}{%- set msgs = (messages | rejectattr('role', 'equalto', 'system') | list)[-5:] -%}{%- set ns = namespace(out='') -%}{%- for m in msgs -%}{%- set ns.out = join(ns.out, flat(m['content'])) -%}{%- endfor -%}{{ ns.out }}"
46
  }