AyaKhaled commited on
Commit
c5328d0
·
verified ·
1 Parent(s): 7295990

Training in progress, step 10

Browse files
adapter_config.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "alpha_pattern": {},
3
  "auto_mapping": null,
4
- "base_model_name_or_path": "meta-llama/Llama-3.2-11B-Vision-Instruct",
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
- "q_proj",
28
- "v_proj"
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:bdebfa84896f40198a59c22488c95f78c5186f0170d32836c5338eb85091dafa
3
- size 23642216
 
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
- "</tool_call>": 151658,
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
- {{- 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
- {%- set user_supplied_system_message = true %}
24
- {%- else %}
25
- {%- set system_message = "" %}
26
- {%- set user_supplied_system_message = false %}
27
- {%- endif %}
28
 
29
- {#- Find out if there are any images #}
30
- {% set image_ns = namespace(has_images=false) %}
31
- {%- for message in messages %}
32
- {%- for content in message['content'] %}
33
- {%- if content['type'] == 'image' %}
34
- {%- set image_ns.has_images = true %}
35
- {%- endif %}
36
- {%- endfor %}
37
- {%- endfor %}
38
-
39
- {#- System message if there are no images, or if the user supplied one #}
40
- {%- if user_supplied_system_message or not image_ns.has_images %}
41
- {{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
42
- {%- if tools is not none %}
43
- {{- "Environment: ipython\n" }}
44
- {%- endif %}
45
- {{- "Cutting Knowledge Date: December 2023\n" }}
46
- {{- "Today Date: " + date_string + "\n\n" }}
47
- {%- if tools is not none and not tools_in_user_message %}
48
- {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
49
- {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
50
- {{- "Do not use variables.\n\n" }}
51
- {%- for t in tools %}
52
- {{- t | tojson(indent=4) }}
53
- {{- "\n\n" }}
54
- {%- endfor %}
55
- {%- endif %}
56
- {{- system_message }}
57
- {{- "<|eot_id|>" }}
58
- {%- endif %}
59
-
60
- {#- Custom tools are passed in a user message with some extra guidance #}
61
- {%- if tools_in_user_message and not tools is none %}
62
- {#- Extract the first user message so we can plug it in here #}
63
- {%- if messages | length != 0 %}
64
- {%- set first_user_message = messages[0]['content']|trim %}
65
- {%- set messages = messages[1:] %}
66
- {%- else %}
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": "<|begin_of_text|>",
4
  "lstrip": false,
5
  "normalized": false,
6
  "rstrip": false,
7
  "single_word": false
8
  },
 
9
  "eos_token": {
10
- "content": "<|eot_id|>",
11
  "lstrip": false,
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,
 
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:9816d43bd5347d64bccc66b7710947fb18e9818cc660215b1462061d4a44e449
3
- size 17210088
 
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