Training in progress, step 10
Browse files- adapter_config.json +3 -3
- adapter_model.safetensors +2 -2
- added_tokens.json +1 -22
- chat_template.jinja +45 -117
- special_tokens_map.json +13 -3
- tokenizer.json +2 -2
- tokenizer.model +3 -0
- tokenizer_config.json +0 -0
adapter_config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"alpha_pattern": {},
|
| 3 |
"auto_mapping": null,
|
| 4 |
-
"base_model_name_or_path": "
|
| 5 |
"bias": "none",
|
| 6 |
"corda_config": null,
|
| 7 |
"eva_config": null,
|
|
@@ -24,8 +24,8 @@
|
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
],
|
| 30 |
"task_type": "CAUSAL_LM",
|
| 31 |
"trainable_token_indices": null,
|
|
|
|
| 1 |
{
|
| 2 |
"alpha_pattern": {},
|
| 3 |
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-4b-it",
|
| 5 |
"bias": "none",
|
| 6 |
"corda_config": null,
|
| 7 |
"eva_config": null,
|
|
|
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
+
"v_proj",
|
| 28 |
+
"q_proj"
|
| 29 |
],
|
| 30 |
"task_type": "CAUSAL_LM",
|
| 31 |
"trainable_token_indices": null,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd1fb235ba3be8982d47bcfb8f62505aa8b4f1c6b58a9e86a7c81d1da6f19abf
|
| 3 |
+
size 12932216
|
added_tokens.json
CHANGED
|
@@ -1,24 +1,3 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
"<tool_call>": 151657,
|
| 4 |
-
"<|box_end|>": 151649,
|
| 5 |
-
"<|box_start|>": 151648,
|
| 6 |
-
"<|endoftext|>": 151643,
|
| 7 |
-
"<|file_sep|>": 151664,
|
| 8 |
-
"<|fim_middle|>": 151660,
|
| 9 |
-
"<|fim_pad|>": 151662,
|
| 10 |
-
"<|fim_prefix|>": 151659,
|
| 11 |
-
"<|fim_suffix|>": 151661,
|
| 12 |
-
"<|im_end|>": 151645,
|
| 13 |
-
"<|im_start|>": 151644,
|
| 14 |
-
"<|image_pad|>": 151655,
|
| 15 |
-
"<|object_ref_end|>": 151647,
|
| 16 |
-
"<|object_ref_start|>": 151646,
|
| 17 |
-
"<|quad_end|>": 151651,
|
| 18 |
-
"<|quad_start|>": 151650,
|
| 19 |
-
"<|repo_name|>": 151663,
|
| 20 |
-
"<|video_pad|>": 151656,
|
| 21 |
-
"<|vision_end|>": 151653,
|
| 22 |
-
"<|vision_pad|>": 151654,
|
| 23 |
-
"<|vision_start|>": 151652
|
| 24 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"<image_soft_token>": 262144
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
}
|
chat_template.jinja
CHANGED
|
@@ -1,119 +1,47 @@
|
|
| 1 |
-
{{
|
| 2 |
-
{%- if
|
| 3 |
-
{%-
|
| 4 |
-
{%-
|
| 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 |
-
|
| 20 |
-
{%-
|
| 21 |
-
|
| 22 |
-
{%- set messages = messages[1:] %}
|
| 23 |
-
{%- set user_supplied_system_message = true %}
|
| 24 |
-
{%- else %}
|
| 25 |
-
{%- set system_message = "" %}
|
| 26 |
-
{%- set user_supplied_system_message = false %}
|
| 27 |
-
{%- endif %}
|
| 28 |
|
| 29 |
-
|
| 30 |
-
{
|
| 31 |
-
{%-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
{%-
|
| 38 |
-
|
| 39 |
-
{
|
| 40 |
-
{%- if
|
| 41 |
-
|
| 42 |
-
{%-
|
| 43 |
-
{
|
| 44 |
-
{%- endif
|
| 45 |
-
{{
|
| 46 |
-
|
| 47 |
-
{%- if
|
| 48 |
-
{{
|
| 49 |
-
|
| 50 |
-
{
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
{
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
{
|
| 58 |
-
{
|
| 59 |
-
|
| 60 |
-
{
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
{{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
|
| 68 |
-
{%- endif %}
|
| 69 |
-
{{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
|
| 70 |
-
{{- "Given the following functions, please respond with a JSON for a function call " }}
|
| 71 |
-
{{- "with its proper arguments that best answers the given prompt.\n\n" }}
|
| 72 |
-
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
| 73 |
-
{{- "Do not use variables.\n\n" }}
|
| 74 |
-
{%- for t in tools %}
|
| 75 |
-
{{- t | tojson(indent=4) }}
|
| 76 |
-
{{- "\n\n" }}
|
| 77 |
-
{%- endfor %}
|
| 78 |
-
{{- first_user_message + "<|eot_id|>"}}
|
| 79 |
-
{%- endif %}
|
| 80 |
-
|
| 81 |
-
{%- for message in messages %}
|
| 82 |
-
{%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
|
| 83 |
-
{{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n' }}
|
| 84 |
-
{%- if message['content'] is string %}
|
| 85 |
-
{{- message['content'] }}
|
| 86 |
-
{%- else %}
|
| 87 |
-
{%- for content in message['content'] %}
|
| 88 |
-
{%- if content['type'] == 'image' %}
|
| 89 |
-
{{- '<|image|>' }}
|
| 90 |
-
{%- elif content['type'] == 'text' %}
|
| 91 |
-
{{- content['text'] }}
|
| 92 |
-
{%- endif %}
|
| 93 |
-
{%- endfor %}
|
| 94 |
-
{%- endif %}
|
| 95 |
-
{{- '<|eot_id|>' }}
|
| 96 |
-
{%- elif 'tool_calls' in message %}
|
| 97 |
-
{%- if not message.tool_calls|length == 1 %}
|
| 98 |
-
{{- raise_exception("This model only supports single tool-calls at once!") }}
|
| 99 |
-
{%- endif %}
|
| 100 |
-
{%- set tool_call = message.tool_calls[0].function %}
|
| 101 |
-
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
| 102 |
-
{{- '{"name": "' + tool_call.name + '", ' }}
|
| 103 |
-
{{- '"parameters": ' }}
|
| 104 |
-
{{- tool_call.arguments | tojson }}
|
| 105 |
-
{{- "}" }}
|
| 106 |
-
{{- "<|eot_id|>" }}
|
| 107 |
-
{%- elif message.role == "tool" or message.role == "ipython" %}
|
| 108 |
-
{{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
|
| 109 |
-
{%- if message.content is mapping or message.content is iterable %}
|
| 110 |
-
{{- message.content | tojson }}
|
| 111 |
-
{%- else %}
|
| 112 |
-
{{- message.content }}
|
| 113 |
-
{%- endif %}
|
| 114 |
-
{{- "<|eot_id|>" }}
|
| 115 |
-
{%- endif %}
|
| 116 |
-
{%- endfor %}
|
| 117 |
-
{%- if add_generation_prompt %}
|
| 118 |
-
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
|
| 119 |
-
{%- endif %}
|
|
|
|
| 1 |
+
{{ bos_token }}
|
| 2 |
+
{%- if messages[0]['role'] == 'system' -%}
|
| 3 |
+
{%- if messages[0]['content'] is string -%}
|
| 4 |
+
{%- set first_user_prefix = messages[0]['content'] + '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
' -%}
|
| 7 |
+
{%- else -%}
|
| 8 |
+
{%- set first_user_prefix = messages[0]['content'][0]['text'] + '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
' -%}
|
| 11 |
+
{%- endif -%}
|
| 12 |
+
{%- set loop_messages = messages[1:] -%}
|
| 13 |
+
{%- else -%}
|
| 14 |
+
{%- set first_user_prefix = "" -%}
|
| 15 |
+
{%- set loop_messages = messages -%}
|
| 16 |
+
{%- endif -%}
|
| 17 |
+
{%- for message in loop_messages -%}
|
| 18 |
+
{%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
|
| 19 |
+
{{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
|
| 20 |
+
{%- endif -%}
|
| 21 |
+
{%- if (message['role'] == 'assistant') -%}
|
| 22 |
+
{%- set role = "model" -%}
|
| 23 |
+
{%- else -%}
|
| 24 |
+
{%- set role = message['role'] -%}
|
| 25 |
+
{%- endif -%}
|
| 26 |
+
{{ '<start_of_turn>' + role + '
|
| 27 |
+
' + (first_user_prefix if loop.first else "") }}
|
| 28 |
+
{%- if message['content'] is string -%}
|
| 29 |
+
{{ message['content'] | trim }}
|
| 30 |
+
{%- elif message['content'] is iterable -%}
|
| 31 |
+
{%- for item in message['content'] -%}
|
| 32 |
+
{%- if item['type'] == 'image' -%}
|
| 33 |
+
{{ '<start_of_image>' }}
|
| 34 |
+
{%- elif item['type'] == 'text' -%}
|
| 35 |
+
{{ item['text'] | trim }}
|
| 36 |
+
{%- endif -%}
|
| 37 |
+
{%- endfor -%}
|
| 38 |
+
{%- else -%}
|
| 39 |
+
{{ raise_exception("Invalid content type") }}
|
| 40 |
+
{%- endif -%}
|
| 41 |
+
{{ '<end_of_turn>
|
| 42 |
+
' }}
|
| 43 |
+
{%- endfor -%}
|
| 44 |
+
{%- if add_generation_prompt -%}
|
| 45 |
+
{{'<start_of_turn>model
|
| 46 |
+
'}}
|
| 47 |
+
{%- endif -%}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
special_tokens_map.json
CHANGED
|
@@ -1,20 +1,30 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"bos_token": {
|
| 3 |
-
"content": "
|
| 4 |
"lstrip": false,
|
| 5 |
"normalized": false,
|
| 6 |
"rstrip": false,
|
| 7 |
"single_word": false
|
| 8 |
},
|
|
|
|
| 9 |
"eos_token": {
|
| 10 |
-
"content": "
|
| 11 |
"lstrip": false,
|
| 12 |
"normalized": false,
|
| 13 |
"rstrip": false,
|
| 14 |
"single_word": false
|
| 15 |
},
|
|
|
|
| 16 |
"pad_token": {
|
| 17 |
-
"content": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
"lstrip": false,
|
| 19 |
"normalized": false,
|
| 20 |
"rstrip": false,
|
|
|
|
| 1 |
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
"lstrip": false,
|
| 6 |
"normalized": false,
|
| 7 |
"rstrip": false,
|
| 8 |
"single_word": false
|
| 9 |
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
"lstrip": false,
|
| 14 |
"normalized": false,
|
| 15 |
"rstrip": false,
|
| 16 |
"single_word": false
|
| 17 |
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
"lstrip": false,
|
| 29 |
"normalized": false,
|
| 30 |
"rstrip": false,
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795
|
| 3 |
+
size 33384568
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
|
| 3 |
+
size 4689074
|
tokenizer_config.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|