helenai commited on
Commit
ed672a7
·
verified ·
1 Parent(s): 6a5b0de

Upload folder using huggingface_hub

Browse files
chat_template.jinja CHANGED
@@ -1,37 +1,37 @@
1
- {{- bos_token -}}
2
- {%- set system_prompt = "" -%}
3
- {%- set ns = namespace(system_prompt="") -%}
4
- {%- if messages[0]["role"] == "system" -%}
5
- {%- set ns.system_prompt = messages[0]["content"] -%}
6
- {%- set messages = messages[1:] -%}
7
- {%- endif -%}
8
- {%- if tools -%}
9
- {%- set ns.system_prompt = ns.system_prompt + ("\n" if ns.system_prompt else "") + "List of tools: <|tool_list_start|>[" -%}
10
- {%- for tool in tools -%}
11
- {%- if tool is not string -%}
12
- {%- set tool = tool | tojson -%}
13
- {%- endif -%}
14
- {%- set ns.system_prompt = ns.system_prompt + tool -%}
15
- {%- if not loop.last -%}
16
- {%- set ns.system_prompt = ns.system_prompt + ", " -%}
17
- {%- endif -%}
18
- {%- endfor -%}
19
- {%- set ns.system_prompt = ns.system_prompt + "]<|tool_list_end|>" -%}
20
- {%- endif -%}
21
- {%- if ns.system_prompt -%}
22
- {{- "<|im_start|>system\n" + ns.system_prompt + "<|im_end|>\n" -}}
23
- {%- endif -%}
24
- {%- for message in messages -%}
25
- {{- "<|im_start|>" + message["role"] + "\n" -}}
26
- {%- set content = message["content"] -%}
27
- {%- if content is not string -%}
28
- {%- set content = content | tojson -%}
29
- {%- endif -%}
30
- {%- if message["role"] == "tool" -%}
31
- {%- set content = "<|tool_response_start|>" + content + "<|tool_response_end|>" -%}
32
- {%- endif -%}
33
- {{- content + "<|im_end|>\n" -}}
34
- {%- endfor -%}
35
- {%- if add_generation_prompt -%}
36
- {{- "<|im_start|>assistant\n" -}}
37
  {%- endif -%}
 
1
+ {{- bos_token -}}
2
+ {%- set system_prompt = "" -%}
3
+ {%- set ns = namespace(system_prompt="") -%}
4
+ {%- if messages[0]["role"] == "system" -%}
5
+ {%- set ns.system_prompt = messages[0]["content"] -%}
6
+ {%- set messages = messages[1:] -%}
7
+ {%- endif -%}
8
+ {%- if tools -%}
9
+ {%- set ns.system_prompt = ns.system_prompt + ("\n" if ns.system_prompt else "") + "List of tools: <|tool_list_start|>[" -%}
10
+ {%- for tool in tools -%}
11
+ {%- if tool is not string -%}
12
+ {%- set tool = tool | tojson -%}
13
+ {%- endif -%}
14
+ {%- set ns.system_prompt = ns.system_prompt + tool -%}
15
+ {%- if not loop.last -%}
16
+ {%- set ns.system_prompt = ns.system_prompt + ", " -%}
17
+ {%- endif -%}
18
+ {%- endfor -%}
19
+ {%- set ns.system_prompt = ns.system_prompt + "]<|tool_list_end|>" -%}
20
+ {%- endif -%}
21
+ {%- if ns.system_prompt -%}
22
+ {{- "<|im_start|>system\n" + ns.system_prompt + "<|im_end|>\n" -}}
23
+ {%- endif -%}
24
+ {%- for message in messages -%}
25
+ {{- "<|im_start|>" + message["role"] + "\n" -}}
26
+ {%- set content = message["content"] -%}
27
+ {%- if content is not string -%}
28
+ {%- set content = content | tojson -%}
29
+ {%- endif -%}
30
+ {%- if message["role"] == "tool" -%}
31
+ {%- set content = "<|tool_response_start|>" + content + "<|tool_response_end|>" -%}
32
+ {%- endif -%}
33
+ {{- content + "<|im_end|>\n" -}}
34
+ {%- endfor -%}
35
+ {%- if add_generation_prompt -%}
36
+ {{- "<|im_start|>assistant\n" -}}
37
  {%- endif -%}
config.json CHANGED
@@ -1,49 +1,49 @@
1
- {
2
- "architectures": [
3
- "Lfm2ForCausalLM"
4
- ],
5
- "block_auto_adjust_ff_dim": true,
6
- "block_dim": 1024,
7
- "block_ff_dim": 6656,
8
- "block_ffn_dim_multiplier": 1.0,
9
- "block_mlp_init_scale": 1.0,
10
- "block_multiple_of": 8,
11
- "block_norm_eps": 1e-05,
12
- "block_out_init_scale": 1.0,
13
- "block_use_swiglu": true,
14
- "block_use_xavier_init": true,
15
- "bos_token_id": 1,
16
- "conv_L_cache": 3,
17
- "conv_bias": false,
18
- "conv_dim": 1024,
19
- "conv_dim_out": 1024,
20
- "conv_use_xavier_init": true,
21
- "dtype": "bfloat16",
22
- "eos_token_id": 7,
23
- "hidden_size": 16,
24
- "initializer_range": 0.02,
25
- "intermediate_size": 6656,
26
- "layer_types": [
27
- "conv",
28
- "conv",
29
- "full_attention",
30
- "conv"
31
- ],
32
- "max_position_embeddings": 128000,
33
- "model_type": "lfm2",
34
- "norm_eps": 1e-05,
35
- "num_attention_heads": 4,
36
- "num_heads": 16,
37
- "num_hidden_layers": 4,
38
- "num_key_value_heads": 4,
39
- "pad_token_id": 0,
40
- "rope_parameters": {
41
- "rope_theta": 1000000.0,
42
- "rope_type": "default"
43
- },
44
- "tie_word_embeddings": true,
45
- "transformers_version": "5.0.0",
46
- "use_cache": true,
47
- "use_pos_enc": true,
48
- "vocab_size": 65536
49
- }
 
1
+ {
2
+ "architectures": [
3
+ "Lfm2ForCausalLM"
4
+ ],
5
+ "block_auto_adjust_ff_dim": true,
6
+ "block_dim": 1024,
7
+ "block_ff_dim": 6656,
8
+ "block_ffn_dim_multiplier": 1.0,
9
+ "block_mlp_init_scale": 1.0,
10
+ "block_multiple_of": 8,
11
+ "block_norm_eps": 1e-05,
12
+ "block_out_init_scale": 1.0,
13
+ "block_use_swiglu": true,
14
+ "block_use_xavier_init": true,
15
+ "bos_token_id": 1,
16
+ "conv_L_cache": 3,
17
+ "conv_bias": false,
18
+ "conv_dim": 1024,
19
+ "conv_dim_out": 1024,
20
+ "conv_use_xavier_init": true,
21
+ "dtype": "bfloat16",
22
+ "eos_token_id": 7,
23
+ "hidden_size": 16,
24
+ "initializer_range": 0.02,
25
+ "intermediate_size": 6656,
26
+ "layer_types": [
27
+ "conv",
28
+ "conv",
29
+ "full_attention",
30
+ "conv"
31
+ ],
32
+ "max_position_embeddings": 128000,
33
+ "model_type": "lfm2",
34
+ "norm_eps": 1e-05,
35
+ "num_attention_heads": 4,
36
+ "num_heads": 16,
37
+ "num_hidden_layers": 4,
38
+ "num_key_value_heads": 4,
39
+ "pad_token_id": 0,
40
+ "rope_parameters": {
41
+ "rope_theta": 1000000.0,
42
+ "rope_type": "default"
43
+ },
44
+ "tie_word_embeddings": true,
45
+ "transformers_version": "5.0.0",
46
+ "use_cache": true,
47
+ "use_pos_enc": true,
48
+ "vocab_size": 65536
49
+ }
generation_config.json CHANGED
@@ -1,10 +1,10 @@
1
- {
2
- "_from_model_config": true,
3
- "bos_token_id": 1,
4
- "eos_token_id": 7,
5
- "output_attentions": false,
6
- "output_hidden_states": false,
7
- "pad_token_id": 0,
8
- "transformers_version": "5.0.0",
9
- "use_cache": true
10
- }
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 7,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 0,
8
+ "transformers_version": "5.0.0",
9
+ "use_cache": true
10
+ }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7479099bc1b24455010c6852154200ffdce745855f84d37cd710a2e5209af00d
3
  size 3814776
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26800c96e1a2052965c82be6caeccf2b875ad685cc2acd0457cfe63aeba92916
3
  size 3814776
tokenizer_config.json CHANGED
@@ -1,20 +1,20 @@
1
- {
2
- "backend": "tokenizers",
3
- "bos_token": "<|startoftext|>",
4
- "clean_up_tokenization_spaces": true,
5
- "eos_token": "<|im_end|>",
6
- "is_local": false,
7
- "legacy": false,
8
- "model_input_names": [
9
- "input_ids",
10
- "attention_mask"
11
- ],
12
- "model_max_length": 1000000000000000019884624838656,
13
- "model_specific_special_tokens": {},
14
- "pad_token": "<|pad|>",
15
- "sp_model_kwargs": {},
16
- "spaces_between_special_tokens": false,
17
- "tokenizer_class": "TokenizersBackend",
18
- "use_default_system_prompt": false,
19
- "use_fast": true
20
- }
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|startoftext|>",
4
+ "clean_up_tokenization_spaces": true,
5
+ "eos_token": "<|im_end|>",
6
+ "is_local": false,
7
+ "legacy": false,
8
+ "model_input_names": [
9
+ "input_ids",
10
+ "attention_mask"
11
+ ],
12
+ "model_max_length": 1000000000000000019884624838656,
13
+ "model_specific_special_tokens": {},
14
+ "pad_token": "<|pad|>",
15
+ "sp_model_kwargs": {},
16
+ "spaces_between_special_tokens": false,
17
+ "tokenizer_class": "TokenizersBackend",
18
+ "use_default_system_prompt": false,
19
+ "use_fast": true
20
+ }