zeeshaan-ai commited on
Commit
18a5faf
·
verified ·
1 Parent(s): 061f148

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -36,3 +36,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
36
  onnx/model.onnx_data filter=lfs diff=lfs merge=lfs -text
37
  onnx/model_fp16.onnx_data filter=lfs diff=lfs merge=lfs -text
38
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
 
36
  onnx/model.onnx_data filter=lfs diff=lfs merge=lfs -text
37
  onnx/model_fp16.onnx_data filter=lfs diff=lfs merge=lfs -text
38
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
39
+ new_quants/model.onnx.data filter=lfs diff=lfs merge=lfs -text
40
+ new_quants/model_fp16.onnx_data filter=lfs diff=lfs merge=lfs -text
chat_template.jinja ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- bos_token }}
2
+ {%- if custom_tools is defined %}
3
+ {%- set tools = custom_tools %}
4
+ {%- endif %}
5
+ {%- if not tools_in_user_message is defined %}
6
+ {%- set tools_in_user_message = true %}
7
+ {%- endif %}
8
+ {%- if not date_string is defined %}
9
+ {%- set date_string = "26 July 2024" %}
10
+ {%- endif %}
11
+ {%- if not tools is defined %}
12
+ {%- set tools = none %}
13
+ {%- endif %}
14
+
15
+ {#- This block extracts the system message, so we can slot it into the right place. #}
16
+ {%- if messages[0]['role'] == 'system' %}
17
+ {%- set system_message = messages[0]['content'] %}
18
+ {%- set messages = messages[1:] %}
19
+ {%- else %}
20
+ {%- set system_message = "" %}
21
+ {%- endif %}
22
+
23
+ {#- System message + builtin tools #}
24
+ {{- "<|start_header_id|>system<|end_header_id|>
25
+
26
+ " }}
27
+ {%- if builtin_tools is defined or tools is not none %}
28
+ {{- "Environment: ipython
29
+ " }}
30
+ {%- endif %}
31
+ {%- if builtin_tools is defined %}
32
+ {{- "Tools: " + builtin_tools | reject('equalto', 'code_interpreter') | join(", ") + "
33
+
34
+ "}}
35
+ {%- endif %}
36
+ {{- "Cutting Knowledge Date: December 2023
37
+ " }}
38
+ {{- "Today Date: " + date_string + "
39
+
40
+ " }}
41
+ {%- if tools is not none and not tools_in_user_message %}
42
+ {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
43
+ {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
44
+ {{- "Do not use variables.
45
+
46
+ " }}
47
+ {%- for t in tools %}
48
+ {{- t | tojson(indent=4) }}
49
+ {{- "
50
+
51
+ " }}
52
+ {%- endfor %}
53
+ {%- endif %}
54
+ {{- system_message }}
55
+ {{- "<|eot_id|>" }}
56
+
57
+ {#- Custom tools are passed in a user message with some extra guidance #}
58
+ {%- if tools_in_user_message and not tools is none %}
59
+ {#- Extract the first user message so we can plug it in here #}
60
+ {%- if messages | length != 0 %}
61
+ {%- set first_user_message = messages[0]['content'] %}
62
+ {%- set messages = messages[1:] %}
63
+ {%- else %}
64
+ {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
65
+ {%- endif %}
66
+ {{- '<|start_header_id|>user<|end_header_id|>
67
+
68
+ ' -}}
69
+ {{- "Given the following functions, please respond with a JSON for a function call " }}
70
+ {{- "with its proper arguments that best answers the given prompt.
71
+
72
+ " }}
73
+ {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
74
+ {{- "Do not use variables.
75
+
76
+ " }}
77
+ {%- for t in tools %}
78
+ {{- t | tojson(indent=4) }}
79
+ {{- "
80
+
81
+ " }}
82
+ {%- endfor %}
83
+ {{- first_user_message + "<|eot_id|>"}}
84
+ {%- endif %}
85
+
86
+ {%- for message in messages %}
87
+ {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
88
+ {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>
89
+
90
+ '+ message['content'] + '<|eot_id|>' }}
91
+ {%- elif 'tool_calls' in message %}
92
+ {%- if not message.tool_calls|length == 1 %}
93
+ {{- raise_exception("This model only supports single tool-calls at once!") }}
94
+ {%- endif %}
95
+ {%- set tool_call = message.tool_calls[0].function %}
96
+ {%- if builtin_tools is defined and tool_call.name in builtin_tools %}
97
+ {{- '<|start_header_id|>assistant<|end_header_id|>
98
+
99
+ ' -}}
100
+ {{- "<|python_tag|>" + tool_call.name + ".call(" }}
101
+ {%- for arg_name, arg_val in tool_call.arguments | items %}
102
+ {{- arg_name + '="' + arg_val + '"' }}
103
+ {%- if not loop.last %}
104
+ {{- ", " }}
105
+ {%- endif %}
106
+ {%- endfor %}
107
+ {{- ")" }}
108
+ {%- else %}
109
+ {{- '<|start_header_id|>assistant<|end_header_id|>
110
+
111
+ ' -}}
112
+ {{- '{"name": "' + tool_call.name + '", ' }}
113
+ {{- '"parameters": ' }}
114
+ {{- tool_call.arguments | tojson }}
115
+ {{- "}" }}
116
+ {%- endif %}
117
+ {%- if builtin_tools is defined %}
118
+ {#- This means we're in ipython mode #}
119
+ {{- "<|eom_id|>" }}
120
+ {%- else %}
121
+ {{- "<|eot_id|>" }}
122
+ {%- endif %}
123
+ {%- elif message.role == "tool" or message.role == "ipython" %}
124
+ {{- "<|start_header_id|>ipython<|end_header_id|>
125
+
126
+ " }}
127
+ {%- if message.content is mapping or message.content is iterable %}
128
+ {{- message.content | tojson }}
129
+ {%- else %}
130
+ {{- message.content }}
131
+ {%- endif %}
132
+ {{- "<|eot_id|>" }}
133
+ {%- endif %}
134
+ {%- endfor %}
135
+ {%- if add_generation_prompt %}
136
+ {{- '<|start_header_id|>assistant<|end_header_id|>
137
+
138
+ ' }}
139
+ {%- endif %}
config.json CHANGED
@@ -1,16 +1,11 @@
1
  {
2
- "_name_or_path": "nltpt/Llama-3.2-1B-Instruct",
3
  "architectures": [
4
  "LlamaForCausalLM"
5
  ],
6
  "attention_bias": false,
7
  "attention_dropout": 0.0,
8
  "bos_token_id": 128000,
9
- "eos_token_id": [
10
- 128001,
11
- 128008,
12
- 128009
13
- ],
14
  "head_dim": 64,
15
  "hidden_act": "silu",
16
  "hidden_size": 2048,
@@ -22,6 +17,7 @@
22
  "num_attention_heads": 32,
23
  "num_hidden_layers": 16,
24
  "num_key_value_heads": 8,
 
25
  "pretraining_tp": 1,
26
  "rms_norm_eps": 1e-05,
27
  "rope_scaling": {
@@ -33,14 +29,10 @@
33
  },
34
  "rope_theta": 500000.0,
35
  "tie_word_embeddings": true,
36
- "transformers_version": "4.43.4",
37
- "transformers.js_config": {
38
- "dtype": "q4f16",
39
- "use_external_data_format": {
40
- "model.onnx": true,
41
- "model_fp16.onnx": true
42
- }
43
- },
44
  "use_cache": true,
45
  "vocab_size": 128256
46
- }
 
1
  {
 
2
  "architectures": [
3
  "LlamaForCausalLM"
4
  ],
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
7
  "bos_token_id": 128000,
8
+ "eos_token_id": 128009,
 
 
 
 
9
  "head_dim": 64,
10
  "hidden_act": "silu",
11
  "hidden_size": 2048,
 
17
  "num_attention_heads": 32,
18
  "num_hidden_layers": 16,
19
  "num_key_value_heads": 8,
20
+ "pad_token_id": 128004,
21
  "pretraining_tp": 1,
22
  "rms_norm_eps": 1e-05,
23
  "rope_scaling": {
 
29
  },
30
  "rope_theta": 500000.0,
31
  "tie_word_embeddings": true,
32
+ "torch_dtype": "float32",
33
+ "transformers_version": "4.52.4",
34
+ "unsloth_fixed": true,
35
+ "unsloth_version": "2025.5.7",
 
 
 
 
36
  "use_cache": true,
37
  "vocab_size": 128256
38
+ }
generation_config.json CHANGED
@@ -6,7 +6,9 @@
6
  128008,
7
  128009
8
  ],
 
 
9
  "temperature": 0.6,
10
  "top_p": 0.9,
11
- "transformers_version": "4.43.4"
12
  }
 
6
  128008,
7
  128009
8
  ],
9
+ "max_length": 131072,
10
+ "pad_token_id": 128004,
11
  "temperature": 0.6,
12
  "top_p": 0.9,
13
+ "transformers_version": "4.52.4"
14
  }
new_quants/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f2da28a1faa39f840723a8bf363b41dbb94e06f60335aae9811cf92336489cf
3
+ size 188339
new_quants/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6cb888067da5b1c9d68479e1bc448848f35e4238e4c8cdd07dbe11724d2f5f9
3
+ size 5993975808
new_quants/model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1dae525c5d418f32e50ff5cb720bd6a53948655fe38a27159647f56076ccdeb7
3
+ size 195221
new_quants/model_fp16.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57484dc093167dbdc79c2aa7d65cd9f60583fca1c9052202d9d3b65ba9e9b670
3
+ size 2997004288
new_quants/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a46528d69e014d235d7e4dec2e20b6d7b7ad8106f893568cd858f3bf87c3f0a7
3
+ size 1220832955
ort_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "one_external_file": true,
3
+ "opset": null,
4
+ "optimization": {
5
+ "disable_attention": null,
6
+ "disable_attention_fusion": false,
7
+ "disable_bias_gelu": null,
8
+ "disable_bias_gelu_fusion": false,
9
+ "disable_bias_skip_layer_norm": null,
10
+ "disable_bias_skip_layer_norm_fusion": false,
11
+ "disable_embed_layer_norm": true,
12
+ "disable_embed_layer_norm_fusion": true,
13
+ "disable_gelu": null,
14
+ "disable_gelu_fusion": false,
15
+ "disable_group_norm_fusion": true,
16
+ "disable_layer_norm": null,
17
+ "disable_layer_norm_fusion": false,
18
+ "disable_packed_kv": true,
19
+ "disable_rotary_embeddings": false,
20
+ "disable_shape_inference": true,
21
+ "disable_skip_layer_norm": null,
22
+ "disable_skip_layer_norm_fusion": false,
23
+ "enable_gelu_approximation": false,
24
+ "enable_gemm_fast_gelu_fusion": false,
25
+ "enable_transformers_specific_optimizations": true,
26
+ "fp16": false,
27
+ "no_attention_mask": false,
28
+ "optimization_level": 2,
29
+ "optimize_for_gpu": false,
30
+ "optimize_with_onnxruntime_only": null,
31
+ "use_mask_index": false,
32
+ "use_multi_head_attention": false,
33
+ "use_raw_attention_mask": false
34
+ },
35
+ "quantization": {},
36
+ "use_external_data_format": true
37
+ }
special_tokens_map.json CHANGED
@@ -12,5 +12,12 @@
12
  "normalized": false,
13
  "rstrip": false,
14
  "single_word": false
 
 
 
 
 
 
 
15
  }
16
  }
 
12
  "normalized": false,
13
  "rstrip": false,
14
  "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|finetune_right_pad_id|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
  }
23
  }
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:79e3e522635f3171300913bb421464a87de6222182a0570b9b2ccba2a964b2b4
3
- size 9085657
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
3
+ size 17209920
tokenizer_config.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "added_tokens_decoder": {
3
  "128000": {
4
  "content": "<|begin_of_text|>",
@@ -2050,13 +2051,16 @@
2050
  }
2051
  },
2052
  "bos_token": "<|begin_of_text|>",
2053
- "chat_template": "{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}",
2054
  "clean_up_tokenization_spaces": true,
2055
  "eos_token": "<|eot_id|>",
 
2056
  "model_input_names": [
2057
  "input_ids",
2058
  "attention_mask"
2059
  ],
2060
  "model_max_length": 131072,
2061
- "tokenizer_class": "PreTrainedTokenizerFast"
 
 
 
2062
  }
 
1
  {
2
+ "add_bos_token": true,
3
  "added_tokens_decoder": {
4
  "128000": {
5
  "content": "<|begin_of_text|>",
 
2051
  }
2052
  },
2053
  "bos_token": "<|begin_of_text|>",
 
2054
  "clean_up_tokenization_spaces": true,
2055
  "eos_token": "<|eot_id|>",
2056
+ "extra_special_tokens": {},
2057
  "model_input_names": [
2058
  "input_ids",
2059
  "attention_mask"
2060
  ],
2061
  "model_max_length": 131072,
2062
+ "pad_token": "<|finetune_right_pad_id|>",
2063
+ "padding_side": "left",
2064
+ "tokenizer_class": "PreTrainedTokenizer",
2065
+ "unk_token": null
2066
  }