Naman150 commited on
Commit
ec8187a
·
verified ·
1 Parent(s): 47f8f54

Upload 8 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ unsloth.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
38
+ unsloth.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
39
+ unsloth.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
Modelfile ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # FROM /workspace/work/llama.cpp/Naman150/ProcedureFT_Final/unsloth_Q8.gguf
3
+ FROM C:/Users/indusa2/Downloads/ProcedureFT/unsloth.Q8_0.gguf
4
+ TEMPLATE """{{ if .Messages }}
5
+ {{- if or .System .Tools }}<|start_header_id|>system<|end_header_id|>
6
+ {{- if .System }}
7
+
8
+ {{ .System }}
9
+ {{- end }}
10
+ {{- if .Tools }}
11
+
12
+ You are a helpful assistant with tool calling capabilities. When you receive a tool call response, use the output to format an answer to the original use question.
13
+ {{- end }}
14
+ {{- end }}<|eot_id|>
15
+ {{- range $i, $_ := .Messages }}
16
+ {{- $last := eq (len (slice $.Messages $i)) 1 }}
17
+ {{- if eq .Role "user" }}<|start_header_id|>user<|end_header_id|>
18
+ {{- if and $.Tools $last }}
19
+
20
+ Given the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.
21
+
22
+ Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}. Do not use variables.
23
+
24
+ {{ $.Tools }}
25
+ {{- end }}
26
+
27
+ {{ .Content }}<|eot_id|>{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
28
+
29
+ {{ end }}
30
+ {{- else if eq .Role "assistant" }}<|start_header_id|>assistant<|end_header_id|>
31
+ {{- if .ToolCalls }}
32
+
33
+ {{- range .ToolCalls }}{"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}{{ end }}
34
+ {{- else }}
35
+
36
+ {{ .Content }}{{ if not $last }}<|eot_id|>{{ end }}
37
+ {{- end }}
38
+ {{- else if eq .Role "tool" }}<|start_header_id|>ipython<|end_header_id|>
39
+
40
+ {{ .Content }}<|eot_id|>{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
41
+
42
+ {{ end }}
43
+ {{- end }}
44
+ {{- end }}
45
+ {{- else }}
46
+ {{- if .System }}<|start_header_id|>system<|end_header_id|>
47
+
48
+ {{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>
49
+
50
+ {{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
51
+
52
+ {{ end }}{{ .Response }}{{ if .Response }}<|eot_id|>{{ end }}"""
53
+ PARAMETER stop "<|start_header_id|>"
54
+ PARAMETER stop "<|end_header_id|>"
55
+ PARAMETER stop "<|eot_id|>"
56
+ PARAMETER stop "<|eom_id|>"
57
+ PARAMETER temperature 1.5
58
+ PARAMETER min_p 0.1
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 ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 3072,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 8192,
14
+ "max_position_embeddings": 131072,
15
+ "mlp_bias": false,
16
+ "model_type": "llama",
17
+ "num_attention_heads": 24,
18
+ "num_hidden_layers": 28,
19
+ "num_key_value_heads": 8,
20
+ "pad_token_id": 128004,
21
+ "pretraining_tp": 1,
22
+ "rms_norm_eps": 1e-05,
23
+ "rope_scaling": {
24
+ "factor": 32.0,
25
+ "high_freq_factor": 4.0,
26
+ "low_freq_factor": 1.0,
27
+ "original_max_position_embeddings": 8192,
28
+ "rope_type": "llama3"
29
+ },
30
+ "rope_theta": 500000.0,
31
+ "tie_word_embeddings": true,
32
+ "torch_dtype": "bfloat16",
33
+ "transformers_version": "4.53.2",
34
+ "unsloth_fixed": true,
35
+ "unsloth_version": "2025.7.11",
36
+ "use_cache": true,
37
+ "vocab_size": 128256
38
+ }
generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 128000,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 128001,
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.53.2"
14
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
3
+ size 17209920
unsloth.Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:558fd55ce7d1a56ed7e9bb8f872f0a933f267e82ef7b8275e1ad83d4d4aa7ac3
3
+ size 2019377920
unsloth.Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c5599631afe76f48e5536ffb00e5cf0f18935b432cf2b424491f390b6f2fb7c
3
+ size 2322154240
unsloth.Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f855ebcd61c7e00a4500601cddece591508981192a3778b14fbf00a0e2b4b6d
3
+ size 3421899520