Add Param-1-2.9B-Instruct updated model files

#4
BharatGen Logo (1).png CHANGED

Git LFS Details

  • SHA256: 2e814348453820c1b99fe33e1875e847af0e6f6390bba1f8e78897742e9bb397
  • Pointer size: 131 Bytes
  • Size of remote file: 145 kB

Git LFS Details

  • SHA256: 19a0090e0679c2b5fab351259c365f0570b3c702fe114be6e5d0a2d97ec2e4c6
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
chat_template.jinja CHANGED
@@ -1,48 +1,63 @@
1
  {%- if tools %}
2
  {{- '<|im_start|>system\n' }}
3
- {%- if messages[0]['role'] == 'system' %}
4
- {{- messages[0]['content'] }}
5
- {%- else %}
6
- {{- 'You are a helpful assistant.' }}
7
  {%- endif %}
8
- {{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
9
  {%- for tool in tools %}
10
  {{- "\n" }}
11
  {{- tool | tojson }}
12
  {%- endfor %}
13
  {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
14
  {%- else %}
15
- {%- if messages[0]['role'] == 'system' %}
16
- {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
17
- {%- else %}
18
- {{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}
19
  {%- endif %}
20
  {%- endif %}
 
 
 
 
 
 
 
 
21
  {%- for message in messages %}
22
- {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
- {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
 
 
 
 
 
24
  {%- elif message.role == "assistant" %}
25
- {{- '<|im_start|>' + message.role }}
26
- {%- if message.content %}
27
- {{- '\n' + message.content }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  {%- endif %}
29
- {%- for tool_call in message.tool_calls %}
30
- {%- if tool_call.function is defined %}
31
- {%- set tool_call = tool_call.function %}
32
- {%- endif %}
33
- {{- '\n<tool_call>\n{"name": "' }}
34
- {{- tool_call.name }}
35
- {{- '", "arguments": ' }}
36
- {{- tool_call.arguments | tojson }}
37
- {{- '}\n</tool_call>' }}
38
- {%- endfor %}
39
  {{- '<|im_end|>\n' }}
40
  {%- elif message.role == "tool" %}
41
- {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
  {{- '<|im_start|>user' }}
43
  {%- endif %}
44
  {{- '\n<tool_response>\n' }}
45
- {{- message.content }}
46
  {{- '\n</tool_response>' }}
47
  {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
  {{- '<|im_end|>\n' }}
@@ -51,4 +66,4 @@
51
  {%- endfor %}
52
  {%- if add_generation_prompt %}
53
  {{- '<|im_start|>assistant\n' }}
54
- {%- endif %}
 
1
  {%- if tools %}
2
  {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
 
 
5
  {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
  {%- for tool in tools %}
8
  {{- "\n" }}
9
  {{- tool | tojson }}
10
  {%- endfor %}
11
  {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
  {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
 
 
15
  {%- endif %}
16
  {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
  {%- for message in messages %}
26
+ {%- if message.content is string %}
27
+ {%- set content = message.content %}
28
+ {%- else %}
29
+ {%- set content = '' %}
30
+ {%- endif %}
31
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
32
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
33
  {%- elif message.role == "assistant" %}
34
+ {{- '<|im_start|>' + message.role + '\n' + content }}
35
+ {%- if message.tool_calls %}
36
+ {%- for tool_call in message.tool_calls %}
37
+ {%- if (loop.first and content) or (not loop.first) %}
38
+ {{- '\n' }}
39
+ {%- endif %}
40
+ {%- if tool_call.function %}
41
+ {%- set tool_call = tool_call.function %}
42
+ {%- endif %}
43
+ {{- '<tool_call>\n{"name": "' }}
44
+ {{- tool_call.name }}
45
+ {{- '", "arguments": ' }}
46
+ {%- if tool_call.arguments is string %}
47
+ {{- tool_call.arguments }}
48
+ {%- else %}
49
+ {{- tool_call.arguments | tojson }}
50
+ {%- endif %}
51
+ {{- '}\n</tool_call>' }}
52
+ {%- endfor %}
53
  {%- endif %}
 
 
 
 
 
 
 
 
 
 
54
  {{- '<|im_end|>\n' }}
55
  {%- elif message.role == "tool" %}
56
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
57
  {{- '<|im_start|>user' }}
58
  {%- endif %}
59
  {{- '\n<tool_response>\n' }}
60
+ {{- content }}
61
  {{- '\n</tool_response>' }}
62
  {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
63
  {{- '<|im_end|>\n' }}
 
66
  {%- endfor %}
67
  {%- if add_generation_prompt %}
68
  {{- '<|im_start|>assistant\n' }}
69
+ {%- endif %}
config.json CHANGED
@@ -15,7 +15,7 @@
15
  "hidden_size": 2048,
16
  "initializer_range": 0.01,
17
  "intermediate_size": 7168,
18
- "max_position_embeddings": 2048,
19
  "mlp_bias": false,
20
  "num_attention_heads": 16,
21
  "num_hidden_layers": 32,
@@ -28,5 +28,5 @@
28
  "tie_word_embeddings": false,
29
  "transformers_version": "4.56.2",
30
  "use_cache": false,
31
- "vocab_size": 256003
32
  }
 
15
  "hidden_size": 2048,
16
  "initializer_range": 0.01,
17
  "intermediate_size": 7168,
18
+ "max_position_embeddings": 8192,
19
  "mlp_bias": false,
20
  "num_attention_heads": 16,
21
  "num_hidden_layers": 32,
 
28
  "tie_word_embeddings": false,
29
  "transformers_version": "4.56.2",
30
  "use_cache": false,
31
+ "vocab_size": 256011
32
  }
generation_config.json CHANGED
@@ -2,8 +2,9 @@
2
  "_from_model_config": true,
3
  "bos_token_id": 2,
4
  "eos_token_id": [
5
- 256001
 
6
  ],
7
  "pad_token_id": 256002,
8
- "transformers_version": "4.56.2"
9
  }
 
2
  "_from_model_config": true,
3
  "bos_token_id": 2,
4
  "eos_token_id": [
5
+ 256001,
6
+ 3
7
  ],
8
  "pad_token_id": 256002,
9
+ "transformers_version": "4.57.3"
10
  }
model-00001-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:225e066900a353dcbf49e425ee60224c71592c5e225854d762793710138f8bb1
3
- size 4672766864
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ea3ab8d2ae32d4994ba57ca4bae353cf60366a1cf7c1305c37b7419870ab265
3
+ size 4672799632
model-00002-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c1fa6b49fc230622323a25164055c1392e969d788366185fed80a94eaf58c02d
3
- size 1048588416
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c94148b4526fd79a3003ec3cbb4c8fe7321562a0c31cb7f20c90ca00ed8d00c
3
+ size 1048621184
model.safetensors.index.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "metadata": {
3
- "total_parameters": 2860660736,
4
- "total_size": 5721321472
5
  },
6
  "weight_map": {
7
  "lm_head.weight": "model-00002-of-00002.safetensors",
 
1
  {
2
  "metadata": {
3
+ "total_parameters": 2860693504,
4
+ "total_size": 5721387008
5
  },
6
  "weight_map": {
7
  "lm_head.weight": "model-00002-of-00002.safetensors",
special_tokens_map.json CHANGED
@@ -18,7 +18,7 @@
18
  "single_word": false
19
  },
20
  "pad_token": {
21
- "content": "<|pad|>",
22
  "lstrip": false,
23
  "normalized": false,
24
  "rstrip": false,
 
18
  "single_word": false
19
  },
20
  "pad_token": {
21
+ "content": "<|endoftext|>",
22
  "lstrip": false,
23
  "normalized": false,
24
  "rstrip": false,
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8dea7fd45c7ee50c09c1559d1e030f9c964b245a279734eac789a9d362706c2a
3
- size 34810270
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08ab3607c8b417b8273334a977047ec5f0888b71a12af9e41fddcb11558bf575
3
+ size 34811776
tokenizer_config.json CHANGED
@@ -8041,12 +8041,76 @@
8041
  "special": true
8042
  },
8043
  "256002": {
8044
- "content": "<|pad|>",
8045
  "lstrip": false,
8046
  "normalized": false,
8047
  "rstrip": false,
8048
  "single_word": false,
8049
  "special": true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8050
  }
8051
  },
8052
  "additional_special_tokens": [
@@ -8062,6 +8126,6 @@
8062
  "attention_mask"
8063
  ],
8064
  "model_max_length": 1000000000000000019884624838656,
8065
- "pad_token": "<|pad|>",
8066
  "tokenizer_class": "PreTrainedTokenizerFast"
8067
  }
 
8041
  "special": true
8042
  },
8043
  "256002": {
8044
+ "content": "<|endoftext|>",
8045
  "lstrip": false,
8046
  "normalized": false,
8047
  "rstrip": false,
8048
  "single_word": false,
8049
  "special": true
8050
+ },
8051
+ "256003": {
8052
+ "content": "<think>",
8053
+ "lstrip": false,
8054
+ "normalized": true,
8055
+ "rstrip": false,
8056
+ "single_word": false,
8057
+ "special": false
8058
+ },
8059
+ "256004": {
8060
+ "content": "</think>",
8061
+ "lstrip": false,
8062
+ "normalized": true,
8063
+ "rstrip": false,
8064
+ "single_word": false,
8065
+ "special": false
8066
+ },
8067
+ "256005": {
8068
+ "content": "<tools>",
8069
+ "lstrip": false,
8070
+ "normalized": true,
8071
+ "rstrip": false,
8072
+ "single_word": false,
8073
+ "special": false
8074
+ },
8075
+ "256006": {
8076
+ "content": "</tools>",
8077
+ "lstrip": false,
8078
+ "normalized": true,
8079
+ "rstrip": false,
8080
+ "single_word": false,
8081
+ "special": false
8082
+ },
8083
+ "256007": {
8084
+ "content": "<tool_call>",
8085
+ "lstrip": false,
8086
+ "normalized": true,
8087
+ "rstrip": false,
8088
+ "single_word": false,
8089
+ "special": false
8090
+ },
8091
+ "256008": {
8092
+ "content": "</tool_call>",
8093
+ "lstrip": false,
8094
+ "normalized": true,
8095
+ "rstrip": false,
8096
+ "single_word": false,
8097
+ "special": false
8098
+ },
8099
+ "256009": {
8100
+ "content": "<tool_response>",
8101
+ "lstrip": false,
8102
+ "normalized": true,
8103
+ "rstrip": false,
8104
+ "single_word": false,
8105
+ "special": false
8106
+ },
8107
+ "256010": {
8108
+ "content": "</tool_response>",
8109
+ "lstrip": false,
8110
+ "normalized": true,
8111
+ "rstrip": false,
8112
+ "single_word": false,
8113
+ "special": false
8114
  }
8115
  },
8116
  "additional_special_tokens": [
 
8126
  "attention_mask"
8127
  ],
8128
  "model_max_length": 1000000000000000019884624838656,
8129
+ "pad_token": "<|endoftext|>",
8130
  "tokenizer_class": "PreTrainedTokenizerFast"
8131
  }