winglian commited on
Commit
3e8d1b9
1 Parent(s): 88d4858

fix cache and support chatml

Browse files
Files changed (2) hide show
  1. config.json +2 -2
  2. tokenizer_config.json +4 -4
config.json CHANGED
@@ -4,7 +4,7 @@
4
  "MistralForCausalLM"
5
  ],
6
  "bos_token_id": 1,
7
- "eos_token_id": 2,
8
  "hidden_act": "silu",
9
  "hidden_size": 4096,
10
  "initializer_range": 0.02,
@@ -20,6 +20,6 @@
20
  "tie_word_embeddings": false,
21
  "torch_dtype": "bfloat16",
22
  "transformers_version": "4.34.0.dev0",
23
- "use_cache": false,
24
  "vocab_size": 32002
25
  }
 
4
  "MistralForCausalLM"
5
  ],
6
  "bos_token_id": 1,
7
+ "eos_token_id": 32000,
8
  "hidden_act": "silu",
9
  "hidden_size": 4096,
10
  "initializer_range": 0.02,
 
20
  "tie_word_embeddings": false,
21
  "torch_dtype": "bfloat16",
22
  "transformers_version": "4.34.0.dev0",
23
+ "use_cache": true,
24
  "vocab_size": 32002
25
  }
tokenizer_config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "add_bos_token": true,
3
  "add_eos_token": false,
4
  "added_tokens_decoder": {
5
  "0": {
@@ -40,20 +40,20 @@
40
  "normalized": false,
41
  "rstrip": false,
42
  "single_word": false,
43
- "special": false
44
  }
45
  },
46
  "additional_special_tokens": [],
47
  "bos_token": "<s>",
 
48
  "clean_up_tokenization_spaces": false,
49
- "eos_token": "</s>",
50
  "legacy": true,
51
  "model_max_length": 1000000000000000019884624838656,
52
  "pad_token": null,
53
  "sp_model_kwargs": {},
54
  "spaces_between_special_tokens": false,
55
  "tokenizer_class": "LlamaTokenizer",
56
- "tokenizer_file": "/workspace/data/huggingface-cache/hub/models--mistralai--Mistral-7B-v0.1/snapshots/5e9c98b96d071dce59368012254c55b0ec6f8658/tokenizer.json",
57
  "trust_remote_code": false,
58
  "unk_token": "<unk>",
59
  "use_default_system_prompt": true,
 
1
  {
2
+ "add_bos_token": false,
3
  "add_eos_token": false,
4
  "added_tokens_decoder": {
5
  "0": {
 
40
  "normalized": false,
41
  "rstrip": false,
42
  "single_word": false,
43
+ "special": true
44
  }
45
  },
46
  "additional_special_tokens": [],
47
  "bos_token": "<s>",
48
+ "chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
49
  "clean_up_tokenization_spaces": false,
50
+ "eos_token": "<|im_end|>",
51
  "legacy": true,
52
  "model_max_length": 1000000000000000019884624838656,
53
  "pad_token": null,
54
  "sp_model_kwargs": {},
55
  "spaces_between_special_tokens": false,
56
  "tokenizer_class": "LlamaTokenizer",
 
57
  "trust_remote_code": false,
58
  "unk_token": "<unk>",
59
  "use_default_system_prompt": true,