MM-AdaptionLabs commited on
Commit
6334079
·
verified ·
1 Parent(s): 14786e4

Add 13 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ 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
+ training-metrics.png filter=lfs diff=lfs merge=lfs -text
37
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen3.5-0.8B
3
+ library_name: peft
4
+ license: other
5
+ tags:
6
+ - lora
7
+ - peft
8
+ - fine-tuned
9
+ - adaption
10
+ ---
11
+
12
+ # adaption_general_knowledge_qa
13
+
14
+ ## Model Training
15
+
16
+ A LORA fine-tune of `Qwen/Qwen3.5-0.8B`. This model was trained with supervised fine-tuning (SFT) using [Adaption](https://adaptionlabs.ai)'s AutoScientist on the general_knowledge_qa dataset.
17
+
18
+
19
+ ![Training metrics](training-metrics.png)
20
+
21
+ ### AutoScientist Config
22
+
23
+ ```json
24
+ {
25
+ "finetune_job_id": "69d2d2ca-5984-45d7-8e07-f24a59d39424",
26
+ "training_experiment_id": "b3805568-3565-4d1c-ad72-4e8173aee82f",
27
+ "original_model_name": "Qwen/Qwen3.5-0.8B",
28
+ "trained_model_name": "adaption_general_knowledge_qa",
29
+ "training_method": "sft",
30
+ "training_type": "lora",
31
+ "data_format": "chat",
32
+ "hyperparams": {
33
+ "lora": "true",
34
+ "lora_r": 16,
35
+ "n_evals": 5,
36
+ "n_epochs": 1,
37
+ "batch_size": "max",
38
+ "lora_alpha": 32,
39
+ "lora_dropout": 0,
40
+ "min_lr_ratio": 0.1,
41
+ "warmup_ratio": 0.03,
42
+ "weight_decay": 0,
43
+ "learning_rate": 0.00001,
44
+ "max_grad_norm": 2,
45
+ "base_model_size": "0.8B",
46
+ "train_on_inputs": "false",
47
+ "training_method": "sft",
48
+ "lr_scheduler_type": "cosine",
49
+ "scheduler_num_cycles": 0.5,
50
+ "lora_trainable_modules": "q_proj,k_proj,v_proj,o_proj"
51
+ }
52
+ }
53
+ ```
54
+
55
+ ## Training Data
56
+
57
+ The model was fine-tuned on 3,588 rows of adapted data with the following domain distribution: history (11%), sports (10%), science (9%), geography (7%), entertainment (6%), music (6%), animal-nature (5%), cooking (5%), culture (4%), travel (3%), transportation (3%), technology (2%), corporate-business (2%), governance (2%), medical (2%), games (2%), writing-editing-communication (2%), fitness-sports (2%), academic-education (1%), math (1%), code (1%), language (1%), agriculture (1%), how-to (1%), personal-finance (1%), art (1%), career-workplace (1%), religion (1%), product-advice (1%), parenting-family (1%), personal-growth (1%), fashion-beauty (1%), marketing (0%), architecture-design (0%), data-analysis-visualization (0%), other (0%), legal (0%), dating (0%), market-analysis (0%), news (0%), hr (0%), social (0%), roleplay (0%), literature (0%).
58
+
59
+ ## Model Evaluation
60
+
61
+ The model was evaluated on an in-distribution held-out test set as well as a broader domain-specific test set to measure generalization.
62
+
63
+
64
+ ![Win rates](win-rates.png)
65
+
66
+
67
+ ## How to use
68
+
69
+ ```bash
70
+ pip install torch transformers peft
71
+ ```
72
+
73
+ ```python
74
+ import torch
75
+ from transformers import AutoModelForCausalLM, AutoTokenizer
76
+ from peft import PeftModel
77
+
78
+ BASE = "Qwen/Qwen3.5-0.8B"
79
+ ADAPTER = "<this-repo-id>"
80
+
81
+ device = "cuda" if torch.cuda.is_available() else "cpu"
82
+ dtype = torch.float32 if device == "cpu" else torch.bfloat16
83
+
84
+ base = AutoModelForCausalLM.from_pretrained(BASE, dtype=dtype).to(device)
85
+ model = PeftModel.from_pretrained(base, ADAPTER)
86
+ # Optional: merge the LoRA weights into the base for faster inference
87
+ model = model.merge_and_unload()
88
+ model.eval()
89
+
90
+ tokenizer = AutoTokenizer.from_pretrained(BASE)
91
+ messages = [{"role": "user", "content": "Hello!"}]
92
+ text = tokenizer.apply_chat_template(
93
+ messages, tokenize=False, add_generation_prompt=True)
94
+ inputs = tokenizer(text, return_tensors="pt").to(device)
95
+
96
+ with torch.inference_mode():
97
+ out = model.generate(**inputs, max_new_tokens=512)
98
+ print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
99
+ ```
adapter_config.json ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "togethercomputer/Qwen3.5-0.8B",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": [
9
+ "model.visual.blocks.8.mlp.linear_fc1",
10
+ "model.visual.blocks.4.attn.proj",
11
+ "model.visual.blocks.6.norm2",
12
+ "model.visual.blocks.9.norm1",
13
+ "model.visual.blocks.2.mlp.act_fn",
14
+ "model.visual.blocks.7.mlp.act_fn",
15
+ "model.visual.blocks.6.mlp",
16
+ "model.visual.blocks.6.attn.qkv",
17
+ "model.visual.blocks.4.attn.qkv",
18
+ "model.visual.blocks.8.attn.proj",
19
+ "model.visual.blocks.11.attn.proj",
20
+ "model.visual.blocks.1.attn",
21
+ "model.visual.pos_embed",
22
+ "model.visual.blocks.5.norm1",
23
+ "model.visual.blocks.10.mlp",
24
+ "model.visual.blocks.10.norm2",
25
+ "model.visual.patch_embed",
26
+ "model.visual.blocks.8.mlp",
27
+ "model.visual.blocks.10.attn",
28
+ "model.visual.blocks.3.norm2",
29
+ "model.visual.blocks.0",
30
+ "model.visual.blocks.5.attn",
31
+ "model.visual.blocks.2.attn.proj",
32
+ "model.visual.blocks.3.attn.proj",
33
+ "model.visual.blocks.2.norm2",
34
+ "model.visual.blocks.6.norm1",
35
+ "model.visual.blocks.10.mlp.linear_fc2",
36
+ "model.visual.blocks.9.attn.qkv",
37
+ "model.visual.blocks.9.mlp.linear_fc2",
38
+ "model.visual.blocks.0.attn",
39
+ "model.visual.blocks.5.mlp.act_fn",
40
+ "model.visual.blocks.9.attn.proj",
41
+ "model.visual.blocks.8",
42
+ "model.visual.blocks.1.norm1",
43
+ "model.visual.blocks.1.attn.qkv",
44
+ "model.visual.blocks.2.mlp",
45
+ "model.visual.blocks.7.norm2",
46
+ "model.visual.blocks.7",
47
+ "model.visual.rotary_pos_emb",
48
+ "model.visual.blocks.7.mlp",
49
+ "model.visual.blocks.8.norm2",
50
+ "model.visual.blocks.11.attn",
51
+ "model.visual.blocks.1",
52
+ "model.visual.blocks.7.mlp.linear_fc1",
53
+ "model.visual.blocks.10",
54
+ "model.visual.blocks.5.attn.proj",
55
+ "model.visual.blocks.4.mlp.linear_fc2",
56
+ "model.visual.blocks.2.norm1",
57
+ "model.visual.blocks.0.mlp.linear_fc1",
58
+ "model.visual.blocks.1.mlp",
59
+ "model.visual.blocks.9.mlp.linear_fc1",
60
+ "model.visual.blocks.3.norm1",
61
+ "model.visual.merger",
62
+ "model.visual.blocks.2.mlp.linear_fc1",
63
+ "model.visual.blocks.4.mlp",
64
+ "model.visual.blocks.3.attn.qkv",
65
+ "model.visual.blocks.5.norm2",
66
+ "model.visual.blocks.1.norm2",
67
+ "model.visual.blocks.8.mlp.linear_fc2",
68
+ "model.visual.blocks.0.norm1",
69
+ "model.visual.blocks.9.mlp.act_fn",
70
+ "model.visual.blocks.2",
71
+ "model.visual.blocks.0.mlp.act_fn",
72
+ "model.visual.blocks.3.mlp.act_fn",
73
+ "model.visual.blocks.1.mlp.linear_fc1",
74
+ "model.visual.blocks.10.norm1",
75
+ "model.visual.blocks.11.mlp.act_fn",
76
+ "model.visual.blocks.7.norm1",
77
+ "model.visual.blocks.4.norm1",
78
+ "model.visual.blocks.6.attn.proj",
79
+ "model.visual.blocks.9.mlp",
80
+ "model.visual.blocks.10.attn.proj",
81
+ "model.visual.merger.norm",
82
+ "model.visual.blocks.6.mlp.linear_fc2",
83
+ "model.visual.blocks.0.mlp",
84
+ "model.visual.blocks.3.mlp.linear_fc2",
85
+ "model.visual.blocks.6.attn",
86
+ "model.visual.blocks.5",
87
+ "model.visual.blocks.9.norm2",
88
+ "model.visual.blocks.3.attn",
89
+ "model.visual.blocks.7.attn.qkv",
90
+ "model.visual.blocks.3",
91
+ "model.visual.blocks.8.norm1",
92
+ "model.visual",
93
+ "model.visual.blocks.11.norm2",
94
+ "model.visual.blocks.5.mlp.linear_fc1",
95
+ "model.visual.blocks.4.norm2",
96
+ "model.visual.blocks.3.mlp",
97
+ "model.visual.blocks.6.mlp.act_fn",
98
+ "model.visual.blocks.7.mlp.linear_fc2",
99
+ "model.visual.blocks.2.attn",
100
+ "model.visual.blocks.5.attn.qkv",
101
+ "model.visual.blocks.6.mlp.linear_fc1",
102
+ "model.visual.merger.linear_fc1",
103
+ "model.visual.blocks.11.attn.qkv",
104
+ "model.visual.blocks.4.mlp.act_fn",
105
+ "model.visual.blocks.11.mlp",
106
+ "model.visual.blocks.0.mlp.linear_fc2",
107
+ "model.visual.blocks.4.mlp.linear_fc1",
108
+ "model.visual.blocks.6",
109
+ "model.visual.blocks.9.attn",
110
+ "model.visual.blocks.8.attn.qkv",
111
+ "model.visual.blocks.11.norm1",
112
+ "model.visual.blocks.0.norm2",
113
+ "model.visual.blocks.8.mlp.act_fn",
114
+ "model.visual.merger.act_fn",
115
+ "model.visual.blocks.11.mlp.linear_fc1",
116
+ "model.visual.blocks.7.attn.proj",
117
+ "model.visual.blocks.5.mlp.linear_fc2",
118
+ "model.visual.blocks.1.mlp.act_fn",
119
+ "model.visual.blocks.10.attn.qkv",
120
+ "model.visual.blocks.10.mlp.act_fn",
121
+ "model.visual.blocks",
122
+ "model.visual.blocks.8.attn",
123
+ "model.visual.blocks.10.mlp.linear_fc1",
124
+ "model.visual.blocks.9",
125
+ "model.visual.blocks.7.attn",
126
+ "model.visual.blocks.5.mlp",
127
+ "model.visual.blocks.0.attn.qkv",
128
+ "model.visual.blocks.11.mlp.linear_fc2",
129
+ "model.visual.blocks.0.attn.proj",
130
+ "model.visual.merger.linear_fc2",
131
+ "model.visual.patch_embed.proj",
132
+ "model.visual.blocks.11",
133
+ "model.visual.blocks.2.attn.qkv",
134
+ "model.visual.blocks.2.mlp.linear_fc2",
135
+ "model.visual.blocks.3.mlp.linear_fc1",
136
+ "model.visual.blocks.1.mlp.linear_fc2",
137
+ "model.visual.blocks.4",
138
+ "model.visual.blocks.4.attn",
139
+ "model.visual.blocks.1.attn.proj"
140
+ ],
141
+ "fan_in_fan_out": false,
142
+ "inference_mode": true,
143
+ "init_lora_weights": true,
144
+ "layer_replication": null,
145
+ "layers_pattern": null,
146
+ "layers_to_transform": null,
147
+ "loftq_config": {},
148
+ "lora_alpha": 32,
149
+ "lora_bias": false,
150
+ "lora_dropout": 0.0,
151
+ "megatron_config": null,
152
+ "megatron_core": "megatron.core",
153
+ "modules_to_save": null,
154
+ "peft_type": "LORA",
155
+ "r": 16,
156
+ "rank_pattern": {},
157
+ "revision": null,
158
+ "target_modules": [
159
+ "k_proj",
160
+ "o_proj",
161
+ "v_proj",
162
+ "q_proj"
163
+ ],
164
+ "task_type": "CAUSAL_LM",
165
+ "trainable_token_indices": null,
166
+ "use_dora": false,
167
+ "use_rslora": false
168
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6d809b424f54051a039d64f58505ef5be4f3aa15d3eaa51097e08639f8fb21b
3
+ size 4332464
chat_template.jinja ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if is_system_content %}
10
+ {{- raise_exception('System message cannot contain images.') }}
11
+ {%- endif %}
12
+ {%- if do_vision_count %}
13
+ {%- set image_count.value = image_count.value + 1 %}
14
+ {%- endif %}
15
+ {%- if add_vision_id %}
16
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
17
+ {%- endif %}
18
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
19
+ {%- elif 'video' in item or item.type == 'video' %}
20
+ {%- if is_system_content %}
21
+ {{- raise_exception('System message cannot contain videos.') }}
22
+ {%- endif %}
23
+ {%- if do_vision_count %}
24
+ {%- set video_count.value = video_count.value + 1 %}
25
+ {%- endif %}
26
+ {%- if add_vision_id %}
27
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
28
+ {%- endif %}
29
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
30
+ {%- elif 'text' in item %}
31
+ {{- item.text }}
32
+ {%- else %}
33
+ {{- raise_exception('Unexpected item type in content.') }}
34
+ {%- endif %}
35
+ {%- endfor %}
36
+ {%- elif content is none or content is undefined %}
37
+ {{- '' }}
38
+ {%- else %}
39
+ {{- raise_exception('Unexpected content type.') }}
40
+ {%- endif %}
41
+ {%- endmacro %}
42
+ {%- if not messages %}
43
+ {{- raise_exception('No messages provided.') }}
44
+ {%- endif %}
45
+ {%- if tools and tools is iterable and tools is not mapping %}
46
+ {{- '<|im_start|>system\n' }}
47
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
48
+ {%- for tool in tools %}
49
+ {{- "\n" }}
50
+ {{- tool | tojson }}
51
+ {%- endfor %}
52
+ {{- "\n</tools>" }}
53
+ {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
54
+ {%- if messages[0].role == 'system' %}
55
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
56
+ {%- if content %}
57
+ {{- '\n\n' + content }}
58
+ {%- endif %}
59
+ {%- endif %}
60
+ {{- '<|im_end|>\n' }}
61
+ {%- else %}
62
+ {%- if messages[0].role == 'system' %}
63
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
64
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
65
+ {%- endif %}
66
+ {%- endif %}
67
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
68
+ {%- for message in messages[::-1] %}
69
+ {%- set index = (messages|length - 1) - loop.index0 %}
70
+ {%- if ns.multi_step_tool and message.role == "user" %}
71
+ {%- set content = render_content(message.content, false)|trim %}
72
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
73
+ {%- set ns.multi_step_tool = false %}
74
+ {%- set ns.last_query_index = index %}
75
+ {%- endif %}
76
+ {%- endif %}
77
+ {%- endfor %}
78
+ {%- for message in messages %}
79
+ {%- set content = render_content(message.content, true)|trim %}
80
+ {%- if message.role == "system" %}
81
+ {%- if not loop.first %}
82
+ {{- raise_exception('System message must be at the beginning.') }}
83
+ {%- endif %}
84
+ {%- elif message.role == "user" %}
85
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
86
+ {%- elif message.role == "assistant" %}
87
+ {%- set reasoning_content = '' %}
88
+ {%- if message.reasoning_content is string %}
89
+ {%- set reasoning_content = message.reasoning_content %}
90
+ {%- else %}
91
+ {%- if '</think>' in content %}
92
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
93
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
94
+ {%- endif %}
95
+ {%- endif %}
96
+ {%- set reasoning_content = reasoning_content|trim %}
97
+ {%- if loop.index0 > ns.last_query_index %}
98
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
99
+ {%- else %}
100
+ {{- '<|im_start|>' + message.role + '\n' + content }}
101
+ {%- endif %}
102
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
103
+ {%- for tool_call in message.tool_calls %}
104
+ {%- if tool_call.function is defined %}
105
+ {%- set tool_call = tool_call.function %}
106
+ {%- endif %}
107
+ {%- if loop.first %}
108
+ {%- if content|trim %}
109
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
110
+ {%- else %}
111
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
112
+ {%- endif %}
113
+ {%- else %}
114
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
115
+ {%- endif %}
116
+ {%- if tool_call.arguments is defined %}
117
+ {%- for args_name, args_value in tool_call.arguments|items %}
118
+ {{- '<parameter=' + args_name + '>\n' }}
119
+ {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
120
+ {{- args_value }}
121
+ {{- '\n</parameter>\n' }}
122
+ {%- endfor %}
123
+ {%- endif %}
124
+ {{- '</function>\n</tool_call>' }}
125
+ {%- endfor %}
126
+ {%- endif %}
127
+ {{- '<|im_end|>\n' }}
128
+ {%- elif message.role == "tool" %}
129
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
130
+ {{- '<|im_start|>user' }}
131
+ {%- endif %}
132
+ {{- '\n<tool_response>\n' }}
133
+ {{- content }}
134
+ {{- '\n</tool_response>' }}
135
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
136
+ {{- '<|im_end|>\n' }}
137
+ {%- elif loop.last %}
138
+ {{- '<|im_end|>\n' }}
139
+ {%- endif %}
140
+ {%- else %}
141
+ {{- raise_exception('Unexpected message role.') }}
142
+ {%- endif %}
143
+ {%- endfor %}
144
+ {%- if add_generation_prompt %}
145
+ {{- '<|im_start|>assistant\n' }}
146
+ {%- if enable_thinking is defined and enable_thinking is true %}
147
+ {{- '<think>\n' }}
148
+ {%- else %}
149
+ {{- '<think>\n\n</think>\n\n' }}
150
+ {%- endif %}
151
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "eos_token_id": 248046,
7
+ "image_token_id": 248056,
8
+ "model_type": "qwen3_5",
9
+ "pad_token_id": 248044,
10
+ "text_config": {
11
+ "attention_bias": false,
12
+ "attention_dropout": 0.0,
13
+ "attn_output_gate": true,
14
+ "bos_token_id": null,
15
+ "dtype": "bfloat16",
16
+ "eos_token_id": 248044,
17
+ "full_attention_interval": 4,
18
+ "head_dim": 256,
19
+ "hidden_act": "silu",
20
+ "hidden_size": 1024,
21
+ "initializer_range": 0.02,
22
+ "intermediate_size": 3584,
23
+ "layer_types": [
24
+ "linear_attention",
25
+ "linear_attention",
26
+ "linear_attention",
27
+ "full_attention",
28
+ "linear_attention",
29
+ "linear_attention",
30
+ "linear_attention",
31
+ "full_attention",
32
+ "linear_attention",
33
+ "linear_attention",
34
+ "linear_attention",
35
+ "full_attention",
36
+ "linear_attention",
37
+ "linear_attention",
38
+ "linear_attention",
39
+ "full_attention",
40
+ "linear_attention",
41
+ "linear_attention",
42
+ "linear_attention",
43
+ "full_attention",
44
+ "linear_attention",
45
+ "linear_attention",
46
+ "linear_attention",
47
+ "full_attention"
48
+ ],
49
+ "linear_conv_kernel_dim": 4,
50
+ "linear_key_head_dim": 128,
51
+ "linear_num_key_heads": 16,
52
+ "linear_num_value_heads": 16,
53
+ "linear_value_head_dim": 128,
54
+ "mamba_ssm_dtype": "float32",
55
+ "max_position_embeddings": 262144,
56
+ "mlp_only_layers": [],
57
+ "model_type": "qwen3_5_text",
58
+ "mtp_num_hidden_layers": 1,
59
+ "mtp_use_dedicated_embeddings": false,
60
+ "num_attention_heads": 8,
61
+ "num_hidden_layers": 24,
62
+ "num_key_value_heads": 2,
63
+ "pad_token_id": null,
64
+ "partial_rotary_factor": 0.25,
65
+ "rms_norm_eps": 1e-06,
66
+ "rope_parameters": {
67
+ "mrope_interleaved": true,
68
+ "mrope_section": [
69
+ 11,
70
+ 11,
71
+ 10
72
+ ],
73
+ "partial_rotary_factor": 0.25,
74
+ "rope_theta": 10000000,
75
+ "rope_type": "default"
76
+ },
77
+ "tie_word_embeddings": true,
78
+ "use_cache": false,
79
+ "vocab_size": 248320,
80
+ "torch_dtype": "bfloat16"
81
+ },
82
+ "tie_word_embeddings": true,
83
+ "transformers_version": "5.10.1",
84
+ "use_cache": false,
85
+ "video_token_id": 248057,
86
+ "vision_config": {
87
+ "deepstack_visual_indexes": [],
88
+ "depth": 12,
89
+ "hidden_act": "gelu_pytorch_tanh",
90
+ "hidden_size": 768,
91
+ "in_channels": 3,
92
+ "initializer_range": 0.02,
93
+ "intermediate_size": 3072,
94
+ "model_type": "qwen3_5_vision",
95
+ "num_heads": 12,
96
+ "num_position_embeddings": 2304,
97
+ "out_hidden_size": 1024,
98
+ "patch_size": 16,
99
+ "spatial_merge_size": 2,
100
+ "temporal_patch_size": 2
101
+ },
102
+ "vision_end_token_id": 248054,
103
+ "vision_start_token_id": 248053,
104
+ "torch_dtype": "bfloat16"
105
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "Qwen2VLImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "merge_size": 2,
18
+ "patch_size": 16,
19
+ "resample": 3,
20
+ "rescale_factor": 0.00392156862745098,
21
+ "size": {
22
+ "longest_edge": 16777216,
23
+ "shortest_edge": 65536
24
+ },
25
+ "temporal_patch_size": 2
26
+ }
processor_config.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "do_convert_rgb": true,
4
+ "do_normalize": true,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_processor_type": "Qwen2VLImageProcessor",
13
+ "image_std": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "merge_size": 2,
19
+ "patch_size": 16,
20
+ "resample": 3,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "size": {
23
+ "longest_edge": 16777216,
24
+ "shortest_edge": 65536
25
+ },
26
+ "temporal_patch_size": 2
27
+ },
28
+ "processor_class": "Qwen3VLProcessor",
29
+ "video_processor": {
30
+ "do_convert_rgb": true,
31
+ "do_normalize": true,
32
+ "do_rescale": true,
33
+ "do_resize": true,
34
+ "do_sample_frames": true,
35
+ "fps": 2,
36
+ "image_mean": [
37
+ 0.5,
38
+ 0.5,
39
+ 0.5
40
+ ],
41
+ "image_std": [
42
+ 0.5,
43
+ 0.5,
44
+ 0.5
45
+ ],
46
+ "max_frames": 768,
47
+ "merge_size": 2,
48
+ "min_frames": 4,
49
+ "patch_size": 16,
50
+ "resample": 3,
51
+ "rescale_factor": 0.00392156862745098,
52
+ "return_metadata": false,
53
+ "size": {
54
+ "longest_edge": 25165824,
55
+ "shortest_edge": 4096
56
+ },
57
+ "temporal_patch_size": 2,
58
+ "video_processor_type": "Qwen3VLVideoProcessor"
59
+ }
60
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_bos_token": "<|audio_start|>",
3
+ "audio_eos_token": "<|audio_end|>",
4
+ "audio_token": "<|audio_pad|>",
5
+ "eos_token": "<|im_end|>",
6
+ "image_token": "<|image_pad|>",
7
+ "pad_token": "<|endoftext|>",
8
+ "video_token": "<|video_pad|>",
9
+ "vision_bos_token": "<|vision_start|>",
10
+ "vision_eos_token": "<|vision_end|>"
11
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523
3
+ size 19989325
tokenizer_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "image_token": "<|image_pad|>",
12
+ "is_local": false,
13
+ "local_files_only": true,
14
+ "model_max_length": 262144,
15
+ "model_specific_special_tokens": {
16
+ "audio_bos_token": "<|audio_start|>",
17
+ "audio_eos_token": "<|audio_end|>",
18
+ "audio_token": "<|audio_pad|>",
19
+ "image_token": "<|image_pad|>",
20
+ "video_token": "<|video_pad|>",
21
+ "vision_bos_token": "<|vision_start|>",
22
+ "vision_eos_token": "<|vision_end|>"
23
+ },
24
+ "pad_token": "<|endoftext|>",
25
+ "padding_side": "right",
26
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
27
+ "processor_class": "Qwen3VLProcessor",
28
+ "split_special_tokens": false,
29
+ "tokenizer_class": "Qwen2Tokenizer",
30
+ "unk_token": null,
31
+ "video_token": "<|video_pad|>",
32
+ "vision_bos_token": "<|vision_start|>",
33
+ "vision_eos_token": "<|vision_end|>"
34
+ }
trainer_state.json ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 1.0,
6
+ "eval_steps": 4,
7
+ "global_step": 21,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.047619047619047616,
14
+ "grad_norm": 1.869510531425476,
15
+ "learning_rate": 0.0,
16
+ "loss": 1.6582717895507812,
17
+ "step": 1
18
+ },
19
+ {
20
+ "epoch": 0.09523809523809523,
21
+ "grad_norm": 1.4465402364730835,
22
+ "learning_rate": 1e-05,
23
+ "loss": 1.39208984375,
24
+ "step": 2
25
+ },
26
+ {
27
+ "epoch": 0.14285714285714285,
28
+ "grad_norm": 2.276446580886841,
29
+ "learning_rate": 9.94459753267812e-06,
30
+ "loss": 1.953125,
31
+ "step": 3
32
+ },
33
+ {
34
+ "epoch": 0.19047619047619047,
35
+ "grad_norm": 2.215484380722046,
36
+ "learning_rate": 9.779754323328192e-06,
37
+ "loss": 1.899658203125,
38
+ "step": 4
39
+ },
40
+ {
41
+ "epoch": 0.23809523809523808,
42
+ "grad_norm": 1.9182502031326294,
43
+ "learning_rate": 9.509529358847655e-06,
44
+ "loss": 1.667724609375,
45
+ "step": 5
46
+ },
47
+ {
48
+ "epoch": 0.23809523809523808,
49
+ "eval_loss": 2.453125,
50
+ "eval_runtime": 10.6216,
51
+ "eval_samples_per_second": 0.094,
52
+ "eval_steps_per_second": 0.094,
53
+ "step": 5
54
+ },
55
+ {
56
+ "epoch": 0.2857142857142857,
57
+ "grad_norm": 2.0919392108917236,
58
+ "learning_rate": 9.140576474687263e-06,
59
+ "loss": 1.90869140625,
60
+ "step": 6
61
+ },
62
+ {
63
+ "epoch": 0.3333333333333333,
64
+ "grad_norm": 2.093019962310791,
65
+ "learning_rate": 8.681980515339464e-06,
66
+ "loss": 1.7752685546875,
67
+ "step": 7
68
+ },
69
+ {
70
+ "epoch": 0.38095238095238093,
71
+ "grad_norm": 1.9170184135437012,
72
+ "learning_rate": 8.14503363531613e-06,
73
+ "loss": 1.70947265625,
74
+ "step": 8
75
+ },
76
+ {
77
+ "epoch": 0.42857142857142855,
78
+ "grad_norm": 1.925852656364441,
79
+ "learning_rate": 7.5429572488279615e-06,
80
+ "loss": 1.809814453125,
81
+ "step": 9
82
+ },
83
+ {
84
+ "epoch": 0.42857142857142855,
85
+ "eval_loss": 2.390625,
86
+ "eval_runtime": 0.829,
87
+ "eval_samples_per_second": 1.206,
88
+ "eval_steps_per_second": 1.206,
89
+ "step": 9
90
+ },
91
+ {
92
+ "epoch": 0.47619047619047616,
93
+ "grad_norm": 2.0689780712127686,
94
+ "learning_rate": 6.890576474687264e-06,
95
+ "loss": 1.87548828125,
96
+ "step": 10
97
+ },
98
+ {
99
+ "epoch": 0.5238095238095238,
100
+ "grad_norm": 2.0856761932373047,
101
+ "learning_rate": 6.20395509268104e-06,
102
+ "loss": 1.931640625,
103
+ "step": 11
104
+ },
105
+ {
106
+ "epoch": 0.5714285714285714,
107
+ "grad_norm": 1.7902768850326538,
108
+ "learning_rate": 5.500000000000001e-06,
109
+ "loss": 1.6474609375,
110
+ "step": 12
111
+ },
112
+ {
113
+ "epoch": 0.6190476190476191,
114
+ "grad_norm": 1.6947816610336304,
115
+ "learning_rate": 4.796044907318961e-06,
116
+ "loss": 1.75390625,
117
+ "step": 13
118
+ },
119
+ {
120
+ "epoch": 0.6190476190476191,
121
+ "eval_loss": 2.328125,
122
+ "eval_runtime": 0.8257,
123
+ "eval_samples_per_second": 1.211,
124
+ "eval_steps_per_second": 1.211,
125
+ "step": 13
126
+ },
127
+ {
128
+ "epoch": 0.6666666666666666,
129
+ "grad_norm": 1.8652945756912231,
130
+ "learning_rate": 4.109423525312738e-06,
131
+ "loss": 1.800048828125,
132
+ "step": 14
133
+ },
134
+ {
135
+ "epoch": 0.7142857142857143,
136
+ "grad_norm": 1.87651526927948,
137
+ "learning_rate": 3.45704275117204e-06,
138
+ "loss": 1.70166015625,
139
+ "step": 15
140
+ },
141
+ {
142
+ "epoch": 0.7619047619047619,
143
+ "grad_norm": 1.8096357583999634,
144
+ "learning_rate": 2.854966364683872e-06,
145
+ "loss": 1.751953125,
146
+ "step": 16
147
+ },
148
+ {
149
+ "epoch": 0.8095238095238095,
150
+ "grad_norm": 1.9394772052764893,
151
+ "learning_rate": 2.3180194846605367e-06,
152
+ "loss": 1.868896484375,
153
+ "step": 17
154
+ },
155
+ {
156
+ "epoch": 0.8095238095238095,
157
+ "eval_loss": 2.296875,
158
+ "eval_runtime": 0.8266,
159
+ "eval_samples_per_second": 1.21,
160
+ "eval_steps_per_second": 1.21,
161
+ "step": 17
162
+ },
163
+ {
164
+ "epoch": 0.8571428571428571,
165
+ "grad_norm": 1.7789219617843628,
166
+ "learning_rate": 1.8594235253127373e-06,
167
+ "loss": 1.80322265625,
168
+ "step": 18
169
+ },
170
+ {
171
+ "epoch": 0.9047619047619048,
172
+ "grad_norm": 1.8745474815368652,
173
+ "learning_rate": 1.490470641152345e-06,
174
+ "loss": 1.703369140625,
175
+ "step": 19
176
+ },
177
+ {
178
+ "epoch": 0.9523809523809523,
179
+ "grad_norm": 1.7236051559448242,
180
+ "learning_rate": 1.2202456766718092e-06,
181
+ "loss": 1.692138671875,
182
+ "step": 20
183
+ },
184
+ {
185
+ "epoch": 1.0,
186
+ "grad_norm": 1.77152681350708,
187
+ "learning_rate": 1.0554024673218808e-06,
188
+ "loss": 1.63671875,
189
+ "step": 21
190
+ },
191
+ {
192
+ "epoch": 1.0,
193
+ "eval_loss": 2.28125,
194
+ "eval_runtime": 0.8292,
195
+ "eval_samples_per_second": 1.206,
196
+ "eval_steps_per_second": 1.206,
197
+ "step": 21
198
+ }
199
+ ],
200
+ "logging_steps": 1.0,
201
+ "max_steps": 21,
202
+ "num_input_tokens_seen": 0,
203
+ "num_train_epochs": 1,
204
+ "save_steps": 0,
205
+ "stateful_callbacks": {
206
+ "TrainerControl": {
207
+ "args": {
208
+ "should_epoch_stop": false,
209
+ "should_evaluate": false,
210
+ "should_log": false,
211
+ "should_save": true,
212
+ "should_training_stop": true
213
+ },
214
+ "attributes": {}
215
+ }
216
+ },
217
+ "total_flos": 7489904145596416.0,
218
+ "train_batch_size": 1,
219
+ "trial_name": null,
220
+ "trial_params": null
221
+ }
training-metrics.png ADDED

Git LFS Details

  • SHA256: aed0399f04c6899617d1d2212e491a05736be1be2185d33e45c2d48e5b762480
  • Pointer size: 131 Bytes
  • Size of remote file: 185 kB
win-rates.png ADDED