yasserrmd commited on
Commit
d00c426
·
verified ·
1 Parent(s): cc16180

Upload merged model and tokenizer

Browse files
chat_template.jinja CHANGED
@@ -1,4 +1,37 @@
1
- {{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '
2
- ' + message['content'] + '<|im_end|>' + '
3
- '}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
4
- ' }}{% 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,59 +1,57 @@
1
  {
2
- "architectures": [
3
- "Lfm2ForCausalLM"
4
- ],
5
- "block_auto_adjust_ff_dim": true,
6
- "block_dim": 1536,
7
- "block_ff_dim": 10240,
8
- "block_ffn_dim_multiplier": 1.0,
9
- "block_mlp_init_scale": 1.0,
10
- "block_multiple_of": 256,
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": 1536,
19
- "conv_dim_out": 1536,
20
- "conv_use_xavier_init": true,
21
- "eos_token_id": 7,
22
- "hidden_size": 1536,
23
- "initializer_range": 0.02,
24
- "intermediate_size": 10240,
25
- "layer_types": [
26
- "conv",
27
- "conv",
28
- "full_attention",
29
- "conv",
30
- "conv",
31
- "full_attention",
32
- "conv",
33
- "conv",
34
- "full_attention",
35
- "conv",
36
- "full_attention",
37
- "conv",
38
- "full_attention",
39
- "conv",
40
- "full_attention",
41
- "conv"
42
- ],
43
- "max_position_embeddings": 32768,
44
- "model_type": "lfm2",
45
- "norm_eps": 1e-05,
46
- "num_attention_heads": 24,
47
- "num_heads": 24,
48
- "num_hidden_layers": 16,
49
- "num_key_value_heads": 8,
50
- "pad_token_id": 0,
51
- "rope_theta": 1000000.0,
52
- "torch_dtype": "float16",
53
- "transformers_version": "4.56.0.dev0",
54
- "unsloth_fixed": true,
55
- "unsloth_version": "2025.8.9",
56
- "use_cache": true,
57
- "use_pos_enc": true,
58
- "vocab_size": 65536
59
- }
 
1
  {
2
+ "architectures": [
3
+ "Lfm2ForCausalLM"
4
+ ],
5
+ "block_auto_adjust_ff_dim": true,
6
+ "block_dim": 1536,
7
+ "block_ff_dim": 10240,
8
+ "block_ffn_dim_multiplier": 1.0,
9
+ "block_mlp_init_scale": 1.0,
10
+ "block_multiple_of": 256,
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": 1536,
19
+ "conv_dim_out": 1536,
20
+ "conv_use_xavier_init": true,
21
+ "eos_token_id": 7,
22
+ "hidden_size": 1536,
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 10240,
25
+ "layer_types": [
26
+ "conv",
27
+ "conv",
28
+ "full_attention",
29
+ "conv",
30
+ "conv",
31
+ "full_attention",
32
+ "conv",
33
+ "conv",
34
+ "full_attention",
35
+ "conv",
36
+ "full_attention",
37
+ "conv",
38
+ "full_attention",
39
+ "conv",
40
+ "full_attention",
41
+ "conv"
42
+ ],
43
+ "max_position_embeddings": 128000,
44
+ "model_type": "lfm2",
45
+ "norm_eps": 1e-05,
46
+ "num_attention_heads": 24,
47
+ "num_heads": 24,
48
+ "num_hidden_layers": 16,
49
+ "num_key_value_heads": 8,
50
+ "pad_token_id": 0,
51
+ "rope_theta": 1000000.0,
52
+ "torch_dtype": "bfloat16",
53
+ "transformers_version": "4.56.0.dev0",
54
+ "use_cache": true,
55
+ "use_pos_enc": true,
56
+ "vocab_size": 65536
57
+ }
 
 
generation_config.json CHANGED
@@ -1,10 +1,7 @@
1
  {
2
  "_from_model_config": true,
3
  "bos_token_id": 1,
4
- "eos_token_id": [
5
- 7
6
- ],
7
- "max_length": 32768,
8
  "pad_token_id": 0,
9
  "transformers_version": "4.56.0.dev0"
10
  }
 
1
  {
2
  "_from_model_config": true,
3
  "bos_token_id": 1,
4
+ "eos_token_id": 7,
 
 
 
5
  "pad_token_id": 0,
6
  "transformers_version": "4.56.0.dev0"
7
  }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b587caa19bb77cfb9d5ca99c17a0ec883dab378b53270735566e388302bcfc83
3
+ size 1484995328
tokenizer_config.json CHANGED
@@ -4064,13 +4064,15 @@
4064
  "eos_token": "<|im_end|>",
4065
  "extra_special_tokens": {},
4066
  "legacy": false,
4067
- "model_max_length": 32768,
 
 
 
 
4068
  "pad_token": "<|pad|>",
4069
- "padding_side": "right",
4070
  "sp_model_kwargs": {},
4071
  "spaces_between_special_tokens": false,
4072
  "tokenizer_class": "PreTrainedTokenizerFast",
4073
- "unk_token": null,
4074
  "use_default_system_prompt": false,
4075
  "use_fast": true
4076
  }
 
4064
  "eos_token": "<|im_end|>",
4065
  "extra_special_tokens": {},
4066
  "legacy": false,
4067
+ "model_input_names": [
4068
+ "input_ids",
4069
+ "attention_mask"
4070
+ ],
4071
+ "model_max_length": 1000000000000000019884624838656,
4072
  "pad_token": "<|pad|>",
 
4073
  "sp_model_kwargs": {},
4074
  "spaces_between_special_tokens": false,
4075
  "tokenizer_class": "PreTrainedTokenizerFast",
 
4076
  "use_default_system_prompt": false,
4077
  "use_fast": true
4078
  }