AdamStormed22 commited on
Commit
de136d6
·
verified ·
1 Parent(s): ccecd3f

AdamStormed22/granite-vision-weed-vqa

Browse files
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: ibm-granite/granite-vision-3.1-2b-preview
3
+ library_name: transformers
4
+ model_name: weed
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for weed
13
+
14
+ This model is a fine-tuned version of [ibm-granite/granite-vision-3.1-2b-preview](https://huggingface.co/ibm-granite/granite-vision-3.1-2b-preview).
15
+ It has been trained using [TRL](https://github.com/huggingface/trl).
16
+
17
+ ## Quick start
18
+
19
+ ```python
20
+ from transformers import pipeline
21
+
22
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
+ generator = pipeline("text-generation", model="AdamStormed22/weed", device="cuda")
24
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
+ print(output["generated_text"])
26
+ ```
27
+
28
+ ## Training procedure
29
+
30
+
31
+
32
+
33
+ This model was trained with SFT.
34
+
35
+ ### Framework versions
36
+
37
+ - TRL: 0.15.2
38
+ - Transformers: 4.50.0.dev0
39
+ - Pytorch: 2.6.0+cu124
40
+ - Datasets: 3.4.1
41
+ - Tokenizers: 0.21.1
42
+
43
+ ## Citations
44
+
45
+
46
+
47
+ Cite TRL as:
48
+
49
+ ```bibtex
50
+ @misc{vonwerra2022trl,
51
+ title = {{TRL: Transformer Reinforcement Learning}},
52
+ author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
53
+ year = 2020,
54
+ journal = {GitHub repository},
55
+ publisher = {GitHub},
56
+ howpublished = {\url{https://github.com/huggingface/trl}}
57
+ }
58
+ ```
adapter_config.json ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": {
4
+ "base_model_class": "LlavaNextForConditionalGeneration",
5
+ "parent_library": "transformers.models.llava_next.modeling_llava_next"
6
+ },
7
+ "base_model_name_or_path": "ibm-granite/granite-vision-3.1-2b-preview",
8
+ "bias": "none",
9
+ "eva_config": null,
10
+ "exclude_modules": null,
11
+ "fan_in_fan_out": false,
12
+ "inference_mode": true,
13
+ "init_lora_weights": "gaussian",
14
+ "layer_replication": null,
15
+ "layers_pattern": null,
16
+ "layers_to_transform": null,
17
+ "loftq_config": {},
18
+ "lora_alpha": 8,
19
+ "lora_bias": false,
20
+ "lora_dropout": 0.1,
21
+ "megatron_config": null,
22
+ "megatron_core": "megatron.core",
23
+ "modules_to_save": null,
24
+ "peft_type": "LORA",
25
+ "r": 8,
26
+ "rank_pattern": {},
27
+ "revision": null,
28
+ "target_modules": [
29
+ "model.layers.1.self_attn.k_proj",
30
+ "model.layers.6.self_attn.q_proj",
31
+ "model.layers.18.self_attn.k_proj",
32
+ "model.layers.7.self_attn.q_proj",
33
+ "model.layers.12.self_attn.k_proj",
34
+ "model.layers.11.self_attn.k_proj",
35
+ "29.self_attn.v_proj",
36
+ "model.layers.14.self_attn.v_proj",
37
+ "27.self_attn.q_proj",
38
+ "model.layers.3.self_attn.q_proj",
39
+ "model.layers.8.self_attn.q_proj",
40
+ "model.layers.20.self_attn.q_proj",
41
+ "model.layers.0.self_attn.q_proj",
42
+ "model.layers.17.self_attn.q_proj",
43
+ "37.self_attn.k_proj",
44
+ "model.layers.26.self_attn.q_proj",
45
+ "31.self_attn.v_proj",
46
+ "o_proj",
47
+ "model.layers.22.self_attn.q_proj",
48
+ "model.layers.5.self_attn.v_proj",
49
+ "32.self_attn.q_proj",
50
+ "model.layers.21.self_attn.v_proj",
51
+ "model.layers.24.self_attn.k_proj",
52
+ "33.self_attn.v_proj",
53
+ "28.self_attn.v_proj",
54
+ "30.self_attn.v_proj",
55
+ "model.layers.9.self_attn.k_proj",
56
+ "29.self_attn.q_proj",
57
+ "model.layers.3.self_attn.v_proj",
58
+ "model.layers.10.self_attn.k_proj",
59
+ "model.layers.17.self_attn.k_proj",
60
+ "35.self_attn.k_proj",
61
+ "33.self_attn.q_proj",
62
+ "39.self_attn.v_proj",
63
+ "32.self_attn.k_proj",
64
+ "31.self_attn.q_proj",
65
+ "model.layers.4.self_attn.v_proj",
66
+ "model.layers.19.self_attn.v_proj",
67
+ "36.self_attn.v_proj",
68
+ "model.layers.16.self_attn.k_proj",
69
+ "model.layers.26.self_attn.v_proj",
70
+ "model.layers.6.self_attn.k_proj",
71
+ "model.layers.17.self_attn.v_proj",
72
+ "34.self_attn.k_proj",
73
+ "model.layers.25.self_attn.q_proj",
74
+ "down_proj",
75
+ "model.layers.23.self_attn.q_proj",
76
+ "model.layers.19.self_attn.q_proj",
77
+ "model.layers.14.self_attn.k_proj",
78
+ "model.layers.7.self_attn.k_proj",
79
+ "model.layers.20.self_attn.k_proj",
80
+ "model.layers.4.self_attn.k_proj",
81
+ "model.layers.0.self_attn.v_proj",
82
+ "29.self_attn.k_proj",
83
+ "model.layers.8.self_attn.k_proj",
84
+ "up_proj",
85
+ "model.layers.2.self_attn.k_proj",
86
+ "model.layers.22.self_attn.v_proj",
87
+ "model.layers.16.self_attn.q_proj",
88
+ "model.layers.25.self_attn.k_proj",
89
+ "model.layers.23.self_attn.v_proj",
90
+ "model.layers.12.self_attn.q_proj",
91
+ "model.layers.18.self_attn.v_proj",
92
+ "model.layers.4.self_attn.q_proj",
93
+ "model.layers.22.self_attn.k_proj",
94
+ "33.self_attn.k_proj",
95
+ "model.layers.1.self_attn.v_proj",
96
+ "model.layers.10.self_attn.q_proj",
97
+ "27.self_attn.k_proj",
98
+ "model.layers.9.self_attn.q_proj",
99
+ "35.self_attn.v_proj",
100
+ "model.layers.9.self_attn.v_proj",
101
+ "model.layers.15.self_attn.q_proj",
102
+ "model.layers.15.self_attn.v_proj",
103
+ "38.self_attn.k_proj",
104
+ "model.layers.19.self_attn.k_proj",
105
+ "model.layers.6.self_attn.v_proj",
106
+ "34.self_attn.v_proj",
107
+ "36.self_attn.q_proj",
108
+ "35.self_attn.q_proj",
109
+ "39.self_attn.k_proj",
110
+ "28.self_attn.k_proj",
111
+ "28.self_attn.q_proj",
112
+ "model.layers.13.self_attn.q_proj",
113
+ "model.layers.2.self_attn.v_proj",
114
+ "27.self_attn.v_proj",
115
+ "model.layers.24.self_attn.v_proj",
116
+ "model.layers.24.self_attn.q_proj",
117
+ "model.layers.11.self_attn.q_proj",
118
+ "model.layers.12.self_attn.v_proj",
119
+ "model.layers.7.self_attn.v_proj",
120
+ "34.self_attn.q_proj",
121
+ "model.layers.23.self_attn.k_proj",
122
+ "39.self_attn.q_proj",
123
+ "model.layers.21.self_attn.k_proj",
124
+ "model.layers.20.self_attn.v_proj",
125
+ "36.self_attn.k_proj",
126
+ "model.layers.21.self_attn.q_proj",
127
+ "model.layers.11.self_attn.v_proj",
128
+ "model.layers.14.self_attn.q_proj",
129
+ "gate_proj",
130
+ "model.layers.18.self_attn.q_proj",
131
+ "model.layers.10.self_attn.v_proj",
132
+ "model.layers.0.self_attn.k_proj",
133
+ "31.self_attn.k_proj",
134
+ "30.self_attn.k_proj",
135
+ "model.layers.1.self_attn.q_proj",
136
+ "37.self_attn.q_proj",
137
+ "model.layers.26.self_attn.k_proj",
138
+ "model.layers.13.self_attn.v_proj",
139
+ "model.layers.3.self_attn.k_proj",
140
+ "model.layers.25.self_attn.v_proj",
141
+ "30.self_attn.q_proj",
142
+ "model.layers.8.self_attn.v_proj",
143
+ "model.layers.13.self_attn.k_proj",
144
+ "38.self_attn.v_proj",
145
+ "model.layers.5.self_attn.q_proj",
146
+ "37.self_attn.v_proj",
147
+ "model.layers.15.self_attn.k_proj",
148
+ "model.layers.5.self_attn.k_proj",
149
+ "38.self_attn.q_proj",
150
+ "model.layers.2.self_attn.q_proj",
151
+ "32.self_attn.v_proj",
152
+ "model.layers.16.self_attn.v_proj"
153
+ ],
154
+ "task_type": null,
155
+ "use_dora": true,
156
+ "use_rslora": false
157
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aaa6c72aa084fb2b58ec7b4a9339a880965c7628702d23409d08e6de04b58a3b
3
+ size 60254184
added_tokens.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "<image>": 49155,
3
+ "<|end_of_role|>": 49153,
4
+ "<|start_of_role|>": 49152,
5
+ "<|tool_call|>": 49154
6
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|start_of_role|>",
4
+ "<|end_of_role|>",
5
+ "<|tool_call|>"
6
+ ],
7
+ "bos_token": {
8
+ "content": "<|end_of_text|>",
9
+ "lstrip": false,
10
+ "normalized": false,
11
+ "rstrip": false,
12
+ "single_word": false
13
+ },
14
+ "eos_token": {
15
+ "content": "<|end_of_text|>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "pad_token": {
22
+ "content": "<|end_of_text|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false
27
+ },
28
+ "unk_token": {
29
+ "content": "<|end_of_text|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false
34
+ }
35
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<|end_of_text|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<fim_prefix>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "<fim_middle>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "3": {
30
+ "content": "<fim_suffix>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "4": {
38
+ "content": "<fim_pad>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "5": {
46
+ "content": "<filename>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "6": {
54
+ "content": "<gh_stars>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "7": {
62
+ "content": "<issue_start>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "8": {
70
+ "content": "<issue_comment>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "9": {
78
+ "content": "<issue_closed>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "10": {
86
+ "content": "<jupyter_start>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "11": {
94
+ "content": "<jupyter_text>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "12": {
102
+ "content": "<jupyter_code>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "13": {
110
+ "content": "<jupyter_output>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "14": {
118
+ "content": "<empty_output>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": true
124
+ },
125
+ "15": {
126
+ "content": "<commit_before>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": true
132
+ },
133
+ "16": {
134
+ "content": "<commit_msg>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": true
140
+ },
141
+ "17": {
142
+ "content": "<commit_after>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": true
148
+ },
149
+ "18": {
150
+ "content": "<reponame>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": true
156
+ },
157
+ "49152": {
158
+ "content": "<|start_of_role|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": true
164
+ },
165
+ "49153": {
166
+ "content": "<|end_of_role|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": true
172
+ },
173
+ "49154": {
174
+ "content": "<|tool_call|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": true
180
+ },
181
+ "49155": {
182
+ "content": "<image>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": true
188
+ }
189
+ },
190
+ "additional_special_tokens": [
191
+ "<|start_of_role|>",
192
+ "<|end_of_role|>",
193
+ "<|tool_call|>"
194
+ ],
195
+ "bos_token": "<|end_of_text|>",
196
+ "chat_template": "{%- if tools %}\n {{- '<|start_of_role|>available_tools<|end_of_role|>\n' }}\n {%- for tool in tools %}\n {{- tool | tojson(indent=4) }}\n {%- if not loop.last %}\n {{- '\n\n' }}\n {%- endif %}\n {%- endfor %}\n {{- '<|end_of_text|>\n' }}\n{%- endif %}\n{%- for message in messages if message['role'] == 'system'%}{% else %}<|system|>\nA chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n{% endfor %}{%- for message in messages %}\n {%- if message['role'] == 'system' %}\n {{- '<|system|>\n' + message['content'] + '\n' }}\n {%- elif message['role'] == 'user' %}\n {{- '<|user|>\n' + message['content'] + '\n' }}\n {%- elif message['role'] == 'assistant' %}\n {{- '<|assistant|>\n' + message['content'] + '<|end_of_text|>' }}\n {%- elif message['role'] == 'assistant_tool_call' %}\n {{- '<|start_of_role|>assistant<|end_of_role|><|tool_call|>' + message['content'] + '<|end_of_text|>\n' }}\n {%- elif message['role'] == 'tool_response' %}\n {{- '<|start_of_role|>tool_response<|end_of_role|>' + message['content'] + '<|end_of_text|>\n' }}\n {%- endif %}\n {%- if loop.last and add_generation_prompt %}\n {{- '<|assistant|>\n' }}\n {%- endif %}\n{%- endfor %}",
197
+ "clean_up_tokenization_spaces": true,
198
+ "eos_token": "<|end_of_text|>",
199
+ "errors": "replace",
200
+ "extra_special_tokens": {},
201
+ "model_max_length": 16384,
202
+ "pad_token": "<|end_of_text|>",
203
+ "padding_side": "right",
204
+ "tokenizer_class": "GPT2Tokenizer",
205
+ "unk_token": "<|end_of_text|>",
206
+ "vocab_size": 49152
207
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b9e06e56620676184be8a62ed95757e452bf1d2641dc6af7e84e4f458120eb4
3
+ size 5560
vocab.json ADDED
The diff for this file is too large to render. See raw diff