Ayansk11 commited on
Commit
a01b8fe
·
verified ·
1 Parent(s): 0e5d6ed

Upload folder using huggingface_hub

Browse files
chat_template.jinja CHANGED
@@ -1,91 +1,11 @@
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
- {%- if strftime_now is defined %}
10
- {%- set date_string = strftime_now("%d %b %Y") %}
11
- {%- else %}
12
- {%- set date_string = "26 Jul 2024" %}
13
- {%- endif %}
14
- {%- endif %}
15
- {%- if not tools is defined %}
16
- {%- set tools = none %}
17
- {%- endif %}
18
 
19
- {#- This block extracts the system message, so we can slot it into the right place. #}
20
- {%- if messages[0]['role'] == 'system' %}
21
- {%- set system_message = messages[0]['content']|trim %}
22
- {%- set messages = messages[1:] %}
23
- {%- else %}
24
- {%- set system_message = "Please reason step by step, and put your final answer within \\boxed{}." %}
25
- {%- endif %}
26
 
27
- {#- System message #}
28
- {{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
29
- {%- if tools is not none %}
30
- {{- "Environment: ipython\n" }}
31
- {%- endif %}
32
- {%- if tools is not none and not tools_in_user_message %}
33
- {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
34
- {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
35
- {{- "Do not use variables.\n\n" }}
36
- {%- for t in tools %}
37
- {{- t | tojson(indent=4) }}
38
- {{- "\n\n" }}
39
- {%- endfor %}
40
- {%- endif %}
41
- {{- system_message }}
42
- {{- "<|eot_id|>" }}
43
 
44
- {#- Custom tools are passed in a user message with some extra guidance #}
45
- {%- if tools_in_user_message and not tools is none %}
46
- {#- Extract the first user message so we can plug it in here #}
47
- {%- if messages | length != 0 %}
48
- {%- set first_user_message = messages[0]['content']|trim %}
49
- {%- set messages = messages[1:] %}
50
- {%- else %}
51
- {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
52
- {%- endif %}
53
- {{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
54
- {{- "Given the following functions, please respond with a JSON for a function call " }}
55
- {{- "with its proper arguments that best answers the given prompt.\n\n" }}
56
- {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
57
- {{- "Do not use variables.\n\n" }}
58
- {%- for t in tools %}
59
- {{- t | tojson(indent=4) }}
60
- {{- "\n\n" }}
61
- {%- endfor %}
62
- {{- first_user_message + "<|eot_id|>"}}
63
- {%- endif %}
64
-
65
- {%- for message in messages %}
66
- {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
67
- {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }}
68
- {%- elif 'tool_calls' in message %}
69
- {%- if not message.tool_calls|length == 1 %}
70
- {{- raise_exception("This model only supports single tool-calls at once!") }}
71
- {%- endif %}
72
- {%- set tool_call = message.tool_calls[0].function %}
73
- {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
74
- {{- '{"name": "' + tool_call.name + '", ' }}
75
- {{- '"parameters": ' }}
76
- {{- tool_call.arguments | tojson }}
77
- {{- "}" }}
78
- {{- "<|eot_id|>" }}
79
- {%- elif message.role == "tool" or message.role == "ipython" %}
80
- {{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
81
- {%- if message.content is mapping or message.content is iterable %}
82
- {{- message.content | tojson }}
83
- {%- else %}
84
- {{- message.content }}
85
- {%- endif %}
86
- {{- "<|eot_id|>" }}
87
- {%- endif %}
88
- {%- endfor %}
89
- {%- if add_generation_prompt %}
90
- {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
91
- {%- endif %}
 
1
+ {% for message in messages %}{% if message['role'] == 'system' %}### System
2
+ {{ message['content'] }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ {% elif message['role'] == 'user' %}### Input
5
+ {{ message['content'] }}
 
 
 
 
 
6
 
7
+ {% elif message['role'] == 'assistant' %}### Response
8
+ {{ message['content'] }}{{ eos_token }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
+ {% endif %}{% endfor %}{% if add_generation_prompt %}### Response
11
+ {% endif %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
config.json CHANGED
@@ -9,11 +9,7 @@
9
  "attn_temperature_tuning": false,
10
  "bos_token_id": 128000,
11
  "dtype": "bfloat16",
12
- "eos_token_id": [
13
- 128001,
14
- 128008,
15
- 128009
16
- ],
17
  "floor_scale": 8192,
18
  "for_llm_compressor": false,
19
  "head_dim": 64,
@@ -80,7 +76,7 @@
80
  "num_key_value_heads": 6,
81
  "num_local_experts": 0,
82
  "output_router_logits": false,
83
- "pad_token_id": null,
84
  "rms_norm_eps": 1e-05,
85
  "rope_parameters": {
86
  "rope_theta": 8000000.0,
@@ -88,9 +84,9 @@
88
  },
89
  "router_aux_loss_coef": 0.001,
90
  "router_jitter_noise": 0.0,
91
- "tie_word_embeddings": true,
92
  "transformers_version": "5.2.0",
93
- "use_cache": true,
94
  "use_qk_norm": true,
95
  "vocab_size": 128257
96
  }
 
9
  "attn_temperature_tuning": false,
10
  "bos_token_id": 128000,
11
  "dtype": "bfloat16",
12
+ "eos_token_id": 128009,
 
 
 
 
13
  "floor_scale": 8192,
14
  "for_llm_compressor": false,
15
  "head_dim": 64,
 
76
  "num_key_value_heads": 6,
77
  "num_local_experts": 0,
78
  "output_router_logits": false,
79
+ "pad_token_id": 128256,
80
  "rms_norm_eps": 1e-05,
81
  "rope_parameters": {
82
  "rope_theta": 8000000.0,
 
84
  },
85
  "router_aux_loss_coef": 0.001,
86
  "router_jitter_noise": 0.0,
87
+ "tie_word_embeddings": false,
88
  "transformers_version": "5.2.0",
89
+ "use_cache": false,
90
  "use_qk_norm": true,
91
  "vocab_size": 128257
92
  }
generation_config.json CHANGED
@@ -3,9 +3,12 @@
3
  "bos_token_id": 128000,
4
  "cache_implementation": "dynamic",
5
  "eos_token_id": [
 
6
  128001,
7
  128008,
8
  128009
9
  ],
 
 
10
  "transformers_version": "5.2.0"
11
  }
 
3
  "bos_token_id": 128000,
4
  "cache_implementation": "dynamic",
5
  "eos_token_id": [
6
+ 128009,
7
  128001,
8
  128008,
9
  128009
10
  ],
11
+ "pad_token_id": 128256,
12
+ "tie_word_embeddings": false,
13
  "transformers_version": "5.2.0"
14
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2ea3c58ccb13fb0c6aabf181308f8d45ddc39d932cf7e4c6638512712f0b9299
3
- size 1899398184
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0d55067d35d4254ad193dc4e5b01475718ef9fcf94e7aa276c42d86ec9a4e4a
3
+ size 2293403880