Kavin60606 commited on
Commit
4d8f201
·
verified ·
1 Parent(s): 4421c10

Upload fine-tuned Qwen3-VL-2B affordance model with dataset, checkpoints, and results

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +5 -0
  2. README.md +297 -0
  3. adapter_config.json +50 -0
  4. adapter_model.safetensors +3 -0
  5. added_tokens.json +28 -0
  6. analyze_and_infer.py +310 -0
  7. chat_template.jinja +120 -0
  8. checkpoints/checkpoint-2000/README.md +210 -0
  9. checkpoints/checkpoint-2000/adapter_config.json +50 -0
  10. checkpoints/checkpoint-2000/adapter_model.safetensors +3 -0
  11. checkpoints/checkpoint-2000/added_tokens.json +28 -0
  12. checkpoints/checkpoint-2000/chat_template.jinja +120 -0
  13. checkpoints/checkpoint-2000/merges.txt +0 -0
  14. checkpoints/checkpoint-2000/optimizer.pt +3 -0
  15. checkpoints/checkpoint-2000/preprocessor_config.json +39 -0
  16. checkpoints/checkpoint-2000/rng_state.pth +3 -0
  17. checkpoints/checkpoint-2000/scheduler.pt +3 -0
  18. checkpoints/checkpoint-2000/special_tokens_map.json +31 -0
  19. checkpoints/checkpoint-2000/tokenizer.json +3 -0
  20. checkpoints/checkpoint-2000/tokenizer_config.json +241 -0
  21. checkpoints/checkpoint-2000/trainer_state.json +1514 -0
  22. checkpoints/checkpoint-2000/training_args.bin +3 -0
  23. checkpoints/checkpoint-2000/video_preprocessor_config.json +41 -0
  24. checkpoints/checkpoint-2000/vocab.json +0 -0
  25. checkpoints/checkpoint-2145/README.md +210 -0
  26. checkpoints/checkpoint-2145/adapter_config.json +50 -0
  27. checkpoints/checkpoint-2145/adapter_model.safetensors +3 -0
  28. checkpoints/checkpoint-2145/added_tokens.json +28 -0
  29. checkpoints/checkpoint-2145/chat_template.jinja +120 -0
  30. checkpoints/checkpoint-2145/merges.txt +0 -0
  31. checkpoints/checkpoint-2145/optimizer.pt +3 -0
  32. checkpoints/checkpoint-2145/preprocessor_config.json +39 -0
  33. checkpoints/checkpoint-2145/rng_state.pth +3 -0
  34. checkpoints/checkpoint-2145/scheduler.pt +3 -0
  35. checkpoints/checkpoint-2145/special_tokens_map.json +31 -0
  36. checkpoints/checkpoint-2145/tokenizer.json +3 -0
  37. checkpoints/checkpoint-2145/tokenizer_config.json +241 -0
  38. checkpoints/checkpoint-2145/trainer_state.json +1612 -0
  39. checkpoints/checkpoint-2145/training_args.bin +3 -0
  40. checkpoints/checkpoint-2145/video_preprocessor_config.json +41 -0
  41. checkpoints/checkpoint-2145/vocab.json +0 -0
  42. dataset/annotations.jsonl +0 -0
  43. dataset/dataset_info.json +30 -0
  44. dataset/train_llamafactory.json +0 -0
  45. dataset/train_msswift.jsonl +0 -0
  46. dataset/val_llamafactory.json +0 -0
  47. dataset/val_msswift.jsonl +0 -0
  48. inference.py +101 -0
  49. merges.txt +0 -0
  50. prepare_finetune_data.py +190 -0
.gitattributes CHANGED
@@ -33,3 +33,8 @@ 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
+ checkpoints/checkpoint-2000/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ checkpoints/checkpoint-2145/tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
+ results/inference_comparison.png filter=lfs diff=lfs merge=lfs -text
39
+ results/training_curves.png filter=lfs diff=lfs merge=lfs -text
40
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: peft
3
+ base_model: unsloth/qwen3-vl-2b-instruct-unsloth-bnb-4bit
4
+ license: apache-2.0
5
+ tags:
6
+ - qwen3-vl
7
+ - affordance
8
+ - visual-affordance
9
+ - egocentric
10
+ - lora
11
+ - qlora
12
+ - fine-tuned
13
+ - vision-language
14
+ - unsloth
15
+ language:
16
+ - en
17
+ pipeline_tag: image-text-to-text
18
+ datasets:
19
+ - sanskxr02/fva_affordance_v1
20
+ ---
21
+
22
+ # Qwen3-VL-2B Affordance Fine-Tuned (QLoRA)
23
+
24
+ A fine-tuned **Qwen3-VL-2B-Instruct** model for **visual affordance detection** from egocentric (first-person view) images. The model identifies what actions can be performed on visible objects in a scene.
25
+
26
+ ## Model Details
27
+
28
+ | Property | Value |
29
+ |---|---|
30
+ | **Base Model** | [Qwen/Qwen3-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-2B-Instruct) |
31
+ | **Method** | QLoRA 4-bit (NF4 quantization) |
32
+ | **LoRA Rank** | 16 |
33
+ | **LoRA Alpha** | 32 |
34
+ | **LoRA Target Modules** | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
35
+ | **Trainable Parameters** | 17.4M / 1.52B (1.15%) |
36
+ | **Training Framework** | [Unsloth](https://github.com/unslothai/unsloth) + TRL SFTTrainer |
37
+ | **Training Hardware** | NVIDIA RTX 3060 Ti (8GB VRAM) |
38
+ | **Training Time** | ~64 minutes |
39
+ | **PEFT Version** | 0.18.1 |
40
+
41
+ ## Training Data
42
+
43
+ Fine-tuned on [sanskxr02/fva_affordance_v1](https://huggingface.co/datasets/sanskxr02/fva_affordance_v1) - an egocentric visual affordance dataset containing:
44
+
45
+ | Property | Value |
46
+ |---|---|
47
+ | **Total Images** | 3,177 frames |
48
+ | **Train Split** | 2,859 (90%) |
49
+ | **Validation Split** | 318 (10%) |
50
+ | **Image Size** | 512 x 288 (16:9, resized to 384x216 during training) |
51
+ | **Unique Affordances** | 377 |
52
+ | **Task Categories** | food_preparation (coffee making), tool_use (wine bottling) |
53
+ | **View** | Egocentric / First-person |
54
+
55
+ ### Affordance Examples
56
+ `pour`, `pull bottle`, `pick up bottle`, `press button`, `pour coffee into cup`, `grasp coffee grinder`, `stir`, `hold bottle`, `pack bottles`, `put cup on counter`, etc.
57
+
58
+ ## Training Results
59
+
60
+ | Metric | Value |
61
+ |---|---|
62
+ | **Initial Loss** | 3.4227 |
63
+ | **Final Train Loss** | 0.0747 |
64
+ | **Best Eval Loss** | 0.0976 |
65
+ | **Loss Reduction** | 97.8% |
66
+ | **Epochs** | 3 |
67
+ | **Total Steps** | 2,145 |
68
+
69
+ ### Training Curves
70
+
71
+ ![Training Curves](results/training_curves.png)
72
+
73
+ ![Loss by Epoch](results/loss_by_epoch.png)
74
+
75
+ ### Inference Results
76
+
77
+ ![Inference Comparison](results/inference_comparison.png)
78
+
79
+ ## How to Use
80
+
81
+ ### Requirements
82
+
83
+ ```bash
84
+ pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu126
85
+ pip install unsloth transformers>=4.57.1 peft>=0.14.0 bitsandbytes>=0.49.1
86
+ pip install accelerate qwen-vl-utils Pillow
87
+ ```
88
+
89
+ ### Quick Inference
90
+
91
+ ```python
92
+ import os
93
+ os.environ["TORCHDYNAMO_DISABLE"] = "1" # Required on Windows
94
+
95
+ from unsloth import FastVisionModel
96
+ from qwen_vl_utils import process_vision_info
97
+
98
+ # Load model with LoRA adapter
99
+ model, tokenizer = FastVisionModel.from_pretrained(
100
+ "Kavin60606/qwen3-vl-2b-affordance-finetuned",
101
+ load_in_4bit=True,
102
+ max_seq_length=2048,
103
+ )
104
+ FastVisionModel.for_inference(model)
105
+
106
+ # Prepare input
107
+ messages = [
108
+ {
109
+ "role": "system",
110
+ "content": [{"type": "text", "text": "You are a visual affordance detection assistant. Given a first-person view image, identify what actions can be performed on the visible objects."}],
111
+ },
112
+ {
113
+ "role": "user",
114
+ "content": [
115
+ {"type": "image", "image": "path/to/your/image.jpg"},
116
+ {"type": "text", "text": "What affordances are present in this scene?"},
117
+ ],
118
+ },
119
+ ]
120
+
121
+ # Generate
122
+ input_text = tokenizer.apply_chat_template(
123
+ messages, tokenize=False, add_generation_prompt=True
124
+ )
125
+ image_inputs, _ = process_vision_info(messages)
126
+ inputs = tokenizer(
127
+ text=[input_text],
128
+ images=image_inputs,
129
+ return_tensors="pt",
130
+ padding=True,
131
+ ).to(model.device)
132
+
133
+ output_ids = model.generate(**inputs, max_new_tokens=256)
134
+ new_tokens = output_ids[0][inputs["input_ids"].shape[1]:]
135
+ response = tokenizer.decode(new_tokens, skip_special_tokens=True)
136
+ print(response)
137
+ ```
138
+
139
+ ### Using with Transformers + PEFT (without Unsloth)
140
+
141
+ ```python
142
+ import os
143
+ os.environ["TORCHDYNAMO_DISABLE"] = "1"
144
+
145
+ import torch
146
+ from transformers import AutoProcessor, Qwen3VLForConditionalGeneration
147
+ from peft import PeftModel
148
+ from qwen_vl_utils import process_vision_info
149
+
150
+ # Load base model in 4-bit
151
+ from transformers import BitsAndBytesConfig
152
+
153
+ bnb_config = BitsAndBytesConfig(
154
+ load_in_4bit=True,
155
+ bnb_4bit_quant_type="nf4",
156
+ bnb_4bit_compute_dtype=torch.bfloat16,
157
+ )
158
+
159
+ base_model = Qwen3VLForConditionalGeneration.from_pretrained(
160
+ "Qwen/Qwen3-VL-2B-Instruct",
161
+ quantization_config=bnb_config,
162
+ device_map="auto",
163
+ )
164
+
165
+ # Load LoRA adapter
166
+ model = PeftModel.from_pretrained(base_model, "Kavin60606/qwen3-vl-2b-affordance-finetuned")
167
+ processor = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-2B-Instruct")
168
+
169
+ # Prepare and run inference
170
+ messages = [
171
+ {
172
+ "role": "user",
173
+ "content": [
174
+ {"type": "image", "image": "path/to/image.jpg"},
175
+ {"type": "text", "text": "What affordances are present in this scene?"},
176
+ ],
177
+ },
178
+ ]
179
+
180
+ text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
181
+ image_inputs, _ = process_vision_info(messages)
182
+ inputs = processor(text=[text], images=image_inputs, return_tensors="pt", padding=True).to(model.device)
183
+
184
+ output = model.generate(**inputs, max_new_tokens=256)
185
+ print(processor.decode(output[0], skip_special_tokens=True))
186
+ ```
187
+
188
+ ## Repository Structure
189
+
190
+ ```
191
+ .
192
+ ├── adapter_config.json # LoRA adapter configuration
193
+ ├── adapter_model.safetensors # Fine-tuned LoRA weights (~35MB)
194
+ ├── tokenizer.json # Tokenizer files
195
+ ├── tokenizer_config.json
196
+ ├── preprocessor_config.json
197
+ ├── chat_template.jinja
198
+ ├── trainer_state.json # Full training log history
199
+ │
200
+ ├── checkpoints/
201
+ │ ├── checkpoint-2000/ # Checkpoint at step 2000
202
+ │ └── checkpoint-2145/ # Final checkpoint (step 2145)
203
+ │
204
+ ├── dataset/
205
+ │ ├── annotations.jsonl # Original annotations (3,177 entries)
206
+ │ ├── train_msswift.jsonl # Training data - MS-SWIFT format (2,859)
207
+ │ ├── val_msswift.jsonl # Validation data - MS-SWIFT format (318)
208
+ │ ├── train_llamafactory.json # Training data - LLaMA-Factory format
209
+ │ ├── val_llamafactory.json # Validation data - LLaMA-Factory format
210
+ │ └── dataset_info.json # LLaMA-Factory dataset registry
211
+ │
212
+ ├── results/
213
+ │ ├── training_curves.png # Training loss, grad norm, LR curves
214
+ │ ├── loss_by_epoch.png # Loss over epochs
215
+ │ ├── inference_comparison.png # Visual GT vs prediction comparison
216
+ │ └── inference_results.json # Full inference results (20 samples)
217
+ │
218
+ ├── train.py # Training script (Unsloth + TRL)
219
+ ├── inference.py # Inference script
220
+ ├── analyze_and_infer.py # Analysis + inference + visualization
221
+ └── prepare_finetune_data.py # Dataset preparation script
222
+ ```
223
+
224
+ ## Training Configuration
225
+
226
+ ```python
227
+ # Key hyperparameters
228
+ MODEL = "unsloth/Qwen3-VL-2B-Instruct"
229
+ QUANTIZATION = "4-bit NF4"
230
+ LORA_RANK = 16
231
+ LORA_ALPHA = 32
232
+ BATCH_SIZE = 1
233
+ GRADIENT_ACCUMULATION = 4 # effective batch = 4
234
+ LEARNING_RATE = 2e-4
235
+ LR_SCHEDULER = "cosine"
236
+ WARMUP_RATIO = 0.1
237
+ EPOCHS = 3
238
+ MAX_SEQ_LENGTH = 2048
239
+ OPTIMIZER = "adamw_8bit"
240
+ PRECISION = "bfloat16"
241
+ GRADIENT_CHECKPOINTING = True
242
+ VISION_ENCODER = "frozen" # ViT frozen to save VRAM
243
+ ```
244
+
245
+ ## Reproduce Training
246
+
247
+ ```bash
248
+ # 1. Clone and setup
249
+ git clone https://huggingface.co/Kavin60606/qwen3-vl-2b-affordance-finetuned
250
+ cd qwen3-vl-2b-affordance-finetuned
251
+
252
+ # 2. Create environment
253
+ python -m venv finetune_env
254
+ # Linux/Mac:
255
+ source finetune_env/bin/activate
256
+ # Windows:
257
+ .\finetune_env\Scripts\Activate.ps1
258
+
259
+ # 3. Install dependencies
260
+ pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu126
261
+ pip install unsloth peft>=0.14.0 bitsandbytes>=0.49.1 accelerate>=1.2.0
262
+ pip install trl>=0.17.0 transformers>=4.57.1 datasets qwen-vl-utils Pillow matplotlib
263
+
264
+ # 4. Download the dataset images
265
+ pip install huggingface_hub
266
+ hf download sanskxr02/fva_affordance_v1 --repo-type dataset --local-dir ./dataset_images
267
+
268
+ # 5. Run training
269
+ # Windows:
270
+ $env:PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True"
271
+ # Linux:
272
+ export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
273
+
274
+ python train.py
275
+ ```
276
+
277
+ ## Limitations
278
+
279
+ - Trained on only **2 task scenarios** (coffee making + wine bottling) — may not generalize to other domains
280
+ - Only **3,177 training samples** — limited diversity
281
+ - Original annotations generated by `qwen2-vl-2b-int4` — may contain noise
282
+ - Affordance labels are relatively short (avg 2.2 words)
283
+ - Vision encoder was frozen during training to fit in 8GB VRAM
284
+
285
+ ## Citation
286
+
287
+ If you use this model, please cite:
288
+
289
+ ```bibtex
290
+ @misc{qwen3vl-affordance-2026,
291
+ title={Qwen3-VL-2B Fine-Tuned for Visual Affordance Detection},
292
+ author={Kavin60606},
293
+ year={2026},
294
+ publisher={HuggingFace},
295
+ url={https://huggingface.co/Kavin60606/qwen3-vl-2b-affordance-finetuned}
296
+ }
297
+ ```
adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "Qwen3VLForConditionalGeneration",
7
+ "parent_library": "transformers.models.qwen3_vl.modeling_qwen3_vl",
8
+ "unsloth_fixed": true
9
+ },
10
+ "base_model_name_or_path": "unsloth/qwen3-vl-2b-instruct-unsloth-bnb-4bit",
11
+ "bias": "none",
12
+ "corda_config": null,
13
+ "ensure_weight_tying": false,
14
+ "eva_config": null,
15
+ "exclude_modules": null,
16
+ "fan_in_fan_out": false,
17
+ "inference_mode": true,
18
+ "init_lora_weights": true,
19
+ "layer_replication": null,
20
+ "layers_pattern": null,
21
+ "layers_to_transform": null,
22
+ "loftq_config": {},
23
+ "lora_alpha": 32,
24
+ "lora_bias": false,
25
+ "lora_dropout": 0,
26
+ "megatron_config": null,
27
+ "megatron_core": "megatron.core",
28
+ "modules_to_save": null,
29
+ "peft_type": "LORA",
30
+ "peft_version": "0.18.1",
31
+ "qalora_group_size": 16,
32
+ "r": 16,
33
+ "rank_pattern": {},
34
+ "revision": null,
35
+ "target_modules": [
36
+ "up_proj",
37
+ "o_proj",
38
+ "down_proj",
39
+ "q_proj",
40
+ "gate_proj",
41
+ "k_proj",
42
+ "v_proj"
43
+ ],
44
+ "target_parameters": null,
45
+ "task_type": "CAUSAL_LM",
46
+ "trainable_token_indices": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false
50
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd296c2718a6c1b83cc3b19cc8ccf38f2f3b46f5336d1866a4a0f99f3173afae
3
+ size 69788264
added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
analyze_and_infer.py ADDED
@@ -0,0 +1,310 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Analyze training results + run inference on validation data.
3
+ Generates graphs and comparison results.
4
+ """
5
+
6
+ import os
7
+ import json
8
+
9
+ os.environ["TORCHDYNAMO_DISABLE"] = "1"
10
+
11
+ import torch
12
+ import matplotlib
13
+ matplotlib.use("Agg")
14
+ import matplotlib.pyplot as plt
15
+ import numpy as np
16
+ from PIL import Image
17
+ from unsloth import FastVisionModel
18
+
19
+ # ============================================================
20
+ # PATHS
21
+ # ============================================================
22
+ OUTPUT_DIR = "c:/Fidelity_dynamics/qwen_affordance_exp/output"
23
+ DATASET_DIR = "c:/Fidelity_dynamics/qwen_affordance_exp/dataset"
24
+ ADAPTER_PATH = os.path.join(OUTPUT_DIR, "lora_adapter")
25
+ VAL_FILE = os.path.join(DATASET_DIR, "val_msswift.jsonl")
26
+ RESULTS_DIR = "c:/Fidelity_dynamics/qwen_affordance_exp/results"
27
+ os.makedirs(RESULTS_DIR, exist_ok=True)
28
+
29
+ # ============================================================
30
+ # PART 1: TRAINING LOSS ANALYSIS & GRAPHS
31
+ # ============================================================
32
+ print("=" * 60)
33
+ print("PART 1: Training Analysis")
34
+ print("=" * 60)
35
+
36
+ # Load trainer state
37
+ with open(os.path.join(OUTPUT_DIR, "checkpoint-2145", "trainer_state.json"), "r") as f:
38
+ state = json.load(f)
39
+
40
+ log_history = state["log_history"]
41
+
42
+ # Extract training metrics
43
+ train_steps = []
44
+ train_losses = []
45
+ train_grad_norms = []
46
+ train_lr = []
47
+ eval_steps = []
48
+ eval_losses = []
49
+
50
+ for entry in log_history:
51
+ if "loss" in entry and "eval_loss" not in entry:
52
+ train_steps.append(entry["step"])
53
+ train_losses.append(entry["loss"])
54
+ train_grad_norms.append(entry.get("grad_norm", 0))
55
+ train_lr.append(entry.get("learning_rate", 0))
56
+ if "eval_loss" in entry:
57
+ eval_steps.append(entry["step"])
58
+ eval_losses.append(entry["eval_loss"])
59
+
60
+ # Print summary
61
+ print(f"Total training steps: {train_steps[-1]}")
62
+ print(f"Initial loss: {train_losses[0]:.4f}")
63
+ print(f"Final loss: {train_losses[-1]:.4f}")
64
+ print(f"Best train loss: {min(train_losses):.4f} (step {train_steps[train_losses.index(min(train_losses))]})")
65
+ if eval_losses:
66
+ print(f"Best eval loss: {min(eval_losses):.4f} (step {eval_steps[eval_losses.index(min(eval_losses))]})")
67
+ print(f"Final eval loss: {eval_losses[-1]:.4f}")
68
+
69
+ # --- FIGURE 1: Training & Eval Loss ---
70
+ fig, axes = plt.subplots(2, 2, figsize=(14, 10))
71
+ fig.suptitle("Qwen3-VL-2B Affordance Fine-Tuning Results", fontsize=16, fontweight="bold")
72
+
73
+ # Plot 1: Training Loss
74
+ ax1 = axes[0, 0]
75
+ ax1.plot(train_steps, train_losses, color="#2196F3", linewidth=0.8, alpha=0.6, label="Train Loss")
76
+ # Smooth curve
77
+ window = 20
78
+ if len(train_losses) > window:
79
+ smooth_losses = np.convolve(train_losses, np.ones(window)/window, mode="valid")
80
+ smooth_steps = train_steps[window-1:]
81
+ ax1.plot(smooth_steps, smooth_losses, color="#0D47A1", linewidth=2, label=f"Smoothed (w={window})")
82
+ if eval_losses:
83
+ ax1.plot(eval_steps, eval_losses, "ro-", markersize=5, linewidth=2, label="Eval Loss")
84
+ ax1.set_xlabel("Steps")
85
+ ax1.set_ylabel("Loss")
86
+ ax1.set_title("Training & Evaluation Loss")
87
+ ax1.legend()
88
+ ax1.grid(True, alpha=0.3)
89
+ ax1.set_ylim(bottom=0)
90
+
91
+ # Plot 2: Loss (log scale for early training)
92
+ ax2 = axes[0, 1]
93
+ ax2.plot(train_steps, train_losses, color="#4CAF50", linewidth=0.8, alpha=0.6)
94
+ if len(train_losses) > window:
95
+ ax2.plot(smooth_steps, smooth_losses, color="#1B5E20", linewidth=2)
96
+ ax2.set_xlabel("Steps")
97
+ ax2.set_ylabel("Loss (log scale)")
98
+ ax2.set_title("Training Loss (Log Scale)")
99
+ ax2.set_yscale("log")
100
+ ax2.grid(True, alpha=0.3)
101
+
102
+ # Plot 3: Gradient Norm
103
+ ax3 = axes[1, 0]
104
+ ax3.plot(train_steps, train_grad_norms, color="#FF9800", linewidth=0.8, alpha=0.6, label="Grad Norm")
105
+ if len(train_grad_norms) > window:
106
+ smooth_grads = np.convolve(train_grad_norms, np.ones(window)/window, mode="valid")
107
+ ax3.plot(smooth_steps, smooth_grads, color="#E65100", linewidth=2, label=f"Smoothed (w={window})")
108
+ ax3.set_xlabel("Steps")
109
+ ax3.set_ylabel("Gradient Norm")
110
+ ax3.set_title("Gradient Norm Over Training")
111
+ ax3.legend()
112
+ ax3.grid(True, alpha=0.3)
113
+
114
+ # Plot 4: Learning Rate Schedule
115
+ ax4 = axes[1, 1]
116
+ ax4.plot(train_steps, [lr * 1e4 for lr in train_lr], color="#9C27B0", linewidth=2)
117
+ ax4.set_xlabel("Steps")
118
+ ax4.set_ylabel("Learning Rate (×1e-4)")
119
+ ax4.set_title("Learning Rate Schedule (Cosine)")
120
+ ax4.grid(True, alpha=0.3)
121
+
122
+ plt.tight_layout()
123
+ plt.savefig(os.path.join(RESULTS_DIR, "training_curves.png"), dpi=150, bbox_inches="tight")
124
+ print(f"\nSaved: {os.path.join(RESULTS_DIR, 'training_curves.png')}")
125
+ plt.close()
126
+
127
+ # --- FIGURE 2: Loss by Epoch ---
128
+ fig2, ax = plt.subplots(figsize=(10, 5))
129
+ epochs = [entry.get("epoch", 0) for entry in log_history if "loss" in entry and "eval_loss" not in entry]
130
+ ax.plot(epochs, train_losses, color="#2196F3", linewidth=0.8, alpha=0.5)
131
+ if len(train_losses) > window:
132
+ smooth_epochs = epochs[window-1:]
133
+ ax.plot(smooth_epochs, smooth_losses, color="#0D47A1", linewidth=2, label="Smoothed Loss")
134
+ ax.axvline(x=1.0, color="gray", linestyle="--", alpha=0.5, label="Epoch boundary")
135
+ ax.axvline(x=2.0, color="gray", linestyle="--", alpha=0.5)
136
+ ax.set_xlabel("Epoch")
137
+ ax.set_ylabel("Loss")
138
+ ax.set_title("Training Loss by Epoch")
139
+ ax.legend()
140
+ ax.grid(True, alpha=0.3)
141
+ plt.tight_layout()
142
+ plt.savefig(os.path.join(RESULTS_DIR, "loss_by_epoch.png"), dpi=150, bbox_inches="tight")
143
+ print(f"Saved: {os.path.join(RESULTS_DIR, 'loss_by_epoch.png')}")
144
+ plt.close()
145
+
146
+
147
+ # ============================================================
148
+ # PART 2: INFERENCE ON VALIDATION DATA
149
+ # ============================================================
150
+ print("\n" + "=" * 60)
151
+ print("PART 2: Running Inference on Validation Data")
152
+ print("=" * 60)
153
+
154
+ # Load model with adapter
155
+ print("Loading fine-tuned model...")
156
+ model, tokenizer = FastVisionModel.from_pretrained(
157
+ ADAPTER_PATH,
158
+ load_in_4bit=True,
159
+ max_seq_length=2048,
160
+ )
161
+ FastVisionModel.for_inference(model)
162
+ print("Model loaded!")
163
+
164
+ # Load validation data
165
+ val_data = []
166
+ with open(VAL_FILE, "r", encoding="utf-8") as f:
167
+ for line in f:
168
+ val_data.append(json.loads(line.strip()))
169
+
170
+ print(f"Validation samples: {len(val_data)}")
171
+
172
+ # Run inference on 20 samples
173
+ num_samples = min(20, len(val_data))
174
+ results = []
175
+
176
+ for i in range(num_samples):
177
+ sample = val_data[i]
178
+ img_path = sample["images"][0]
179
+ ground_truth = sample["messages"][2]["content"]
180
+ question = sample["messages"][1]["content"].replace("<image>\n", "").replace("<image>", "")
181
+
182
+ # Load image
183
+ try:
184
+ image = Image.open(img_path).convert("RGB")
185
+ image = image.resize((384, 216), Image.LANCZOS)
186
+ except Exception as e:
187
+ print(f" Skipping {img_path}: {e}")
188
+ continue
189
+
190
+ # Build chat messages with image path for processor
191
+ messages = [
192
+ {
193
+ "role": "system",
194
+ "content": [{"type": "text", "text": sample["messages"][0]["content"]}],
195
+ },
196
+ {
197
+ "role": "user",
198
+ "content": [
199
+ {"type": "image", "image": img_path},
200
+ {"type": "text", "text": question},
201
+ ],
202
+ },
203
+ ]
204
+
205
+ # Use processor to handle both text and images
206
+ from qwen_vl_utils import process_vision_info
207
+ input_text = tokenizer.apply_chat_template(
208
+ messages, tokenize=False, add_generation_prompt=True
209
+ )
210
+ image_inputs, _ = process_vision_info(messages)
211
+ inputs = tokenizer(
212
+ text=[input_text],
213
+ images=image_inputs,
214
+ return_tensors="pt",
215
+ padding=True,
216
+ ).to(model.device)
217
+
218
+ # Generate
219
+ with torch.no_grad():
220
+ output_ids = model.generate(
221
+ **inputs,
222
+ max_new_tokens=256,
223
+ temperature=0.7,
224
+ do_sample=True,
225
+ )
226
+
227
+ new_tokens = output_ids[0][inputs["input_ids"].shape[1]:]
228
+ prediction = tokenizer.decode(new_tokens, skip_special_tokens=True)
229
+
230
+ results.append({
231
+ "image": os.path.basename(img_path),
232
+ "question": question,
233
+ "ground_truth": ground_truth,
234
+ "prediction": prediction,
235
+ })
236
+
237
+ print(f"\n--- Sample {i+1}/{num_samples} ---")
238
+ print(f" Image: {os.path.basename(img_path)}")
239
+ print(f" GT: {ground_truth[:120]}...")
240
+ print(f" Pred: {prediction[:120]}...")
241
+
242
+ # Save results
243
+ results_path = os.path.join(RESULTS_DIR, "inference_results.json")
244
+ with open(results_path, "w", encoding="utf-8") as f:
245
+ json.dump(results, f, indent=2, ensure_ascii=False)
246
+ print(f"\nSaved: {results_path}")
247
+
248
+ # ============================================================
249
+ # PART 3: RESULTS COMPARISON FIGURE
250
+ # ============================================================
251
+ print("\n" + "=" * 60)
252
+ print("PART 3: Creating Comparison Visuals")
253
+ print("=" * 60)
254
+
255
+ # Create a comparison figure showing images with GT vs Prediction
256
+ num_vis = min(6, len(results))
257
+ fig3, axes = plt.subplots(2, 3, figsize=(18, 10))
258
+ fig3.suptitle("Inference Results: Ground Truth vs Prediction", fontsize=14, fontweight="bold")
259
+
260
+ for idx in range(num_vis):
261
+ r = results[idx]
262
+ ax = axes[idx // 3][idx % 3]
263
+
264
+ # Load image
265
+ img_path_full = val_data[idx]["images"][0]
266
+ try:
267
+ img = Image.open(img_path_full).convert("RGB")
268
+ ax.imshow(img)
269
+ except:
270
+ ax.text(0.5, 0.5, "Image not found", ha="center", va="center")
271
+
272
+ # Extract just the affordance from GT and prediction
273
+ gt_short = r["ground_truth"][:80]
274
+ pred_short = r["prediction"][:80]
275
+
276
+ ax.set_title(f"GT: {gt_short}...\nPred: {pred_short}...", fontsize=7, wrap=True)
277
+ ax.axis("off")
278
+
279
+ plt.tight_layout()
280
+ plt.savefig(os.path.join(RESULTS_DIR, "inference_comparison.png"), dpi=150, bbox_inches="tight")
281
+ print(f"Saved: {os.path.join(RESULTS_DIR, 'inference_comparison.png')}")
282
+ plt.close()
283
+
284
+ # ============================================================
285
+ # PART 4: SUMMARY STATS
286
+ # ============================================================
287
+ print("\n" + "=" * 60)
288
+ print("TRAINING SUMMARY")
289
+ print("=" * 60)
290
+
291
+ runtime = state["log_history"][-1].get("train_runtime", 0)
292
+ print(f" Model: Qwen3-VL-2B-Instruct")
293
+ print(f" Method: QLoRA 4-bit (rank=16)")
294
+ print(f" Trainable params: 17.4M / 1.52B (1.15%)")
295
+ print(f" Training samples: 2,859")
296
+ print(f" Validation samples: 318")
297
+ print(f" Epochs: 3")
298
+ print(f" Total steps: 2,145")
299
+ print(f" Training time: {runtime/60:.1f} minutes")
300
+ print(f" Initial loss: {train_losses[0]:.4f}")
301
+ print(f" Final loss: {train_losses[-1]:.4f}")
302
+ print(f" Loss reduction: {((train_losses[0] - train_losses[-1]) / train_losses[0] * 100):.1f}%")
303
+ if eval_losses:
304
+ print(f" Best eval loss: {min(eval_losses):.4f}")
305
+ print(f" Final eval loss: {eval_losses[-1]:.4f}")
306
+ print(f" GPU: RTX 3060 Ti (8GB)")
307
+ print(f" Adapter size: saved to output/lora_adapter/")
308
+ print(f"\n Results saved to: {RESULTS_DIR}/")
309
+
310
+ print("\nDone!")
chat_template.jinja ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {%- if messages[0].content is string %}
5
+ {{- messages[0].content }}
6
+ {%- else %}
7
+ {%- for content in messages[0].content %}
8
+ {%- if 'text' in content %}
9
+ {{- content.text }}
10
+ {%- endif %}
11
+ {%- endfor %}
12
+ {%- endif %}
13
+ {{- '\n\n' }}
14
+ {%- endif %}
15
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
16
+ {%- for tool in tools %}
17
+ {{- "\n" }}
18
+ {{- tool | tojson }}
19
+ {%- endfor %}
20
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
21
+ {%- else %}
22
+ {%- if messages[0].role == 'system' %}
23
+ {{- '<|im_start|>system\n' }}
24
+ {%- if messages[0].content is string %}
25
+ {{- messages[0].content }}
26
+ {%- else %}
27
+ {%- for content in messages[0].content %}
28
+ {%- if 'text' in content %}
29
+ {{- content.text }}
30
+ {%- endif %}
31
+ {%- endfor %}
32
+ {%- endif %}
33
+ {{- '<|im_end|>\n' }}
34
+ {%- endif %}
35
+ {%- endif %}
36
+ {%- set image_count = namespace(value=0) %}
37
+ {%- set video_count = namespace(value=0) %}
38
+ {%- for message in messages %}
39
+ {%- if message.role == "user" %}
40
+ {{- '<|im_start|>' + message.role + '\n' }}
41
+ {%- if message.content is string %}
42
+ {{- message.content }}
43
+ {%- else %}
44
+ {%- for content in message.content %}
45
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
46
+ {%- set image_count.value = image_count.value + 1 %}
47
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
48
+ <|vision_start|><|image_pad|><|vision_end|>
49
+ {%- elif content.type == 'video' or 'video' in content %}
50
+ {%- set video_count.value = video_count.value + 1 %}
51
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
52
+ <|vision_start|><|video_pad|><|vision_end|>
53
+ {%- elif 'text' in content %}
54
+ {{- content.text }}
55
+ {%- endif %}
56
+ {%- endfor %}
57
+ {%- endif %}
58
+ {{- '<|im_end|>\n' }}
59
+ {%- elif message.role == "assistant" %}
60
+ {{- '<|im_start|>' + message.role + '\n' }}
61
+ {%- if message.content is string %}
62
+ {{- message.content }}
63
+ {%- else %}
64
+ {%- for content_item in message.content %}
65
+ {%- if 'text' in content_item %}
66
+ {{- content_item.text }}
67
+ {%- endif %}
68
+ {%- endfor %}
69
+ {%- endif %}
70
+ {%- if message.tool_calls %}
71
+ {%- for tool_call in message.tool_calls %}
72
+ {%- if (loop.first and message.content) or (not loop.first) %}
73
+ {{- '\n' }}
74
+ {%- endif %}
75
+ {%- if tool_call.function %}
76
+ {%- set tool_call = tool_call.function %}
77
+ {%- endif %}
78
+ {{- '<tool_call>\n{"name": "' }}
79
+ {{- tool_call.name }}
80
+ {{- '", "arguments": ' }}
81
+ {%- if tool_call.arguments is string %}
82
+ {{- tool_call.arguments }}
83
+ {%- else %}
84
+ {{- tool_call.arguments | tojson }}
85
+ {%- endif %}
86
+ {{- '}\n</tool_call>' }}
87
+ {%- endfor %}
88
+ {%- endif %}
89
+ {{- '<|im_end|>\n' }}
90
+ {%- elif message.role == "tool" %}
91
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
92
+ {{- '<|im_start|>user' }}
93
+ {%- endif %}
94
+ {{- '\n<tool_response>\n' }}
95
+ {%- if message.content is string %}
96
+ {{- message.content }}
97
+ {%- else %}
98
+ {%- for content in message.content %}
99
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
100
+ {%- set image_count.value = image_count.value + 1 %}
101
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
102
+ <|vision_start|><|image_pad|><|vision_end|>
103
+ {%- elif content.type == 'video' or 'video' in content %}
104
+ {%- set video_count.value = video_count.value + 1 %}
105
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
106
+ <|vision_start|><|video_pad|><|vision_end|>
107
+ {%- elif 'text' in content %}
108
+ {{- content.text }}
109
+ {%- endif %}
110
+ {%- endfor %}
111
+ {%- endif %}
112
+ {{- '\n</tool_response>' }}
113
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
114
+ {{- '<|im_end|>\n' }}
115
+ {%- endif %}
116
+ {%- endif %}
117
+ {%- endfor %}
118
+ {%- if add_generation_prompt %}
119
+ {{- '<|im_start|>assistant\n' }}
120
+ {%- endif %}
checkpoints/checkpoint-2000/README.md ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: unsloth/qwen3-vl-2b-instruct-unsloth-bnb-4bit
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:unsloth/qwen3-vl-2b-instruct-unsloth-bnb-4bit
7
+ - lora
8
+ - sft
9
+ - transformers
10
+ - trl
11
+ - unsloth
12
+ ---
13
+
14
+ # Model Card for Model ID
15
+
16
+ <!-- Provide a quick summary of what the model is/does. -->
17
+
18
+
19
+
20
+ ## Model Details
21
+
22
+ ### Model Description
23
+
24
+ <!-- Provide a longer summary of what this model is. -->
25
+
26
+
27
+
28
+ - **Developed by:** [More Information Needed]
29
+ - **Funded by [optional]:** [More Information Needed]
30
+ - **Shared by [optional]:** [More Information Needed]
31
+ - **Model type:** [More Information Needed]
32
+ - **Language(s) (NLP):** [More Information Needed]
33
+ - **License:** [More Information Needed]
34
+ - **Finetuned from model [optional]:** [More Information Needed]
35
+
36
+ ### Model Sources [optional]
37
+
38
+ <!-- Provide the basic links for the model. -->
39
+
40
+ - **Repository:** [More Information Needed]
41
+ - **Paper [optional]:** [More Information Needed]
42
+ - **Demo [optional]:** [More Information Needed]
43
+
44
+ ## Uses
45
+
46
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
47
+
48
+ ### Direct Use
49
+
50
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
51
+
52
+ [More Information Needed]
53
+
54
+ ### Downstream Use [optional]
55
+
56
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
57
+
58
+ [More Information Needed]
59
+
60
+ ### Out-of-Scope Use
61
+
62
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
63
+
64
+ [More Information Needed]
65
+
66
+ ## Bias, Risks, and Limitations
67
+
68
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
69
+
70
+ [More Information Needed]
71
+
72
+ ### Recommendations
73
+
74
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
75
+
76
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
77
+
78
+ ## How to Get Started with the Model
79
+
80
+ Use the code below to get started with the model.
81
+
82
+ [More Information Needed]
83
+
84
+ ## Training Details
85
+
86
+ ### Training Data
87
+
88
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
89
+
90
+ [More Information Needed]
91
+
92
+ ### Training Procedure
93
+
94
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
95
+
96
+ #### Preprocessing [optional]
97
+
98
+ [More Information Needed]
99
+
100
+
101
+ #### Training Hyperparameters
102
+
103
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
104
+
105
+ #### Speeds, Sizes, Times [optional]
106
+
107
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
108
+
109
+ [More Information Needed]
110
+
111
+ ## Evaluation
112
+
113
+ <!-- This section describes the evaluation protocols and provides the results. -->
114
+
115
+ ### Testing Data, Factors & Metrics
116
+
117
+ #### Testing Data
118
+
119
+ <!-- This should link to a Dataset Card if possible. -->
120
+
121
+ [More Information Needed]
122
+
123
+ #### Factors
124
+
125
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
126
+
127
+ [More Information Needed]
128
+
129
+ #### Metrics
130
+
131
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
132
+
133
+ [More Information Needed]
134
+
135
+ ### Results
136
+
137
+ [More Information Needed]
138
+
139
+ #### Summary
140
+
141
+
142
+
143
+ ## Model Examination [optional]
144
+
145
+ <!-- Relevant interpretability work for the model goes here -->
146
+
147
+ [More Information Needed]
148
+
149
+ ## Environmental Impact
150
+
151
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
152
+
153
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
154
+
155
+ - **Hardware Type:** [More Information Needed]
156
+ - **Hours used:** [More Information Needed]
157
+ - **Cloud Provider:** [More Information Needed]
158
+ - **Compute Region:** [More Information Needed]
159
+ - **Carbon Emitted:** [More Information Needed]
160
+
161
+ ## Technical Specifications [optional]
162
+
163
+ ### Model Architecture and Objective
164
+
165
+ [More Information Needed]
166
+
167
+ ### Compute Infrastructure
168
+
169
+ [More Information Needed]
170
+
171
+ #### Hardware
172
+
173
+ [More Information Needed]
174
+
175
+ #### Software
176
+
177
+ [More Information Needed]
178
+
179
+ ## Citation [optional]
180
+
181
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
182
+
183
+ **BibTeX:**
184
+
185
+ [More Information Needed]
186
+
187
+ **APA:**
188
+
189
+ [More Information Needed]
190
+
191
+ ## Glossary [optional]
192
+
193
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
194
+
195
+ [More Information Needed]
196
+
197
+ ## More Information [optional]
198
+
199
+ [More Information Needed]
200
+
201
+ ## Model Card Authors [optional]
202
+
203
+ [More Information Needed]
204
+
205
+ ## Model Card Contact
206
+
207
+ [More Information Needed]
208
+ ### Framework versions
209
+
210
+ - PEFT 0.18.1
checkpoints/checkpoint-2000/adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "Qwen3VLForConditionalGeneration",
7
+ "parent_library": "transformers.models.qwen3_vl.modeling_qwen3_vl",
8
+ "unsloth_fixed": true
9
+ },
10
+ "base_model_name_or_path": "unsloth/qwen3-vl-2b-instruct-unsloth-bnb-4bit",
11
+ "bias": "none",
12
+ "corda_config": null,
13
+ "ensure_weight_tying": false,
14
+ "eva_config": null,
15
+ "exclude_modules": null,
16
+ "fan_in_fan_out": false,
17
+ "inference_mode": true,
18
+ "init_lora_weights": true,
19
+ "layer_replication": null,
20
+ "layers_pattern": null,
21
+ "layers_to_transform": null,
22
+ "loftq_config": {},
23
+ "lora_alpha": 32,
24
+ "lora_bias": false,
25
+ "lora_dropout": 0,
26
+ "megatron_config": null,
27
+ "megatron_core": "megatron.core",
28
+ "modules_to_save": null,
29
+ "peft_type": "LORA",
30
+ "peft_version": "0.18.1",
31
+ "qalora_group_size": 16,
32
+ "r": 16,
33
+ "rank_pattern": {},
34
+ "revision": null,
35
+ "target_modules": [
36
+ "up_proj",
37
+ "o_proj",
38
+ "down_proj",
39
+ "q_proj",
40
+ "gate_proj",
41
+ "k_proj",
42
+ "v_proj"
43
+ ],
44
+ "target_parameters": null,
45
+ "task_type": "CAUSAL_LM",
46
+ "trainable_token_indices": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false
50
+ }
checkpoints/checkpoint-2000/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8766ab2dc24b942396ca5c31190ed853a92763cf5e615f2eb34512d2c94f0ade
3
+ size 69788264
checkpoints/checkpoint-2000/added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
checkpoints/checkpoint-2000/chat_template.jinja ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {%- if messages[0].content is string %}
5
+ {{- messages[0].content }}
6
+ {%- else %}
7
+ {%- for content in messages[0].content %}
8
+ {%- if 'text' in content %}
9
+ {{- content.text }}
10
+ {%- endif %}
11
+ {%- endfor %}
12
+ {%- endif %}
13
+ {{- '\n\n' }}
14
+ {%- endif %}
15
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
16
+ {%- for tool in tools %}
17
+ {{- "\n" }}
18
+ {{- tool | tojson }}
19
+ {%- endfor %}
20
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
21
+ {%- else %}
22
+ {%- if messages[0].role == 'system' %}
23
+ {{- '<|im_start|>system\n' }}
24
+ {%- if messages[0].content is string %}
25
+ {{- messages[0].content }}
26
+ {%- else %}
27
+ {%- for content in messages[0].content %}
28
+ {%- if 'text' in content %}
29
+ {{- content.text }}
30
+ {%- endif %}
31
+ {%- endfor %}
32
+ {%- endif %}
33
+ {{- '<|im_end|>\n' }}
34
+ {%- endif %}
35
+ {%- endif %}
36
+ {%- set image_count = namespace(value=0) %}
37
+ {%- set video_count = namespace(value=0) %}
38
+ {%- for message in messages %}
39
+ {%- if message.role == "user" %}
40
+ {{- '<|im_start|>' + message.role + '\n' }}
41
+ {%- if message.content is string %}
42
+ {{- message.content }}
43
+ {%- else %}
44
+ {%- for content in message.content %}
45
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
46
+ {%- set image_count.value = image_count.value + 1 %}
47
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
48
+ <|vision_start|><|image_pad|><|vision_end|>
49
+ {%- elif content.type == 'video' or 'video' in content %}
50
+ {%- set video_count.value = video_count.value + 1 %}
51
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
52
+ <|vision_start|><|video_pad|><|vision_end|>
53
+ {%- elif 'text' in content %}
54
+ {{- content.text }}
55
+ {%- endif %}
56
+ {%- endfor %}
57
+ {%- endif %}
58
+ {{- '<|im_end|>\n' }}
59
+ {%- elif message.role == "assistant" %}
60
+ {{- '<|im_start|>' + message.role + '\n' }}
61
+ {%- if message.content is string %}
62
+ {{- message.content }}
63
+ {%- else %}
64
+ {%- for content_item in message.content %}
65
+ {%- if 'text' in content_item %}
66
+ {{- content_item.text }}
67
+ {%- endif %}
68
+ {%- endfor %}
69
+ {%- endif %}
70
+ {%- if message.tool_calls %}
71
+ {%- for tool_call in message.tool_calls %}
72
+ {%- if (loop.first and message.content) or (not loop.first) %}
73
+ {{- '\n' }}
74
+ {%- endif %}
75
+ {%- if tool_call.function %}
76
+ {%- set tool_call = tool_call.function %}
77
+ {%- endif %}
78
+ {{- '<tool_call>\n{"name": "' }}
79
+ {{- tool_call.name }}
80
+ {{- '", "arguments": ' }}
81
+ {%- if tool_call.arguments is string %}
82
+ {{- tool_call.arguments }}
83
+ {%- else %}
84
+ {{- tool_call.arguments | tojson }}
85
+ {%- endif %}
86
+ {{- '}\n</tool_call>' }}
87
+ {%- endfor %}
88
+ {%- endif %}
89
+ {{- '<|im_end|>\n' }}
90
+ {%- elif message.role == "tool" %}
91
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
92
+ {{- '<|im_start|>user' }}
93
+ {%- endif %}
94
+ {{- '\n<tool_response>\n' }}
95
+ {%- if message.content is string %}
96
+ {{- message.content }}
97
+ {%- else %}
98
+ {%- for content in message.content %}
99
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
100
+ {%- set image_count.value = image_count.value + 1 %}
101
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
102
+ <|vision_start|><|image_pad|><|vision_end|>
103
+ {%- elif content.type == 'video' or 'video' in content %}
104
+ {%- set video_count.value = video_count.value + 1 %}
105
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
106
+ <|vision_start|><|video_pad|><|vision_end|>
107
+ {%- elif 'text' in content %}
108
+ {{- content.text }}
109
+ {%- endif %}
110
+ {%- endfor %}
111
+ {%- endif %}
112
+ {{- '\n</tool_response>' }}
113
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
114
+ {{- '<|im_end|>\n' }}
115
+ {%- endif %}
116
+ {%- endif %}
117
+ {%- endfor %}
118
+ {%- if add_generation_prompt %}
119
+ {{- '<|im_start|>assistant\n' }}
120
+ {%- endif %}
checkpoints/checkpoint-2000/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
checkpoints/checkpoint-2000/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:381cad2f239dc4e87b6dd3839e181cdfd02bc786c04d914183dd8d037426efa0
3
+ size 35869445
checkpoints/checkpoint-2000/preprocessor_config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "disable_grouping": null,
7
+ "do_center_crop": null,
8
+ "do_convert_rgb": true,
9
+ "do_normalize": true,
10
+ "do_pad": null,
11
+ "do_rescale": true,
12
+ "do_resize": true,
13
+ "image_mean": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "image_processor_type": "Qwen2VLImageProcessorFast",
19
+ "image_std": [
20
+ 0.5,
21
+ 0.5,
22
+ 0.5
23
+ ],
24
+ "input_data_format": null,
25
+ "max_pixels": null,
26
+ "merge_size": 2,
27
+ "min_pixels": null,
28
+ "pad_size": null,
29
+ "patch_size": 16,
30
+ "processor_class": "Qwen3VLProcessor",
31
+ "resample": 3,
32
+ "rescale_factor": 0.00392156862745098,
33
+ "return_tensors": null,
34
+ "size": {
35
+ "longest_edge": 16777216,
36
+ "shortest_edge": 65536
37
+ },
38
+ "temporal_patch_size": 2
39
+ }
checkpoints/checkpoint-2000/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89f2e7b9901fa4b72af37f5845fbfc651b4a741e105cc6dfc15f2793ce6c6f67
3
+ size 14645
checkpoints/checkpoint-2000/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c8a23b366aae2c2a3fd79efe1885b8532ff0e6c1470f4600f7d9e1a767537f3
3
+ size 1465
checkpoints/checkpoint-2000/special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|vision_pad|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
checkpoints/checkpoint-2000/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af560c5e5807192776a9f72a0ea33c9331816d9c59af61e02bdf766f8a2a97fb
3
+ size 11422922
checkpoints/checkpoint-2000/tokenizer_config.json ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ }
213
+ },
214
+ "additional_special_tokens": [
215
+ "<|im_start|>",
216
+ "<|im_end|>",
217
+ "<|object_ref_start|>",
218
+ "<|object_ref_end|>",
219
+ "<|box_start|>",
220
+ "<|box_end|>",
221
+ "<|quad_start|>",
222
+ "<|quad_end|>",
223
+ "<|vision_start|>",
224
+ "<|vision_end|>",
225
+ "<|vision_pad|>",
226
+ "<|image_pad|>",
227
+ "<|video_pad|>"
228
+ ],
229
+ "bos_token": null,
230
+ "clean_up_tokenization_spaces": false,
231
+ "eos_token": "<|im_end|>",
232
+ "errors": "replace",
233
+ "extra_special_tokens": {},
234
+ "model_max_length": 262144,
235
+ "pad_token": "<|vision_pad|>",
236
+ "padding_side": "right",
237
+ "processor_class": "Qwen3VLProcessor",
238
+ "split_special_tokens": false,
239
+ "tokenizer_class": "Qwen2Tokenizer",
240
+ "unk_token": null
241
+ }
checkpoints/checkpoint-2000/trainer_state.json ADDED
@@ -0,0 +1,1514 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 2.7974816369359914,
6
+ "eval_steps": 200,
7
+ "global_step": 2000,
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.013990905911157748,
14
+ "grad_norm": 11.852328300476074,
15
+ "learning_rate": 8.372093023255815e-06,
16
+ "loss": 3.4227,
17
+ "step": 10
18
+ },
19
+ {
20
+ "epoch": 0.027981811822315496,
21
+ "grad_norm": 5.509212017059326,
22
+ "learning_rate": 1.7674418604651163e-05,
23
+ "loss": 3.1068,
24
+ "step": 20
25
+ },
26
+ {
27
+ "epoch": 0.04197271773347324,
28
+ "grad_norm": 3.556685209274292,
29
+ "learning_rate": 2.6976744186046517e-05,
30
+ "loss": 2.3908,
31
+ "step": 30
32
+ },
33
+ {
34
+ "epoch": 0.05596362364463099,
35
+ "grad_norm": 4.118677616119385,
36
+ "learning_rate": 3.627906976744187e-05,
37
+ "loss": 1.5286,
38
+ "step": 40
39
+ },
40
+ {
41
+ "epoch": 0.06995452955578874,
42
+ "grad_norm": 2.5455708503723145,
43
+ "learning_rate": 4.5581395348837214e-05,
44
+ "loss": 0.7724,
45
+ "step": 50
46
+ },
47
+ {
48
+ "epoch": 0.08394543546694648,
49
+ "grad_norm": 1.4716579914093018,
50
+ "learning_rate": 5.488372093023256e-05,
51
+ "loss": 0.3533,
52
+ "step": 60
53
+ },
54
+ {
55
+ "epoch": 0.09793634137810424,
56
+ "grad_norm": 1.154810905456543,
57
+ "learning_rate": 6.418604651162791e-05,
58
+ "loss": 0.2292,
59
+ "step": 70
60
+ },
61
+ {
62
+ "epoch": 0.11192724728926198,
63
+ "grad_norm": 0.8629467487335205,
64
+ "learning_rate": 7.348837209302326e-05,
65
+ "loss": 0.1772,
66
+ "step": 80
67
+ },
68
+ {
69
+ "epoch": 0.1259181532004197,
70
+ "grad_norm": 0.7331057190895081,
71
+ "learning_rate": 8.27906976744186e-05,
72
+ "loss": 0.1643,
73
+ "step": 90
74
+ },
75
+ {
76
+ "epoch": 0.13990905911157747,
77
+ "grad_norm": 0.5298661589622498,
78
+ "learning_rate": 9.209302325581396e-05,
79
+ "loss": 0.1659,
80
+ "step": 100
81
+ },
82
+ {
83
+ "epoch": 0.15389996502273523,
84
+ "grad_norm": 0.6423642635345459,
85
+ "learning_rate": 0.00010139534883720931,
86
+ "loss": 0.1569,
87
+ "step": 110
88
+ },
89
+ {
90
+ "epoch": 0.16789087093389296,
91
+ "grad_norm": 0.7554107904434204,
92
+ "learning_rate": 0.00011069767441860466,
93
+ "loss": 0.1335,
94
+ "step": 120
95
+ },
96
+ {
97
+ "epoch": 0.18188177684505072,
98
+ "grad_norm": 0.6365725994110107,
99
+ "learning_rate": 0.00012,
100
+ "loss": 0.1346,
101
+ "step": 130
102
+ },
103
+ {
104
+ "epoch": 0.19587268275620848,
105
+ "grad_norm": 0.577471137046814,
106
+ "learning_rate": 0.00012930232558139534,
107
+ "loss": 0.1559,
108
+ "step": 140
109
+ },
110
+ {
111
+ "epoch": 0.2098635886673662,
112
+ "grad_norm": 0.6245256066322327,
113
+ "learning_rate": 0.00013860465116279072,
114
+ "loss": 0.1678,
115
+ "step": 150
116
+ },
117
+ {
118
+ "epoch": 0.22385449457852397,
119
+ "grad_norm": 0.5085740089416504,
120
+ "learning_rate": 0.00014790697674418605,
121
+ "loss": 0.162,
122
+ "step": 160
123
+ },
124
+ {
125
+ "epoch": 0.2378454004896817,
126
+ "grad_norm": 0.46424826979637146,
127
+ "learning_rate": 0.0001572093023255814,
128
+ "loss": 0.1328,
129
+ "step": 170
130
+ },
131
+ {
132
+ "epoch": 0.2518363064008394,
133
+ "grad_norm": 0.4451293647289276,
134
+ "learning_rate": 0.00016651162790697673,
135
+ "loss": 0.1528,
136
+ "step": 180
137
+ },
138
+ {
139
+ "epoch": 0.2658272123119972,
140
+ "grad_norm": 0.6359198689460754,
141
+ "learning_rate": 0.0001758139534883721,
142
+ "loss": 0.1334,
143
+ "step": 190
144
+ },
145
+ {
146
+ "epoch": 0.27981811822315494,
147
+ "grad_norm": 0.406089723110199,
148
+ "learning_rate": 0.00018511627906976744,
149
+ "loss": 0.1414,
150
+ "step": 200
151
+ },
152
+ {
153
+ "epoch": 0.27981811822315494,
154
+ "eval_loss": 0.1422451138496399,
155
+ "eval_runtime": 21.5015,
156
+ "eval_samples_per_second": 14.79,
157
+ "eval_steps_per_second": 3.721,
158
+ "step": 200
159
+ },
160
+ {
161
+ "epoch": 0.2938090241343127,
162
+ "grad_norm": 0.4091590642929077,
163
+ "learning_rate": 0.0001944186046511628,
164
+ "loss": 0.1526,
165
+ "step": 210
166
+ },
167
+ {
168
+ "epoch": 0.30779993004547046,
169
+ "grad_norm": 0.325090229511261,
170
+ "learning_rate": 0.000199997880304001,
171
+ "loss": 0.1173,
172
+ "step": 220
173
+ },
174
+ {
175
+ "epoch": 0.3217908359566282,
176
+ "grad_norm": 0.3782133460044861,
177
+ "learning_rate": 0.0001999740347560115,
178
+ "loss": 0.1445,
179
+ "step": 230
180
+ },
181
+ {
182
+ "epoch": 0.3357817418677859,
183
+ "grad_norm": 0.4928087592124939,
184
+ "learning_rate": 0.00019992370037914218,
185
+ "loss": 0.1363,
186
+ "step": 240
187
+ },
188
+ {
189
+ "epoch": 0.3497726477789437,
190
+ "grad_norm": 0.31038427352905273,
191
+ "learning_rate": 0.00019984689050984278,
192
+ "loss": 0.1296,
193
+ "step": 250
194
+ },
195
+ {
196
+ "epoch": 0.36376355369010144,
197
+ "grad_norm": 0.4541214108467102,
198
+ "learning_rate": 0.00019974362549943247,
199
+ "loss": 0.1207,
200
+ "step": 260
201
+ },
202
+ {
203
+ "epoch": 0.3777544596012592,
204
+ "grad_norm": 0.46741530299186707,
205
+ "learning_rate": 0.00019961393270870738,
206
+ "loss": 0.1386,
207
+ "step": 270
208
+ },
209
+ {
210
+ "epoch": 0.39174536551241695,
211
+ "grad_norm": 0.3349354863166809,
212
+ "learning_rate": 0.00019945784650069143,
213
+ "loss": 0.1533,
214
+ "step": 280
215
+ },
216
+ {
217
+ "epoch": 0.40573627142357466,
218
+ "grad_norm": 0.40393367409706116,
219
+ "learning_rate": 0.00019927540823153135,
220
+ "loss": 0.135,
221
+ "step": 290
222
+ },
223
+ {
224
+ "epoch": 0.4197271773347324,
225
+ "grad_norm": 0.34774526953697205,
226
+ "learning_rate": 0.00019906666623953925,
227
+ "loss": 0.1213,
228
+ "step": 300
229
+ },
230
+ {
231
+ "epoch": 0.4337180832458902,
232
+ "grad_norm": 0.35436466336250305,
233
+ "learning_rate": 0.00019883167583238494,
234
+ "loss": 0.1244,
235
+ "step": 310
236
+ },
237
+ {
238
+ "epoch": 0.44770898915704793,
239
+ "grad_norm": 0.3164362609386444,
240
+ "learning_rate": 0.00019857049927244185,
241
+ "loss": 0.1243,
242
+ "step": 320
243
+ },
244
+ {
245
+ "epoch": 0.4616998950682057,
246
+ "grad_norm": 0.3490104675292969,
247
+ "learning_rate": 0.0001982832057602901,
248
+ "loss": 0.1427,
249
+ "step": 330
250
+ },
251
+ {
252
+ "epoch": 0.4756908009793634,
253
+ "grad_norm": 0.4742378294467926,
254
+ "learning_rate": 0.00019796987141638134,
255
+ "loss": 0.1252,
256
+ "step": 340
257
+ },
258
+ {
259
+ "epoch": 0.48968170689052115,
260
+ "grad_norm": 0.33545687794685364,
261
+ "learning_rate": 0.00019763057926087022,
262
+ "loss": 0.1355,
263
+ "step": 350
264
+ },
265
+ {
266
+ "epoch": 0.5036726128016789,
267
+ "grad_norm": 0.4260849058628082,
268
+ "learning_rate": 0.00019726541919161733,
269
+ "loss": 0.1125,
270
+ "step": 360
271
+ },
272
+ {
273
+ "epoch": 0.5176635187128367,
274
+ "grad_norm": 0.4119410514831543,
275
+ "learning_rate": 0.00019687448796037045,
276
+ "loss": 0.122,
277
+ "step": 370
278
+ },
279
+ {
280
+ "epoch": 0.5316544246239944,
281
+ "grad_norm": 0.28887462615966797,
282
+ "learning_rate": 0.0001964578891471292,
283
+ "loss": 0.129,
284
+ "step": 380
285
+ },
286
+ {
287
+ "epoch": 0.5456453305351522,
288
+ "grad_norm": 0.3469299077987671,
289
+ "learning_rate": 0.00019601573313270102,
290
+ "loss": 0.1211,
291
+ "step": 390
292
+ },
293
+ {
294
+ "epoch": 0.5596362364463099,
295
+ "grad_norm": 0.2652361989021301,
296
+ "learning_rate": 0.00019554813706945486,
297
+ "loss": 0.1217,
298
+ "step": 400
299
+ },
300
+ {
301
+ "epoch": 0.5596362364463099,
302
+ "eval_loss": 0.12272346764802933,
303
+ "eval_runtime": 21.4783,
304
+ "eval_samples_per_second": 14.806,
305
+ "eval_steps_per_second": 3.725,
306
+ "step": 400
307
+ },
308
+ {
309
+ "epoch": 0.5736271423574677,
310
+ "grad_norm": 0.4036720395088196,
311
+ "learning_rate": 0.0001950552248502808,
312
+ "loss": 0.1341,
313
+ "step": 410
314
+ },
315
+ {
316
+ "epoch": 0.5876180482686254,
317
+ "grad_norm": 0.4273042380809784,
318
+ "learning_rate": 0.00019453712707576392,
319
+ "loss": 0.1093,
320
+ "step": 420
321
+ },
322
+ {
323
+ "epoch": 0.6016089541797831,
324
+ "grad_norm": 0.3455790877342224,
325
+ "learning_rate": 0.00019399398101958056,
326
+ "loss": 0.1133,
327
+ "step": 430
328
+ },
329
+ {
330
+ "epoch": 0.6155998600909409,
331
+ "grad_norm": 0.2522144019603729,
332
+ "learning_rate": 0.0001934259305921268,
333
+ "loss": 0.1221,
334
+ "step": 440
335
+ },
336
+ {
337
+ "epoch": 0.6295907660020986,
338
+ "grad_norm": 0.21513080596923828,
339
+ "learning_rate": 0.00019283312630238836,
340
+ "loss": 0.1112,
341
+ "step": 450
342
+ },
343
+ {
344
+ "epoch": 0.6435816719132564,
345
+ "grad_norm": 0.2985060214996338,
346
+ "learning_rate": 0.00019221572521806212,
347
+ "loss": 0.1072,
348
+ "step": 460
349
+ },
350
+ {
351
+ "epoch": 0.6575725778244141,
352
+ "grad_norm": 0.23942740261554718,
353
+ "learning_rate": 0.00019157389092394004,
354
+ "loss": 0.113,
355
+ "step": 470
356
+ },
357
+ {
358
+ "epoch": 0.6715634837355718,
359
+ "grad_norm": 0.35044464468955994,
360
+ "learning_rate": 0.00019090779347856606,
361
+ "loss": 0.1186,
362
+ "step": 480
363
+ },
364
+ {
365
+ "epoch": 0.6855543896467297,
366
+ "grad_norm": 0.25626683235168457,
367
+ "learning_rate": 0.00019021760936917804,
368
+ "loss": 0.1156,
369
+ "step": 490
370
+ },
371
+ {
372
+ "epoch": 0.6995452955578874,
373
+ "grad_norm": 0.3051966428756714,
374
+ "learning_rate": 0.00018950352146494606,
375
+ "loss": 0.1166,
376
+ "step": 500
377
+ },
378
+ {
379
+ "epoch": 0.7135362014690452,
380
+ "grad_norm": 0.3047504127025604,
381
+ "learning_rate": 0.00018876571896852005,
382
+ "loss": 0.1155,
383
+ "step": 510
384
+ },
385
+ {
386
+ "epoch": 0.7275271073802029,
387
+ "grad_norm": 0.2766532301902771,
388
+ "learning_rate": 0.00018800439736589924,
389
+ "loss": 0.1144,
390
+ "step": 520
391
+ },
392
+ {
393
+ "epoch": 0.7415180132913606,
394
+ "grad_norm": 0.321286141872406,
395
+ "learning_rate": 0.00018721975837463655,
396
+ "loss": 0.1032,
397
+ "step": 530
398
+ },
399
+ {
400
+ "epoch": 0.7555089192025184,
401
+ "grad_norm": 0.27030113339424133,
402
+ "learning_rate": 0.00018641200989039236,
403
+ "loss": 0.1201,
404
+ "step": 540
405
+ },
406
+ {
407
+ "epoch": 0.7694998251136761,
408
+ "grad_norm": 0.3184170424938202,
409
+ "learning_rate": 0.00018558136593185086,
410
+ "loss": 0.1234,
411
+ "step": 550
412
+ },
413
+ {
414
+ "epoch": 0.7834907310248339,
415
+ "grad_norm": 0.2622183859348297,
416
+ "learning_rate": 0.00018472804658401453,
417
+ "loss": 0.1015,
418
+ "step": 560
419
+ },
420
+ {
421
+ "epoch": 0.7974816369359916,
422
+ "grad_norm": 0.3095245659351349,
423
+ "learning_rate": 0.00018385227793989075,
424
+ "loss": 0.122,
425
+ "step": 570
426
+ },
427
+ {
428
+ "epoch": 0.8114725428471493,
429
+ "grad_norm": 0.4251258969306946,
430
+ "learning_rate": 0.00018295429204058712,
431
+ "loss": 0.1167,
432
+ "step": 580
433
+ },
434
+ {
435
+ "epoch": 0.8254634487583071,
436
+ "grad_norm": 0.31186479330062866,
437
+ "learning_rate": 0.00018203432681383034,
438
+ "loss": 0.1114,
439
+ "step": 590
440
+ },
441
+ {
442
+ "epoch": 0.8394543546694648,
443
+ "grad_norm": 0.2990236282348633,
444
+ "learning_rate": 0.00018109262601092576,
445
+ "loss": 0.1103,
446
+ "step": 600
447
+ },
448
+ {
449
+ "epoch": 0.8394543546694648,
450
+ "eval_loss": 0.11650671809911728,
451
+ "eval_runtime": 21.574,
452
+ "eval_samples_per_second": 14.74,
453
+ "eval_steps_per_second": 3.708,
454
+ "step": 600
455
+ },
456
+ {
457
+ "epoch": 0.8534452605806226,
458
+ "grad_norm": 0.3199589252471924,
459
+ "learning_rate": 0.00018012943914217356,
460
+ "loss": 0.1098,
461
+ "step": 610
462
+ },
463
+ {
464
+ "epoch": 0.8674361664917803,
465
+ "grad_norm": 0.2671171724796295,
466
+ "learning_rate": 0.00017914502141075928,
467
+ "loss": 0.0959,
468
+ "step": 620
469
+ },
470
+ {
471
+ "epoch": 0.881427072402938,
472
+ "grad_norm": 0.371975302696228,
473
+ "learning_rate": 0.00017813963364513607,
474
+ "loss": 0.1089,
475
+ "step": 630
476
+ },
477
+ {
478
+ "epoch": 0.8954179783140959,
479
+ "grad_norm": 0.28194791078567505,
480
+ "learning_rate": 0.00017711354222991606,
481
+ "loss": 0.1009,
482
+ "step": 640
483
+ },
484
+ {
485
+ "epoch": 0.9094088842252536,
486
+ "grad_norm": 0.24068565666675568,
487
+ "learning_rate": 0.0001760670190352903,
488
+ "loss": 0.1195,
489
+ "step": 650
490
+ },
491
+ {
492
+ "epoch": 0.9233997901364114,
493
+ "grad_norm": 0.35747045278549194,
494
+ "learning_rate": 0.00017500034134499423,
495
+ "loss": 0.1237,
496
+ "step": 660
497
+ },
498
+ {
499
+ "epoch": 0.9373906960475691,
500
+ "grad_norm": 0.30066290497779846,
501
+ "learning_rate": 0.00017391379178284002,
502
+ "loss": 0.1231,
503
+ "step": 670
504
+ },
505
+ {
506
+ "epoch": 0.9513816019587268,
507
+ "grad_norm": 0.3015068769454956,
508
+ "learning_rate": 0.0001728076582378329,
509
+ "loss": 0.1,
510
+ "step": 680
511
+ },
512
+ {
513
+ "epoch": 0.9653725078698846,
514
+ "grad_norm": 0.3291875422000885,
515
+ "learning_rate": 0.0001716822337878932,
516
+ "loss": 0.1256,
517
+ "step": 690
518
+ },
519
+ {
520
+ "epoch": 0.9793634137810423,
521
+ "grad_norm": 0.2612892985343933,
522
+ "learning_rate": 0.0001705378166222032,
523
+ "loss": 0.1114,
524
+ "step": 700
525
+ },
526
+ {
527
+ "epoch": 0.9933543196922001,
528
+ "grad_norm": 0.24723578989505768,
529
+ "learning_rate": 0.00016937470996219973,
530
+ "loss": 0.1021,
531
+ "step": 710
532
+ },
533
+ {
534
+ "epoch": 1.006995452955579,
535
+ "grad_norm": 0.21942616999149323,
536
+ "learning_rate": 0.00016819322198123365,
537
+ "loss": 0.1038,
538
+ "step": 720
539
+ },
540
+ {
541
+ "epoch": 1.0209863588667367,
542
+ "grad_norm": 0.2657986581325531,
543
+ "learning_rate": 0.00016699366572291702,
544
+ "loss": 0.0924,
545
+ "step": 730
546
+ },
547
+ {
548
+ "epoch": 1.0349772647778943,
549
+ "grad_norm": 0.3046330213546753,
550
+ "learning_rate": 0.00016577635901818,
551
+ "loss": 0.095,
552
+ "step": 740
553
+ },
554
+ {
555
+ "epoch": 1.0489681706890521,
556
+ "grad_norm": 0.29112890362739563,
557
+ "learning_rate": 0.0001645416244010593,
558
+ "loss": 0.0939,
559
+ "step": 750
560
+ },
561
+ {
562
+ "epoch": 1.06295907660021,
563
+ "grad_norm": 0.2303277999162674,
564
+ "learning_rate": 0.00016328978902324046,
565
+ "loss": 0.0936,
566
+ "step": 760
567
+ },
568
+ {
569
+ "epoch": 1.0769499825113675,
570
+ "grad_norm": 0.21349187195301056,
571
+ "learning_rate": 0.00016202118456737683,
572
+ "loss": 0.1021,
573
+ "step": 770
574
+ },
575
+ {
576
+ "epoch": 1.0909408884225253,
577
+ "grad_norm": 0.2621854245662689,
578
+ "learning_rate": 0.0001607361471592077,
579
+ "loss": 0.0998,
580
+ "step": 780
581
+ },
582
+ {
583
+ "epoch": 1.1049317943336832,
584
+ "grad_norm": 0.21957777440547943,
585
+ "learning_rate": 0.0001594350172784996,
586
+ "loss": 0.1091,
587
+ "step": 790
588
+ },
589
+ {
590
+ "epoch": 1.1189227002448408,
591
+ "grad_norm": 0.27233201265335083,
592
+ "learning_rate": 0.0001581181396688337,
593
+ "loss": 0.093,
594
+ "step": 800
595
+ },
596
+ {
597
+ "epoch": 1.1189227002448408,
598
+ "eval_loss": 0.1152026355266571,
599
+ "eval_runtime": 21.6054,
600
+ "eval_samples_per_second": 14.719,
601
+ "eval_steps_per_second": 3.703,
602
+ "step": 800
603
+ },
604
+ {
605
+ "epoch": 1.1329136061559986,
606
+ "grad_norm": 0.3158034086227417,
607
+ "learning_rate": 0.00015678586324626337,
608
+ "loss": 0.0907,
609
+ "step": 810
610
+ },
611
+ {
612
+ "epoch": 1.1469045120671564,
613
+ "grad_norm": 0.30520495772361755,
614
+ "learning_rate": 0.00015543854100686676,
615
+ "loss": 0.1057,
616
+ "step": 820
617
+ },
618
+ {
619
+ "epoch": 1.1608954179783142,
620
+ "grad_norm": 0.21135452389717102,
621
+ "learning_rate": 0.0001540765299332177,
622
+ "loss": 0.0929,
623
+ "step": 830
624
+ },
625
+ {
626
+ "epoch": 1.1748863238894718,
627
+ "grad_norm": 0.32276666164398193,
628
+ "learning_rate": 0.00015270019089980077,
629
+ "loss": 0.1085,
630
+ "step": 840
631
+ },
632
+ {
633
+ "epoch": 1.1888772298006296,
634
+ "grad_norm": 0.27095136046409607,
635
+ "learning_rate": 0.00015130988857739498,
636
+ "loss": 0.0984,
637
+ "step": 850
638
+ },
639
+ {
640
+ "epoch": 1.2028681357117874,
641
+ "grad_norm": 0.4224928915500641,
642
+ "learning_rate": 0.0001499059913364517,
643
+ "loss": 0.1117,
644
+ "step": 860
645
+ },
646
+ {
647
+ "epoch": 1.216859041622945,
648
+ "grad_norm": 0.24559757113456726,
649
+ "learning_rate": 0.00014848887114949234,
650
+ "loss": 0.101,
651
+ "step": 870
652
+ },
653
+ {
654
+ "epoch": 1.2308499475341028,
655
+ "grad_norm": 0.2625027894973755,
656
+ "learning_rate": 0.00014705890349255149,
657
+ "loss": 0.1113,
658
+ "step": 880
659
+ },
660
+ {
661
+ "epoch": 1.2448408534452606,
662
+ "grad_norm": 0.31155043840408325,
663
+ "learning_rate": 0.00014561646724569198,
664
+ "loss": 0.0903,
665
+ "step": 890
666
+ },
667
+ {
668
+ "epoch": 1.2588317593564184,
669
+ "grad_norm": 0.2001536637544632,
670
+ "learning_rate": 0.00014416194459261785,
671
+ "loss": 0.123,
672
+ "step": 900
673
+ },
674
+ {
675
+ "epoch": 1.272822665267576,
676
+ "grad_norm": 0.23669183254241943,
677
+ "learning_rate": 0.00014269572091941214,
678
+ "loss": 0.109,
679
+ "step": 910
680
+ },
681
+ {
682
+ "epoch": 1.2868135711787339,
683
+ "grad_norm": 0.2512431740760803,
684
+ "learning_rate": 0.00014121818471242608,
685
+ "loss": 0.1022,
686
+ "step": 920
687
+ },
688
+ {
689
+ "epoch": 1.3008044770898914,
690
+ "grad_norm": 0.26644250750541687,
691
+ "learning_rate": 0.00013972972745534686,
692
+ "loss": 0.0991,
693
+ "step": 930
694
+ },
695
+ {
696
+ "epoch": 1.3147953830010493,
697
+ "grad_norm": 0.24515704810619354,
698
+ "learning_rate": 0.0001382307435254713,
699
+ "loss": 0.1002,
700
+ "step": 940
701
+ },
702
+ {
703
+ "epoch": 1.328786288912207,
704
+ "grad_norm": 0.2648073732852936,
705
+ "learning_rate": 0.0001367216300892127,
706
+ "loss": 0.1074,
707
+ "step": 950
708
+ },
709
+ {
710
+ "epoch": 1.3427771948233649,
711
+ "grad_norm": 0.2987382411956787,
712
+ "learning_rate": 0.00013520278699686897,
713
+ "loss": 0.1017,
714
+ "step": 960
715
+ },
716
+ {
717
+ "epoch": 1.3567681007345227,
718
+ "grad_norm": 0.22436612844467163,
719
+ "learning_rate": 0.00013367461667667923,
720
+ "loss": 0.0923,
721
+ "step": 970
722
+ },
723
+ {
724
+ "epoch": 1.3707590066456803,
725
+ "grad_norm": 0.6144154667854309,
726
+ "learning_rate": 0.00013213752402819773,
727
+ "loss": 0.1021,
728
+ "step": 980
729
+ },
730
+ {
731
+ "epoch": 1.384749912556838,
732
+ "grad_norm": 0.21033185720443726,
733
+ "learning_rate": 0.00013059191631501288,
734
+ "loss": 0.1136,
735
+ "step": 990
736
+ },
737
+ {
738
+ "epoch": 1.3987408184679957,
739
+ "grad_norm": 0.3320418894290924,
740
+ "learning_rate": 0.00012903820305683973,
741
+ "loss": 0.1065,
742
+ "step": 1000
743
+ },
744
+ {
745
+ "epoch": 1.3987408184679957,
746
+ "eval_loss": 0.10766011476516724,
747
+ "eval_runtime": 21.6633,
748
+ "eval_samples_per_second": 14.679,
749
+ "eval_steps_per_second": 3.693,
750
+ "step": 1000
751
+ },
752
+ {
753
+ "epoch": 1.4127317243791535,
754
+ "grad_norm": 0.3217187523841858,
755
+ "learning_rate": 0.00012747679592101498,
756
+ "loss": 0.1025,
757
+ "step": 1010
758
+ },
759
+ {
760
+ "epoch": 1.4267226302903113,
761
+ "grad_norm": 0.19164179265499115,
762
+ "learning_rate": 0.00012590810861342266,
763
+ "loss": 0.0903,
764
+ "step": 1020
765
+ },
766
+ {
767
+ "epoch": 1.4407135362014691,
768
+ "grad_norm": 0.30840256810188293,
769
+ "learning_rate": 0.00012433255676888,
770
+ "loss": 0.0895,
771
+ "step": 1030
772
+ },
773
+ {
774
+ "epoch": 1.4547044421126267,
775
+ "grad_norm": 0.25482040643692017,
776
+ "learning_rate": 0.00012275055784101178,
777
+ "loss": 0.094,
778
+ "step": 1040
779
+ },
780
+ {
781
+ "epoch": 1.4686953480237845,
782
+ "grad_norm": 0.22336170077323914,
783
+ "learning_rate": 0.00012116253099164334,
784
+ "loss": 0.0907,
785
+ "step": 1050
786
+ },
787
+ {
788
+ "epoch": 1.4826862539349424,
789
+ "grad_norm": 0.3286293148994446,
790
+ "learning_rate": 0.00011956889697974045,
791
+ "loss": 0.1058,
792
+ "step": 1060
793
+ },
794
+ {
795
+ "epoch": 1.4966771598461,
796
+ "grad_norm": 0.28686946630477905,
797
+ "learning_rate": 0.00011797007804992633,
798
+ "loss": 0.1009,
799
+ "step": 1070
800
+ },
801
+ {
802
+ "epoch": 1.5106680657572578,
803
+ "grad_norm": 0.2923101782798767,
804
+ "learning_rate": 0.00011636649782060496,
805
+ "loss": 0.0993,
806
+ "step": 1080
807
+ },
808
+ {
809
+ "epoch": 1.5246589716684156,
810
+ "grad_norm": 0.15968987345695496,
811
+ "learning_rate": 0.00011475858117172034,
812
+ "loss": 0.0866,
813
+ "step": 1090
814
+ },
815
+ {
816
+ "epoch": 1.5386498775795734,
817
+ "grad_norm": 0.2587738037109375,
818
+ "learning_rate": 0.00011314675413218156,
819
+ "loss": 0.0874,
820
+ "step": 1100
821
+ },
822
+ {
823
+ "epoch": 1.552640783490731,
824
+ "grad_norm": 0.2577781081199646,
825
+ "learning_rate": 0.00011153144376698347,
826
+ "loss": 0.0923,
827
+ "step": 1110
828
+ },
829
+ {
830
+ "epoch": 1.5666316894018888,
831
+ "grad_norm": 0.27181577682495117,
832
+ "learning_rate": 0.00010991307806405269,
833
+ "loss": 0.1007,
834
+ "step": 1120
835
+ },
836
+ {
837
+ "epoch": 1.5806225953130464,
838
+ "grad_norm": 0.19265908002853394,
839
+ "learning_rate": 0.00010829208582084915,
840
+ "loss": 0.0997,
841
+ "step": 1130
842
+ },
843
+ {
844
+ "epoch": 1.5946135012242042,
845
+ "grad_norm": 0.21604153513908386,
846
+ "learning_rate": 0.0001066688965307534,
847
+ "loss": 0.0954,
848
+ "step": 1140
849
+ },
850
+ {
851
+ "epoch": 1.608604407135362,
852
+ "grad_norm": 0.18990111351013184,
853
+ "learning_rate": 0.00010504394026926902,
854
+ "loss": 0.0976,
855
+ "step": 1150
856
+ },
857
+ {
858
+ "epoch": 1.6225953130465198,
859
+ "grad_norm": 0.28930869698524475,
860
+ "learning_rate": 0.00010341764758007118,
861
+ "loss": 0.1064,
862
+ "step": 1160
863
+ },
864
+ {
865
+ "epoch": 1.6365862189576776,
866
+ "grad_norm": 0.3197149634361267,
867
+ "learning_rate": 0.0001017904493609311,
868
+ "loss": 0.0999,
869
+ "step": 1170
870
+ },
871
+ {
872
+ "epoch": 1.6505771248688352,
873
+ "grad_norm": 0.3212111294269562,
874
+ "learning_rate": 0.0001001627767495465,
875
+ "loss": 0.092,
876
+ "step": 1180
877
+ },
878
+ {
879
+ "epoch": 1.664568030779993,
880
+ "grad_norm": 0.1536320447921753,
881
+ "learning_rate": 9.853506100930875e-05,
882
+ "loss": 0.0979,
883
+ "step": 1190
884
+ },
885
+ {
886
+ "epoch": 1.6785589366911506,
887
+ "grad_norm": 0.3106030821800232,
888
+ "learning_rate": 9.690773341503649e-05,
889
+ "loss": 0.0845,
890
+ "step": 1200
891
+ },
892
+ {
893
+ "epoch": 1.6785589366911506,
894
+ "eval_loss": 0.10427355021238327,
895
+ "eval_runtime": 22.3655,
896
+ "eval_samples_per_second": 14.218,
897
+ "eval_steps_per_second": 3.577,
898
+ "step": 1200
899
+ },
900
+ {
901
+ "epoch": 1.6925498426023085,
902
+ "grad_norm": 0.29129135608673096,
903
+ "learning_rate": 9.528122513870631e-05,
904
+ "loss": 0.0981,
905
+ "step": 1210
906
+ },
907
+ {
908
+ "epoch": 1.7065407485134663,
909
+ "grad_norm": 0.24254217743873596,
910
+ "learning_rate": 9.365596713521077e-05,
911
+ "loss": 0.0976,
912
+ "step": 1220
913
+ },
914
+ {
915
+ "epoch": 1.720531654424624,
916
+ "grad_norm": 0.34802696108818054,
917
+ "learning_rate": 9.203239002817377e-05,
918
+ "loss": 0.0916,
919
+ "step": 1230
920
+ },
921
+ {
922
+ "epoch": 1.734522560335782,
923
+ "grad_norm": 0.2737961411476135,
924
+ "learning_rate": 9.041092399585368e-05,
925
+ "loss": 0.0983,
926
+ "step": 1240
927
+ },
928
+ {
929
+ "epoch": 1.7485134662469395,
930
+ "grad_norm": 0.2548612654209137,
931
+ "learning_rate": 8.879199865716479e-05,
932
+ "loss": 0.0903,
933
+ "step": 1250
934
+ },
935
+ {
936
+ "epoch": 1.762504372158097,
937
+ "grad_norm": 0.276997834444046,
938
+ "learning_rate": 8.717604295784657e-05,
939
+ "loss": 0.099,
940
+ "step": 1260
941
+ },
942
+ {
943
+ "epoch": 1.776495278069255,
944
+ "grad_norm": 0.27574673295021057,
945
+ "learning_rate": 8.556348505681147e-05,
946
+ "loss": 0.0935,
947
+ "step": 1270
948
+ },
949
+ {
950
+ "epoch": 1.7904861839804127,
951
+ "grad_norm": 0.27950429916381836,
952
+ "learning_rate": 8.395475221270124e-05,
953
+ "loss": 0.1004,
954
+ "step": 1280
955
+ },
956
+ {
957
+ "epoch": 1.8044770898915705,
958
+ "grad_norm": 0.3705288767814636,
959
+ "learning_rate": 8.235027067068175e-05,
960
+ "loss": 0.1005,
961
+ "step": 1290
962
+ },
963
+ {
964
+ "epoch": 1.8184679958027283,
965
+ "grad_norm": 0.23482586443424225,
966
+ "learning_rate": 8.075046554950612e-05,
967
+ "loss": 0.0952,
968
+ "step": 1300
969
+ },
970
+ {
971
+ "epoch": 1.832458901713886,
972
+ "grad_norm": 0.2208295315504074,
973
+ "learning_rate": 7.91557607288767e-05,
974
+ "loss": 0.095,
975
+ "step": 1310
976
+ },
977
+ {
978
+ "epoch": 1.8464498076250437,
979
+ "grad_norm": 0.3105419874191284,
980
+ "learning_rate": 7.756657873713513e-05,
981
+ "loss": 0.0817,
982
+ "step": 1320
983
+ },
984
+ {
985
+ "epoch": 1.8604407135362013,
986
+ "grad_norm": 0.2837795615196228,
987
+ "learning_rate": 7.598334063931032e-05,
988
+ "loss": 0.0961,
989
+ "step": 1330
990
+ },
991
+ {
992
+ "epoch": 1.8744316194473591,
993
+ "grad_norm": 0.25267350673675537,
994
+ "learning_rate": 7.440646592555442e-05,
995
+ "loss": 0.0954,
996
+ "step": 1340
997
+ },
998
+ {
999
+ "epoch": 1.888422525358517,
1000
+ "grad_norm": 0.23757292330265045,
1001
+ "learning_rate": 7.28363723999959e-05,
1002
+ "loss": 0.0766,
1003
+ "step": 1350
1004
+ },
1005
+ {
1006
+ "epoch": 1.9024134312696748,
1007
+ "grad_norm": 0.27169138193130493,
1008
+ "learning_rate": 7.127347607003929e-05,
1009
+ "loss": 0.0879,
1010
+ "step": 1360
1011
+ },
1012
+ {
1013
+ "epoch": 1.9164043371808326,
1014
+ "grad_norm": 0.2501109540462494,
1015
+ "learning_rate": 6.971819103614118e-05,
1016
+ "loss": 0.0881,
1017
+ "step": 1370
1018
+ },
1019
+ {
1020
+ "epoch": 1.9303952430919902,
1021
+ "grad_norm": 0.2925432324409485,
1022
+ "learning_rate": 6.81709293820914e-05,
1023
+ "loss": 0.0927,
1024
+ "step": 1380
1025
+ },
1026
+ {
1027
+ "epoch": 1.944386149003148,
1028
+ "grad_norm": 0.29960620403289795,
1029
+ "learning_rate": 6.663210106582838e-05,
1030
+ "loss": 0.1028,
1031
+ "step": 1390
1032
+ },
1033
+ {
1034
+ "epoch": 1.9583770549143056,
1035
+ "grad_norm": 0.28269627690315247,
1036
+ "learning_rate": 6.510211381081794e-05,
1037
+ "loss": 0.0961,
1038
+ "step": 1400
1039
+ },
1040
+ {
1041
+ "epoch": 1.9583770549143056,
1042
+ "eval_loss": 0.10136425495147705,
1043
+ "eval_runtime": 22.0658,
1044
+ "eval_samples_per_second": 14.411,
1045
+ "eval_steps_per_second": 3.626,
1046
+ "step": 1400
1047
+ },
1048
+ {
1049
+ "epoch": 1.9723679608254634,
1050
+ "grad_norm": 0.261138379573822,
1051
+ "learning_rate": 6.358137299802416e-05,
1052
+ "loss": 0.0869,
1053
+ "step": 1410
1054
+ },
1055
+ {
1056
+ "epoch": 1.9863588667366212,
1057
+ "grad_norm": 0.2551378309726715,
1058
+ "learning_rate": 6.207028155850062e-05,
1059
+ "loss": 0.1001,
1060
+ "step": 1420
1061
+ },
1062
+ {
1063
+ "epoch": 2.0,
1064
+ "grad_norm": 0.26610472798347473,
1065
+ "learning_rate": 6.0569239866631124e-05,
1066
+ "loss": 0.1051,
1067
+ "step": 1430
1068
+ },
1069
+ {
1070
+ "epoch": 2.013990905911158,
1071
+ "grad_norm": 0.3179965317249298,
1072
+ "learning_rate": 5.90786456340477e-05,
1073
+ "loss": 0.0866,
1074
+ "step": 1440
1075
+ },
1076
+ {
1077
+ "epoch": 2.0279818118223156,
1078
+ "grad_norm": 0.21667960286140442,
1079
+ "learning_rate": 5.759889380425393e-05,
1080
+ "loss": 0.0839,
1081
+ "step": 1450
1082
+ },
1083
+ {
1084
+ "epoch": 2.0419727177334734,
1085
+ "grad_norm": 0.26058515906333923,
1086
+ "learning_rate": 5.613037644798196e-05,
1087
+ "loss": 0.0659,
1088
+ "step": 1460
1089
+ },
1090
+ {
1091
+ "epoch": 2.055963623644631,
1092
+ "grad_norm": 0.2897161841392517,
1093
+ "learning_rate": 5.467348265931063e-05,
1094
+ "loss": 0.0785,
1095
+ "step": 1470
1096
+ },
1097
+ {
1098
+ "epoch": 2.0699545295557886,
1099
+ "grad_norm": 0.24778111279010773,
1100
+ "learning_rate": 5.3228598452572084e-05,
1101
+ "loss": 0.0743,
1102
+ "step": 1480
1103
+ },
1104
+ {
1105
+ "epoch": 2.0839454354669464,
1106
+ "grad_norm": 0.2585526704788208,
1107
+ "learning_rate": 5.179610666007475e-05,
1108
+ "loss": 0.0844,
1109
+ "step": 1490
1110
+ },
1111
+ {
1112
+ "epoch": 2.0979363413781043,
1113
+ "grad_norm": 0.27612507343292236,
1114
+ "learning_rate": 5.037638683066903e-05,
1115
+ "loss": 0.0978,
1116
+ "step": 1500
1117
+ },
1118
+ {
1119
+ "epoch": 2.111927247289262,
1120
+ "grad_norm": 0.2550652325153351,
1121
+ "learning_rate": 4.896981512918325e-05,
1122
+ "loss": 0.0788,
1123
+ "step": 1510
1124
+ },
1125
+ {
1126
+ "epoch": 2.12591815320042,
1127
+ "grad_norm": 0.33637735247612,
1128
+ "learning_rate": 4.757676423675601e-05,
1129
+ "loss": 0.0833,
1130
+ "step": 1520
1131
+ },
1132
+ {
1133
+ "epoch": 2.1399090591115772,
1134
+ "grad_norm": 0.28613343834877014,
1135
+ "learning_rate": 4.619760325209184e-05,
1136
+ "loss": 0.0786,
1137
+ "step": 1530
1138
+ },
1139
+ {
1140
+ "epoch": 2.153899965022735,
1141
+ "grad_norm": 0.22645096480846405,
1142
+ "learning_rate": 4.483269759366569e-05,
1143
+ "loss": 0.0726,
1144
+ "step": 1540
1145
+ },
1146
+ {
1147
+ "epoch": 2.167890870933893,
1148
+ "grad_norm": 0.2636771500110626,
1149
+ "learning_rate": 4.348240890290289e-05,
1150
+ "loss": 0.0794,
1151
+ "step": 1550
1152
+ },
1153
+ {
1154
+ "epoch": 2.1818817768450507,
1155
+ "grad_norm": 0.312181293964386,
1156
+ "learning_rate": 4.214709494835962e-05,
1157
+ "loss": 0.077,
1158
+ "step": 1560
1159
+ },
1160
+ {
1161
+ "epoch": 2.1958726827562085,
1162
+ "grad_norm": 0.32286760210990906,
1163
+ "learning_rate": 4.0827109530929595e-05,
1164
+ "loss": 0.0798,
1165
+ "step": 1570
1166
+ },
1167
+ {
1168
+ "epoch": 2.2098635886673663,
1169
+ "grad_norm": 0.3038155138492584,
1170
+ "learning_rate": 3.952280239010192e-05,
1171
+ "loss": 0.0802,
1172
+ "step": 1580
1173
+ },
1174
+ {
1175
+ "epoch": 2.223854494578524,
1176
+ "grad_norm": 0.28648459911346436,
1177
+ "learning_rate": 3.8234519111295365e-05,
1178
+ "loss": 0.0833,
1179
+ "step": 1590
1180
+ },
1181
+ {
1182
+ "epoch": 2.2378454004896815,
1183
+ "grad_norm": 0.32507434487342834,
1184
+ "learning_rate": 3.6962601034292766e-05,
1185
+ "loss": 0.076,
1186
+ "step": 1600
1187
+ },
1188
+ {
1189
+ "epoch": 2.2378454004896815,
1190
+ "eval_loss": 0.09979136288166046,
1191
+ "eval_runtime": 22.3104,
1192
+ "eval_samples_per_second": 14.253,
1193
+ "eval_steps_per_second": 3.586,
1194
+ "step": 1600
1195
+ },
1196
+ {
1197
+ "epoch": 2.2518363064008393,
1198
+ "grad_norm": 0.25779277086257935,
1199
+ "learning_rate": 3.570738516280092e-05,
1200
+ "loss": 0.0798,
1201
+ "step": 1610
1202
+ },
1203
+ {
1204
+ "epoch": 2.265827212311997,
1205
+ "grad_norm": 0.27955761551856995,
1206
+ "learning_rate": 3.446920407515887e-05,
1207
+ "loss": 0.0758,
1208
+ "step": 1620
1209
+ },
1210
+ {
1211
+ "epoch": 2.279818118223155,
1212
+ "grad_norm": 0.3353288471698761,
1213
+ "learning_rate": 3.3248385836218977e-05,
1214
+ "loss": 0.0803,
1215
+ "step": 1630
1216
+ },
1217
+ {
1218
+ "epoch": 2.2938090241343128,
1219
+ "grad_norm": 0.2533150613307953,
1220
+ "learning_rate": 3.2045253910423864e-05,
1221
+ "loss": 0.0754,
1222
+ "step": 1640
1223
+ },
1224
+ {
1225
+ "epoch": 2.3077999300454706,
1226
+ "grad_norm": 0.30213606357574463,
1227
+ "learning_rate": 3.086012707610209e-05,
1228
+ "loss": 0.0726,
1229
+ "step": 1650
1230
+ },
1231
+ {
1232
+ "epoch": 2.3217908359566284,
1233
+ "grad_norm": 0.3189963400363922,
1234
+ "learning_rate": 2.9693319341005633e-05,
1235
+ "loss": 0.0798,
1236
+ "step": 1660
1237
+ },
1238
+ {
1239
+ "epoch": 2.3357817418677858,
1240
+ "grad_norm": 0.33093076944351196,
1241
+ "learning_rate": 2.8545139859111446e-05,
1242
+ "loss": 0.0719,
1243
+ "step": 1670
1244
+ },
1245
+ {
1246
+ "epoch": 2.3497726477789436,
1247
+ "grad_norm": 0.25722455978393555,
1248
+ "learning_rate": 2.7415892848708725e-05,
1249
+ "loss": 0.069,
1250
+ "step": 1680
1251
+ },
1252
+ {
1253
+ "epoch": 2.3637635536901014,
1254
+ "grad_norm": 0.30695757269859314,
1255
+ "learning_rate": 2.630587751179422e-05,
1256
+ "loss": 0.0822,
1257
+ "step": 1690
1258
+ },
1259
+ {
1260
+ "epoch": 2.377754459601259,
1261
+ "grad_norm": 0.30474889278411865,
1262
+ "learning_rate": 2.5215387954796555e-05,
1263
+ "loss": 0.0744,
1264
+ "step": 1700
1265
+ },
1266
+ {
1267
+ "epoch": 2.391745365512417,
1268
+ "grad_norm": 0.2297676056623459,
1269
+ "learning_rate": 2.414471311065053e-05,
1270
+ "loss": 0.0695,
1271
+ "step": 1710
1272
+ },
1273
+ {
1274
+ "epoch": 2.405736271423575,
1275
+ "grad_norm": 0.4082636535167694,
1276
+ "learning_rate": 2.3094136662242405e-05,
1277
+ "loss": 0.0792,
1278
+ "step": 1720
1279
+ },
1280
+ {
1281
+ "epoch": 2.4197271773347326,
1282
+ "grad_norm": 0.3242763876914978,
1283
+ "learning_rate": 2.2063936967246136e-05,
1284
+ "loss": 0.0823,
1285
+ "step": 1730
1286
+ },
1287
+ {
1288
+ "epoch": 2.43371808324589,
1289
+ "grad_norm": 0.28933578729629517,
1290
+ "learning_rate": 2.1054386984370434e-05,
1291
+ "loss": 0.0768,
1292
+ "step": 1740
1293
+ },
1294
+ {
1295
+ "epoch": 2.447708989157048,
1296
+ "grad_norm": 0.3418210744857788,
1297
+ "learning_rate": 2.006575420103648e-05,
1298
+ "loss": 0.0729,
1299
+ "step": 1750
1300
+ },
1301
+ {
1302
+ "epoch": 2.4616998950682056,
1303
+ "grad_norm": 0.33131641149520874,
1304
+ "learning_rate": 1.9098300562505266e-05,
1305
+ "loss": 0.0851,
1306
+ "step": 1760
1307
+ },
1308
+ {
1309
+ "epoch": 2.4756908009793634,
1310
+ "grad_norm": 0.2488657683134079,
1311
+ "learning_rate": 1.815228240247323e-05,
1312
+ "loss": 0.0703,
1313
+ "step": 1770
1314
+ },
1315
+ {
1316
+ "epoch": 2.4896817068905213,
1317
+ "grad_norm": 0.2939601540565491,
1318
+ "learning_rate": 1.7227950375154912e-05,
1319
+ "loss": 0.068,
1320
+ "step": 1780
1321
+ },
1322
+ {
1323
+ "epoch": 2.5036726128016786,
1324
+ "grad_norm": 0.2726001441478729,
1325
+ "learning_rate": 1.6325549388870365e-05,
1326
+ "loss": 0.0673,
1327
+ "step": 1790
1328
+ },
1329
+ {
1330
+ "epoch": 2.517663518712837,
1331
+ "grad_norm": 0.2877500653266907,
1332
+ "learning_rate": 1.5445318541154942e-05,
1333
+ "loss": 0.0722,
1334
+ "step": 1800
1335
+ },
1336
+ {
1337
+ "epoch": 2.517663518712837,
1338
+ "eval_loss": 0.09834001958370209,
1339
+ "eval_runtime": 21.9639,
1340
+ "eval_samples_per_second": 14.478,
1341
+ "eval_steps_per_second": 3.642,
1342
+ "step": 1800
1343
+ },
1344
+ {
1345
+ "epoch": 2.5316544246239943,
1346
+ "grad_norm": 0.29231616854667664,
1347
+ "learning_rate": 1.458749105540863e-05,
1348
+ "loss": 0.0809,
1349
+ "step": 1810
1350
+ },
1351
+ {
1352
+ "epoch": 2.545645330535152,
1353
+ "grad_norm": 0.3287057876586914,
1354
+ "learning_rate": 1.3752294219102025e-05,
1355
+ "loss": 0.0666,
1356
+ "step": 1820
1357
+ },
1358
+ {
1359
+ "epoch": 2.55963623644631,
1360
+ "grad_norm": 0.32760322093963623,
1361
+ "learning_rate": 1.2939949323554668e-05,
1362
+ "loss": 0.0773,
1363
+ "step": 1830
1364
+ },
1365
+ {
1366
+ "epoch": 2.5736271423574677,
1367
+ "grad_norm": 0.3478274643421173,
1368
+ "learning_rate": 1.2150671605302566e-05,
1369
+ "loss": 0.0777,
1370
+ "step": 1840
1371
+ },
1372
+ {
1373
+ "epoch": 2.5876180482686255,
1374
+ "grad_norm": 0.29048407077789307,
1375
+ "learning_rate": 1.1384670189069635e-05,
1376
+ "loss": 0.078,
1377
+ "step": 1850
1378
+ },
1379
+ {
1380
+ "epoch": 2.601608954179783,
1381
+ "grad_norm": 0.36669981479644775,
1382
+ "learning_rate": 1.0642148032358645e-05,
1383
+ "loss": 0.084,
1384
+ "step": 1860
1385
+ },
1386
+ {
1387
+ "epoch": 2.615599860090941,
1388
+ "grad_norm": 0.3382461667060852,
1389
+ "learning_rate": 9.923301871676227e-06,
1390
+ "loss": 0.0758,
1391
+ "step": 1870
1392
+ },
1393
+ {
1394
+ "epoch": 2.6295907660020985,
1395
+ "grad_norm": 0.3543117344379425,
1396
+ "learning_rate": 9.228322170406056e-06,
1397
+ "loss": 0.0665,
1398
+ "step": 1880
1399
+ },
1400
+ {
1401
+ "epoch": 2.6435816719132563,
1402
+ "grad_norm": 0.4150249660015106,
1403
+ "learning_rate": 8.55739306834431e-06,
1404
+ "loss": 0.0782,
1405
+ "step": 1890
1406
+ },
1407
+ {
1408
+ "epoch": 2.657572577824414,
1409
+ "grad_norm": 0.2844158113002777,
1410
+ "learning_rate": 7.910692332910452e-06,
1411
+ "loss": 0.0723,
1412
+ "step": 1900
1413
+ },
1414
+ {
1415
+ "epoch": 2.671563483735572,
1416
+ "grad_norm": 0.39910125732421875,
1417
+ "learning_rate": 7.288391312046583e-06,
1418
+ "loss": 0.0731,
1419
+ "step": 1910
1420
+ },
1421
+ {
1422
+ "epoch": 2.6855543896467298,
1423
+ "grad_norm": 0.2358187735080719,
1424
+ "learning_rate": 6.690654888817538e-06,
1425
+ "loss": 0.0697,
1426
+ "step": 1920
1427
+ },
1428
+ {
1429
+ "epoch": 2.699545295557887,
1430
+ "grad_norm": 0.3523266017436981,
1431
+ "learning_rate": 6.117641437723931e-06,
1432
+ "loss": 0.0781,
1433
+ "step": 1930
1434
+ },
1435
+ {
1436
+ "epoch": 2.7135362014690454,
1437
+ "grad_norm": 0.3880462348461151,
1438
+ "learning_rate": 5.569502782739766e-06,
1439
+ "loss": 0.0718,
1440
+ "step": 1940
1441
+ },
1442
+ {
1443
+ "epoch": 2.7275271073802028,
1444
+ "grad_norm": 0.3129269778728485,
1445
+ "learning_rate": 5.046384157085537e-06,
1446
+ "loss": 0.0679,
1447
+ "step": 1950
1448
+ },
1449
+ {
1450
+ "epoch": 2.7415180132913606,
1451
+ "grad_norm": 0.33428144454956055,
1452
+ "learning_rate": 4.548424164747667e-06,
1453
+ "loss": 0.069,
1454
+ "step": 1960
1455
+ },
1456
+ {
1457
+ "epoch": 2.7555089192025184,
1458
+ "grad_norm": 0.30948323011398315,
1459
+ "learning_rate": 4.075754743754478e-06,
1460
+ "loss": 0.0625,
1461
+ "step": 1970
1462
+ },
1463
+ {
1464
+ "epoch": 2.769499825113676,
1465
+ "grad_norm": 0.23879970610141754,
1466
+ "learning_rate": 3.6285011312181873e-06,
1467
+ "loss": 0.0801,
1468
+ "step": 1980
1469
+ },
1470
+ {
1471
+ "epoch": 2.783490731024834,
1472
+ "grad_norm": 0.3375139832496643,
1473
+ "learning_rate": 3.2067818301524497e-06,
1474
+ "loss": 0.082,
1475
+ "step": 1990
1476
+ },
1477
+ {
1478
+ "epoch": 2.7974816369359914,
1479
+ "grad_norm": 0.35570380091667175,
1480
+ "learning_rate": 2.810708578074239e-06,
1481
+ "loss": 0.0717,
1482
+ "step": 2000
1483
+ },
1484
+ {
1485
+ "epoch": 2.7974816369359914,
1486
+ "eval_loss": 0.09761384129524231,
1487
+ "eval_runtime": 21.573,
1488
+ "eval_samples_per_second": 14.741,
1489
+ "eval_steps_per_second": 3.708,
1490
+ "step": 2000
1491
+ }
1492
+ ],
1493
+ "logging_steps": 10,
1494
+ "max_steps": 2145,
1495
+ "num_input_tokens_seen": 0,
1496
+ "num_train_epochs": 3,
1497
+ "save_steps": 500,
1498
+ "stateful_callbacks": {
1499
+ "TrainerControl": {
1500
+ "args": {
1501
+ "should_epoch_stop": false,
1502
+ "should_evaluate": false,
1503
+ "should_log": false,
1504
+ "should_save": true,
1505
+ "should_training_stop": false
1506
+ },
1507
+ "attributes": {}
1508
+ }
1509
+ },
1510
+ "total_flos": 1.552876470153216e+16,
1511
+ "train_batch_size": 1,
1512
+ "trial_name": null,
1513
+ "trial_params": null
1514
+ }
checkpoints/checkpoint-2000/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dbc9bc83f818f5138562feaa20da67402920a7f2ed95028654b04bd38ebe547e
3
+ size 6417
checkpoints/checkpoint-2000/video_preprocessor_config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "do_center_crop": null,
7
+ "do_convert_rgb": true,
8
+ "do_normalize": true,
9
+ "do_rescale": true,
10
+ "do_resize": true,
11
+ "do_sample_frames": true,
12
+ "fps": 2,
13
+ "image_mean": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "image_std": [
19
+ 0.5,
20
+ 0.5,
21
+ 0.5
22
+ ],
23
+ "input_data_format": null,
24
+ "max_frames": 768,
25
+ "merge_size": 2,
26
+ "min_frames": 4,
27
+ "num_frames": null,
28
+ "pad_size": null,
29
+ "patch_size": 16,
30
+ "processor_class": "Qwen3VLProcessor",
31
+ "resample": 3,
32
+ "rescale_factor": 0.00392156862745098,
33
+ "return_metadata": false,
34
+ "size": {
35
+ "longest_edge": 25165824,
36
+ "shortest_edge": 4096
37
+ },
38
+ "temporal_patch_size": 2,
39
+ "video_metadata": null,
40
+ "video_processor_type": "Qwen3VLVideoProcessor"
41
+ }
checkpoints/checkpoint-2000/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
checkpoints/checkpoint-2145/README.md ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: unsloth/qwen3-vl-2b-instruct-unsloth-bnb-4bit
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:unsloth/qwen3-vl-2b-instruct-unsloth-bnb-4bit
7
+ - lora
8
+ - sft
9
+ - transformers
10
+ - trl
11
+ - unsloth
12
+ ---
13
+
14
+ # Model Card for Model ID
15
+
16
+ <!-- Provide a quick summary of what the model is/does. -->
17
+
18
+
19
+
20
+ ## Model Details
21
+
22
+ ### Model Description
23
+
24
+ <!-- Provide a longer summary of what this model is. -->
25
+
26
+
27
+
28
+ - **Developed by:** [More Information Needed]
29
+ - **Funded by [optional]:** [More Information Needed]
30
+ - **Shared by [optional]:** [More Information Needed]
31
+ - **Model type:** [More Information Needed]
32
+ - **Language(s) (NLP):** [More Information Needed]
33
+ - **License:** [More Information Needed]
34
+ - **Finetuned from model [optional]:** [More Information Needed]
35
+
36
+ ### Model Sources [optional]
37
+
38
+ <!-- Provide the basic links for the model. -->
39
+
40
+ - **Repository:** [More Information Needed]
41
+ - **Paper [optional]:** [More Information Needed]
42
+ - **Demo [optional]:** [More Information Needed]
43
+
44
+ ## Uses
45
+
46
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
47
+
48
+ ### Direct Use
49
+
50
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
51
+
52
+ [More Information Needed]
53
+
54
+ ### Downstream Use [optional]
55
+
56
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
57
+
58
+ [More Information Needed]
59
+
60
+ ### Out-of-Scope Use
61
+
62
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
63
+
64
+ [More Information Needed]
65
+
66
+ ## Bias, Risks, and Limitations
67
+
68
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
69
+
70
+ [More Information Needed]
71
+
72
+ ### Recommendations
73
+
74
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
75
+
76
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
77
+
78
+ ## How to Get Started with the Model
79
+
80
+ Use the code below to get started with the model.
81
+
82
+ [More Information Needed]
83
+
84
+ ## Training Details
85
+
86
+ ### Training Data
87
+
88
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
89
+
90
+ [More Information Needed]
91
+
92
+ ### Training Procedure
93
+
94
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
95
+
96
+ #### Preprocessing [optional]
97
+
98
+ [More Information Needed]
99
+
100
+
101
+ #### Training Hyperparameters
102
+
103
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
104
+
105
+ #### Speeds, Sizes, Times [optional]
106
+
107
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
108
+
109
+ [More Information Needed]
110
+
111
+ ## Evaluation
112
+
113
+ <!-- This section describes the evaluation protocols and provides the results. -->
114
+
115
+ ### Testing Data, Factors & Metrics
116
+
117
+ #### Testing Data
118
+
119
+ <!-- This should link to a Dataset Card if possible. -->
120
+
121
+ [More Information Needed]
122
+
123
+ #### Factors
124
+
125
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
126
+
127
+ [More Information Needed]
128
+
129
+ #### Metrics
130
+
131
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
132
+
133
+ [More Information Needed]
134
+
135
+ ### Results
136
+
137
+ [More Information Needed]
138
+
139
+ #### Summary
140
+
141
+
142
+
143
+ ## Model Examination [optional]
144
+
145
+ <!-- Relevant interpretability work for the model goes here -->
146
+
147
+ [More Information Needed]
148
+
149
+ ## Environmental Impact
150
+
151
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
152
+
153
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
154
+
155
+ - **Hardware Type:** [More Information Needed]
156
+ - **Hours used:** [More Information Needed]
157
+ - **Cloud Provider:** [More Information Needed]
158
+ - **Compute Region:** [More Information Needed]
159
+ - **Carbon Emitted:** [More Information Needed]
160
+
161
+ ## Technical Specifications [optional]
162
+
163
+ ### Model Architecture and Objective
164
+
165
+ [More Information Needed]
166
+
167
+ ### Compute Infrastructure
168
+
169
+ [More Information Needed]
170
+
171
+ #### Hardware
172
+
173
+ [More Information Needed]
174
+
175
+ #### Software
176
+
177
+ [More Information Needed]
178
+
179
+ ## Citation [optional]
180
+
181
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
182
+
183
+ **BibTeX:**
184
+
185
+ [More Information Needed]
186
+
187
+ **APA:**
188
+
189
+ [More Information Needed]
190
+
191
+ ## Glossary [optional]
192
+
193
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
194
+
195
+ [More Information Needed]
196
+
197
+ ## More Information [optional]
198
+
199
+ [More Information Needed]
200
+
201
+ ## Model Card Authors [optional]
202
+
203
+ [More Information Needed]
204
+
205
+ ## Model Card Contact
206
+
207
+ [More Information Needed]
208
+ ### Framework versions
209
+
210
+ - PEFT 0.18.1
checkpoints/checkpoint-2145/adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "Qwen3VLForConditionalGeneration",
7
+ "parent_library": "transformers.models.qwen3_vl.modeling_qwen3_vl",
8
+ "unsloth_fixed": true
9
+ },
10
+ "base_model_name_or_path": "unsloth/qwen3-vl-2b-instruct-unsloth-bnb-4bit",
11
+ "bias": "none",
12
+ "corda_config": null,
13
+ "ensure_weight_tying": false,
14
+ "eva_config": null,
15
+ "exclude_modules": null,
16
+ "fan_in_fan_out": false,
17
+ "inference_mode": true,
18
+ "init_lora_weights": true,
19
+ "layer_replication": null,
20
+ "layers_pattern": null,
21
+ "layers_to_transform": null,
22
+ "loftq_config": {},
23
+ "lora_alpha": 32,
24
+ "lora_bias": false,
25
+ "lora_dropout": 0,
26
+ "megatron_config": null,
27
+ "megatron_core": "megatron.core",
28
+ "modules_to_save": null,
29
+ "peft_type": "LORA",
30
+ "peft_version": "0.18.1",
31
+ "qalora_group_size": 16,
32
+ "r": 16,
33
+ "rank_pattern": {},
34
+ "revision": null,
35
+ "target_modules": [
36
+ "up_proj",
37
+ "o_proj",
38
+ "down_proj",
39
+ "q_proj",
40
+ "gate_proj",
41
+ "k_proj",
42
+ "v_proj"
43
+ ],
44
+ "target_parameters": null,
45
+ "task_type": "CAUSAL_LM",
46
+ "trainable_token_indices": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false
50
+ }
checkpoints/checkpoint-2145/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd296c2718a6c1b83cc3b19cc8ccf38f2f3b46f5336d1866a4a0f99f3173afae
3
+ size 69788264
checkpoints/checkpoint-2145/added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
checkpoints/checkpoint-2145/chat_template.jinja ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {%- if messages[0].content is string %}
5
+ {{- messages[0].content }}
6
+ {%- else %}
7
+ {%- for content in messages[0].content %}
8
+ {%- if 'text' in content %}
9
+ {{- content.text }}
10
+ {%- endif %}
11
+ {%- endfor %}
12
+ {%- endif %}
13
+ {{- '\n\n' }}
14
+ {%- endif %}
15
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
16
+ {%- for tool in tools %}
17
+ {{- "\n" }}
18
+ {{- tool | tojson }}
19
+ {%- endfor %}
20
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
21
+ {%- else %}
22
+ {%- if messages[0].role == 'system' %}
23
+ {{- '<|im_start|>system\n' }}
24
+ {%- if messages[0].content is string %}
25
+ {{- messages[0].content }}
26
+ {%- else %}
27
+ {%- for content in messages[0].content %}
28
+ {%- if 'text' in content %}
29
+ {{- content.text }}
30
+ {%- endif %}
31
+ {%- endfor %}
32
+ {%- endif %}
33
+ {{- '<|im_end|>\n' }}
34
+ {%- endif %}
35
+ {%- endif %}
36
+ {%- set image_count = namespace(value=0) %}
37
+ {%- set video_count = namespace(value=0) %}
38
+ {%- for message in messages %}
39
+ {%- if message.role == "user" %}
40
+ {{- '<|im_start|>' + message.role + '\n' }}
41
+ {%- if message.content is string %}
42
+ {{- message.content }}
43
+ {%- else %}
44
+ {%- for content in message.content %}
45
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
46
+ {%- set image_count.value = image_count.value + 1 %}
47
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
48
+ <|vision_start|><|image_pad|><|vision_end|>
49
+ {%- elif content.type == 'video' or 'video' in content %}
50
+ {%- set video_count.value = video_count.value + 1 %}
51
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
52
+ <|vision_start|><|video_pad|><|vision_end|>
53
+ {%- elif 'text' in content %}
54
+ {{- content.text }}
55
+ {%- endif %}
56
+ {%- endfor %}
57
+ {%- endif %}
58
+ {{- '<|im_end|>\n' }}
59
+ {%- elif message.role == "assistant" %}
60
+ {{- '<|im_start|>' + message.role + '\n' }}
61
+ {%- if message.content is string %}
62
+ {{- message.content }}
63
+ {%- else %}
64
+ {%- for content_item in message.content %}
65
+ {%- if 'text' in content_item %}
66
+ {{- content_item.text }}
67
+ {%- endif %}
68
+ {%- endfor %}
69
+ {%- endif %}
70
+ {%- if message.tool_calls %}
71
+ {%- for tool_call in message.tool_calls %}
72
+ {%- if (loop.first and message.content) or (not loop.first) %}
73
+ {{- '\n' }}
74
+ {%- endif %}
75
+ {%- if tool_call.function %}
76
+ {%- set tool_call = tool_call.function %}
77
+ {%- endif %}
78
+ {{- '<tool_call>\n{"name": "' }}
79
+ {{- tool_call.name }}
80
+ {{- '", "arguments": ' }}
81
+ {%- if tool_call.arguments is string %}
82
+ {{- tool_call.arguments }}
83
+ {%- else %}
84
+ {{- tool_call.arguments | tojson }}
85
+ {%- endif %}
86
+ {{- '}\n</tool_call>' }}
87
+ {%- endfor %}
88
+ {%- endif %}
89
+ {{- '<|im_end|>\n' }}
90
+ {%- elif message.role == "tool" %}
91
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
92
+ {{- '<|im_start|>user' }}
93
+ {%- endif %}
94
+ {{- '\n<tool_response>\n' }}
95
+ {%- if message.content is string %}
96
+ {{- message.content }}
97
+ {%- else %}
98
+ {%- for content in message.content %}
99
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
100
+ {%- set image_count.value = image_count.value + 1 %}
101
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
102
+ <|vision_start|><|image_pad|><|vision_end|>
103
+ {%- elif content.type == 'video' or 'video' in content %}
104
+ {%- set video_count.value = video_count.value + 1 %}
105
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
106
+ <|vision_start|><|video_pad|><|vision_end|>
107
+ {%- elif 'text' in content %}
108
+ {{- content.text }}
109
+ {%- endif %}
110
+ {%- endfor %}
111
+ {%- endif %}
112
+ {{- '\n</tool_response>' }}
113
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
114
+ {{- '<|im_end|>\n' }}
115
+ {%- endif %}
116
+ {%- endif %}
117
+ {%- endfor %}
118
+ {%- if add_generation_prompt %}
119
+ {{- '<|im_start|>assistant\n' }}
120
+ {%- endif %}
checkpoints/checkpoint-2145/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
checkpoints/checkpoint-2145/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc1aed833c3fcca33e49277a7f61582e0d954ba0615045857f23ed9333f26a85
3
+ size 35869445
checkpoints/checkpoint-2145/preprocessor_config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "disable_grouping": null,
7
+ "do_center_crop": null,
8
+ "do_convert_rgb": true,
9
+ "do_normalize": true,
10
+ "do_pad": null,
11
+ "do_rescale": true,
12
+ "do_resize": true,
13
+ "image_mean": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "image_processor_type": "Qwen2VLImageProcessorFast",
19
+ "image_std": [
20
+ 0.5,
21
+ 0.5,
22
+ 0.5
23
+ ],
24
+ "input_data_format": null,
25
+ "max_pixels": null,
26
+ "merge_size": 2,
27
+ "min_pixels": null,
28
+ "pad_size": null,
29
+ "patch_size": 16,
30
+ "processor_class": "Qwen3VLProcessor",
31
+ "resample": 3,
32
+ "rescale_factor": 0.00392156862745098,
33
+ "return_tensors": null,
34
+ "size": {
35
+ "longest_edge": 16777216,
36
+ "shortest_edge": 65536
37
+ },
38
+ "temporal_patch_size": 2
39
+ }
checkpoints/checkpoint-2145/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89f2e7b9901fa4b72af37f5845fbfc651b4a741e105cc6dfc15f2793ce6c6f67
3
+ size 14645
checkpoints/checkpoint-2145/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d653fe7544acebc73dbd211d67a88bc7f377ae0fc640a5549094b1d4a317837c
3
+ size 1465
checkpoints/checkpoint-2145/special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|vision_pad|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
checkpoints/checkpoint-2145/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af560c5e5807192776a9f72a0ea33c9331816d9c59af61e02bdf766f8a2a97fb
3
+ size 11422922
checkpoints/checkpoint-2145/tokenizer_config.json ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ }
213
+ },
214
+ "additional_special_tokens": [
215
+ "<|im_start|>",
216
+ "<|im_end|>",
217
+ "<|object_ref_start|>",
218
+ "<|object_ref_end|>",
219
+ "<|box_start|>",
220
+ "<|box_end|>",
221
+ "<|quad_start|>",
222
+ "<|quad_end|>",
223
+ "<|vision_start|>",
224
+ "<|vision_end|>",
225
+ "<|vision_pad|>",
226
+ "<|image_pad|>",
227
+ "<|video_pad|>"
228
+ ],
229
+ "bos_token": null,
230
+ "clean_up_tokenization_spaces": false,
231
+ "eos_token": "<|im_end|>",
232
+ "errors": "replace",
233
+ "extra_special_tokens": {},
234
+ "model_max_length": 262144,
235
+ "pad_token": "<|vision_pad|>",
236
+ "padding_side": "right",
237
+ "processor_class": "Qwen3VLProcessor",
238
+ "split_special_tokens": false,
239
+ "tokenizer_class": "Qwen2Tokenizer",
240
+ "unk_token": null
241
+ }
checkpoints/checkpoint-2145/trainer_state.json ADDED
@@ -0,0 +1,1612 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 3.0,
6
+ "eval_steps": 200,
7
+ "global_step": 2145,
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.013990905911157748,
14
+ "grad_norm": 11.852328300476074,
15
+ "learning_rate": 8.372093023255815e-06,
16
+ "loss": 3.4227,
17
+ "step": 10
18
+ },
19
+ {
20
+ "epoch": 0.027981811822315496,
21
+ "grad_norm": 5.509212017059326,
22
+ "learning_rate": 1.7674418604651163e-05,
23
+ "loss": 3.1068,
24
+ "step": 20
25
+ },
26
+ {
27
+ "epoch": 0.04197271773347324,
28
+ "grad_norm": 3.556685209274292,
29
+ "learning_rate": 2.6976744186046517e-05,
30
+ "loss": 2.3908,
31
+ "step": 30
32
+ },
33
+ {
34
+ "epoch": 0.05596362364463099,
35
+ "grad_norm": 4.118677616119385,
36
+ "learning_rate": 3.627906976744187e-05,
37
+ "loss": 1.5286,
38
+ "step": 40
39
+ },
40
+ {
41
+ "epoch": 0.06995452955578874,
42
+ "grad_norm": 2.5455708503723145,
43
+ "learning_rate": 4.5581395348837214e-05,
44
+ "loss": 0.7724,
45
+ "step": 50
46
+ },
47
+ {
48
+ "epoch": 0.08394543546694648,
49
+ "grad_norm": 1.4716579914093018,
50
+ "learning_rate": 5.488372093023256e-05,
51
+ "loss": 0.3533,
52
+ "step": 60
53
+ },
54
+ {
55
+ "epoch": 0.09793634137810424,
56
+ "grad_norm": 1.154810905456543,
57
+ "learning_rate": 6.418604651162791e-05,
58
+ "loss": 0.2292,
59
+ "step": 70
60
+ },
61
+ {
62
+ "epoch": 0.11192724728926198,
63
+ "grad_norm": 0.8629467487335205,
64
+ "learning_rate": 7.348837209302326e-05,
65
+ "loss": 0.1772,
66
+ "step": 80
67
+ },
68
+ {
69
+ "epoch": 0.1259181532004197,
70
+ "grad_norm": 0.7331057190895081,
71
+ "learning_rate": 8.27906976744186e-05,
72
+ "loss": 0.1643,
73
+ "step": 90
74
+ },
75
+ {
76
+ "epoch": 0.13990905911157747,
77
+ "grad_norm": 0.5298661589622498,
78
+ "learning_rate": 9.209302325581396e-05,
79
+ "loss": 0.1659,
80
+ "step": 100
81
+ },
82
+ {
83
+ "epoch": 0.15389996502273523,
84
+ "grad_norm": 0.6423642635345459,
85
+ "learning_rate": 0.00010139534883720931,
86
+ "loss": 0.1569,
87
+ "step": 110
88
+ },
89
+ {
90
+ "epoch": 0.16789087093389296,
91
+ "grad_norm": 0.7554107904434204,
92
+ "learning_rate": 0.00011069767441860466,
93
+ "loss": 0.1335,
94
+ "step": 120
95
+ },
96
+ {
97
+ "epoch": 0.18188177684505072,
98
+ "grad_norm": 0.6365725994110107,
99
+ "learning_rate": 0.00012,
100
+ "loss": 0.1346,
101
+ "step": 130
102
+ },
103
+ {
104
+ "epoch": 0.19587268275620848,
105
+ "grad_norm": 0.577471137046814,
106
+ "learning_rate": 0.00012930232558139534,
107
+ "loss": 0.1559,
108
+ "step": 140
109
+ },
110
+ {
111
+ "epoch": 0.2098635886673662,
112
+ "grad_norm": 0.6245256066322327,
113
+ "learning_rate": 0.00013860465116279072,
114
+ "loss": 0.1678,
115
+ "step": 150
116
+ },
117
+ {
118
+ "epoch": 0.22385449457852397,
119
+ "grad_norm": 0.5085740089416504,
120
+ "learning_rate": 0.00014790697674418605,
121
+ "loss": 0.162,
122
+ "step": 160
123
+ },
124
+ {
125
+ "epoch": 0.2378454004896817,
126
+ "grad_norm": 0.46424826979637146,
127
+ "learning_rate": 0.0001572093023255814,
128
+ "loss": 0.1328,
129
+ "step": 170
130
+ },
131
+ {
132
+ "epoch": 0.2518363064008394,
133
+ "grad_norm": 0.4451293647289276,
134
+ "learning_rate": 0.00016651162790697673,
135
+ "loss": 0.1528,
136
+ "step": 180
137
+ },
138
+ {
139
+ "epoch": 0.2658272123119972,
140
+ "grad_norm": 0.6359198689460754,
141
+ "learning_rate": 0.0001758139534883721,
142
+ "loss": 0.1334,
143
+ "step": 190
144
+ },
145
+ {
146
+ "epoch": 0.27981811822315494,
147
+ "grad_norm": 0.406089723110199,
148
+ "learning_rate": 0.00018511627906976744,
149
+ "loss": 0.1414,
150
+ "step": 200
151
+ },
152
+ {
153
+ "epoch": 0.27981811822315494,
154
+ "eval_loss": 0.1422451138496399,
155
+ "eval_runtime": 21.5015,
156
+ "eval_samples_per_second": 14.79,
157
+ "eval_steps_per_second": 3.721,
158
+ "step": 200
159
+ },
160
+ {
161
+ "epoch": 0.2938090241343127,
162
+ "grad_norm": 0.4091590642929077,
163
+ "learning_rate": 0.0001944186046511628,
164
+ "loss": 0.1526,
165
+ "step": 210
166
+ },
167
+ {
168
+ "epoch": 0.30779993004547046,
169
+ "grad_norm": 0.325090229511261,
170
+ "learning_rate": 0.000199997880304001,
171
+ "loss": 0.1173,
172
+ "step": 220
173
+ },
174
+ {
175
+ "epoch": 0.3217908359566282,
176
+ "grad_norm": 0.3782133460044861,
177
+ "learning_rate": 0.0001999740347560115,
178
+ "loss": 0.1445,
179
+ "step": 230
180
+ },
181
+ {
182
+ "epoch": 0.3357817418677859,
183
+ "grad_norm": 0.4928087592124939,
184
+ "learning_rate": 0.00019992370037914218,
185
+ "loss": 0.1363,
186
+ "step": 240
187
+ },
188
+ {
189
+ "epoch": 0.3497726477789437,
190
+ "grad_norm": 0.31038427352905273,
191
+ "learning_rate": 0.00019984689050984278,
192
+ "loss": 0.1296,
193
+ "step": 250
194
+ },
195
+ {
196
+ "epoch": 0.36376355369010144,
197
+ "grad_norm": 0.4541214108467102,
198
+ "learning_rate": 0.00019974362549943247,
199
+ "loss": 0.1207,
200
+ "step": 260
201
+ },
202
+ {
203
+ "epoch": 0.3777544596012592,
204
+ "grad_norm": 0.46741530299186707,
205
+ "learning_rate": 0.00019961393270870738,
206
+ "loss": 0.1386,
207
+ "step": 270
208
+ },
209
+ {
210
+ "epoch": 0.39174536551241695,
211
+ "grad_norm": 0.3349354863166809,
212
+ "learning_rate": 0.00019945784650069143,
213
+ "loss": 0.1533,
214
+ "step": 280
215
+ },
216
+ {
217
+ "epoch": 0.40573627142357466,
218
+ "grad_norm": 0.40393367409706116,
219
+ "learning_rate": 0.00019927540823153135,
220
+ "loss": 0.135,
221
+ "step": 290
222
+ },
223
+ {
224
+ "epoch": 0.4197271773347324,
225
+ "grad_norm": 0.34774526953697205,
226
+ "learning_rate": 0.00019906666623953925,
227
+ "loss": 0.1213,
228
+ "step": 300
229
+ },
230
+ {
231
+ "epoch": 0.4337180832458902,
232
+ "grad_norm": 0.35436466336250305,
233
+ "learning_rate": 0.00019883167583238494,
234
+ "loss": 0.1244,
235
+ "step": 310
236
+ },
237
+ {
238
+ "epoch": 0.44770898915704793,
239
+ "grad_norm": 0.3164362609386444,
240
+ "learning_rate": 0.00019857049927244185,
241
+ "loss": 0.1243,
242
+ "step": 320
243
+ },
244
+ {
245
+ "epoch": 0.4616998950682057,
246
+ "grad_norm": 0.3490104675292969,
247
+ "learning_rate": 0.0001982832057602901,
248
+ "loss": 0.1427,
249
+ "step": 330
250
+ },
251
+ {
252
+ "epoch": 0.4756908009793634,
253
+ "grad_norm": 0.4742378294467926,
254
+ "learning_rate": 0.00019796987141638134,
255
+ "loss": 0.1252,
256
+ "step": 340
257
+ },
258
+ {
259
+ "epoch": 0.48968170689052115,
260
+ "grad_norm": 0.33545687794685364,
261
+ "learning_rate": 0.00019763057926087022,
262
+ "loss": 0.1355,
263
+ "step": 350
264
+ },
265
+ {
266
+ "epoch": 0.5036726128016789,
267
+ "grad_norm": 0.4260849058628082,
268
+ "learning_rate": 0.00019726541919161733,
269
+ "loss": 0.1125,
270
+ "step": 360
271
+ },
272
+ {
273
+ "epoch": 0.5176635187128367,
274
+ "grad_norm": 0.4119410514831543,
275
+ "learning_rate": 0.00019687448796037045,
276
+ "loss": 0.122,
277
+ "step": 370
278
+ },
279
+ {
280
+ "epoch": 0.5316544246239944,
281
+ "grad_norm": 0.28887462615966797,
282
+ "learning_rate": 0.0001964578891471292,
283
+ "loss": 0.129,
284
+ "step": 380
285
+ },
286
+ {
287
+ "epoch": 0.5456453305351522,
288
+ "grad_norm": 0.3469299077987671,
289
+ "learning_rate": 0.00019601573313270102,
290
+ "loss": 0.1211,
291
+ "step": 390
292
+ },
293
+ {
294
+ "epoch": 0.5596362364463099,
295
+ "grad_norm": 0.2652361989021301,
296
+ "learning_rate": 0.00019554813706945486,
297
+ "loss": 0.1217,
298
+ "step": 400
299
+ },
300
+ {
301
+ "epoch": 0.5596362364463099,
302
+ "eval_loss": 0.12272346764802933,
303
+ "eval_runtime": 21.4783,
304
+ "eval_samples_per_second": 14.806,
305
+ "eval_steps_per_second": 3.725,
306
+ "step": 400
307
+ },
308
+ {
309
+ "epoch": 0.5736271423574677,
310
+ "grad_norm": 0.4036720395088196,
311
+ "learning_rate": 0.0001950552248502808,
312
+ "loss": 0.1341,
313
+ "step": 410
314
+ },
315
+ {
316
+ "epoch": 0.5876180482686254,
317
+ "grad_norm": 0.4273042380809784,
318
+ "learning_rate": 0.00019453712707576392,
319
+ "loss": 0.1093,
320
+ "step": 420
321
+ },
322
+ {
323
+ "epoch": 0.6016089541797831,
324
+ "grad_norm": 0.3455790877342224,
325
+ "learning_rate": 0.00019399398101958056,
326
+ "loss": 0.1133,
327
+ "step": 430
328
+ },
329
+ {
330
+ "epoch": 0.6155998600909409,
331
+ "grad_norm": 0.2522144019603729,
332
+ "learning_rate": 0.0001934259305921268,
333
+ "loss": 0.1221,
334
+ "step": 440
335
+ },
336
+ {
337
+ "epoch": 0.6295907660020986,
338
+ "grad_norm": 0.21513080596923828,
339
+ "learning_rate": 0.00019283312630238836,
340
+ "loss": 0.1112,
341
+ "step": 450
342
+ },
343
+ {
344
+ "epoch": 0.6435816719132564,
345
+ "grad_norm": 0.2985060214996338,
346
+ "learning_rate": 0.00019221572521806212,
347
+ "loss": 0.1072,
348
+ "step": 460
349
+ },
350
+ {
351
+ "epoch": 0.6575725778244141,
352
+ "grad_norm": 0.23942740261554718,
353
+ "learning_rate": 0.00019157389092394004,
354
+ "loss": 0.113,
355
+ "step": 470
356
+ },
357
+ {
358
+ "epoch": 0.6715634837355718,
359
+ "grad_norm": 0.35044464468955994,
360
+ "learning_rate": 0.00019090779347856606,
361
+ "loss": 0.1186,
362
+ "step": 480
363
+ },
364
+ {
365
+ "epoch": 0.6855543896467297,
366
+ "grad_norm": 0.25626683235168457,
367
+ "learning_rate": 0.00019021760936917804,
368
+ "loss": 0.1156,
369
+ "step": 490
370
+ },
371
+ {
372
+ "epoch": 0.6995452955578874,
373
+ "grad_norm": 0.3051966428756714,
374
+ "learning_rate": 0.00018950352146494606,
375
+ "loss": 0.1166,
376
+ "step": 500
377
+ },
378
+ {
379
+ "epoch": 0.7135362014690452,
380
+ "grad_norm": 0.3047504127025604,
381
+ "learning_rate": 0.00018876571896852005,
382
+ "loss": 0.1155,
383
+ "step": 510
384
+ },
385
+ {
386
+ "epoch": 0.7275271073802029,
387
+ "grad_norm": 0.2766532301902771,
388
+ "learning_rate": 0.00018800439736589924,
389
+ "loss": 0.1144,
390
+ "step": 520
391
+ },
392
+ {
393
+ "epoch": 0.7415180132913606,
394
+ "grad_norm": 0.321286141872406,
395
+ "learning_rate": 0.00018721975837463655,
396
+ "loss": 0.1032,
397
+ "step": 530
398
+ },
399
+ {
400
+ "epoch": 0.7555089192025184,
401
+ "grad_norm": 0.27030113339424133,
402
+ "learning_rate": 0.00018641200989039236,
403
+ "loss": 0.1201,
404
+ "step": 540
405
+ },
406
+ {
407
+ "epoch": 0.7694998251136761,
408
+ "grad_norm": 0.3184170424938202,
409
+ "learning_rate": 0.00018558136593185086,
410
+ "loss": 0.1234,
411
+ "step": 550
412
+ },
413
+ {
414
+ "epoch": 0.7834907310248339,
415
+ "grad_norm": 0.2622183859348297,
416
+ "learning_rate": 0.00018472804658401453,
417
+ "loss": 0.1015,
418
+ "step": 560
419
+ },
420
+ {
421
+ "epoch": 0.7974816369359916,
422
+ "grad_norm": 0.3095245659351349,
423
+ "learning_rate": 0.00018385227793989075,
424
+ "loss": 0.122,
425
+ "step": 570
426
+ },
427
+ {
428
+ "epoch": 0.8114725428471493,
429
+ "grad_norm": 0.4251258969306946,
430
+ "learning_rate": 0.00018295429204058712,
431
+ "loss": 0.1167,
432
+ "step": 580
433
+ },
434
+ {
435
+ "epoch": 0.8254634487583071,
436
+ "grad_norm": 0.31186479330062866,
437
+ "learning_rate": 0.00018203432681383034,
438
+ "loss": 0.1114,
439
+ "step": 590
440
+ },
441
+ {
442
+ "epoch": 0.8394543546694648,
443
+ "grad_norm": 0.2990236282348633,
444
+ "learning_rate": 0.00018109262601092576,
445
+ "loss": 0.1103,
446
+ "step": 600
447
+ },
448
+ {
449
+ "epoch": 0.8394543546694648,
450
+ "eval_loss": 0.11650671809911728,
451
+ "eval_runtime": 21.574,
452
+ "eval_samples_per_second": 14.74,
453
+ "eval_steps_per_second": 3.708,
454
+ "step": 600
455
+ },
456
+ {
457
+ "epoch": 0.8534452605806226,
458
+ "grad_norm": 0.3199589252471924,
459
+ "learning_rate": 0.00018012943914217356,
460
+ "loss": 0.1098,
461
+ "step": 610
462
+ },
463
+ {
464
+ "epoch": 0.8674361664917803,
465
+ "grad_norm": 0.2671171724796295,
466
+ "learning_rate": 0.00017914502141075928,
467
+ "loss": 0.0959,
468
+ "step": 620
469
+ },
470
+ {
471
+ "epoch": 0.881427072402938,
472
+ "grad_norm": 0.371975302696228,
473
+ "learning_rate": 0.00017813963364513607,
474
+ "loss": 0.1089,
475
+ "step": 630
476
+ },
477
+ {
478
+ "epoch": 0.8954179783140959,
479
+ "grad_norm": 0.28194791078567505,
480
+ "learning_rate": 0.00017711354222991606,
481
+ "loss": 0.1009,
482
+ "step": 640
483
+ },
484
+ {
485
+ "epoch": 0.9094088842252536,
486
+ "grad_norm": 0.24068565666675568,
487
+ "learning_rate": 0.0001760670190352903,
488
+ "loss": 0.1195,
489
+ "step": 650
490
+ },
491
+ {
492
+ "epoch": 0.9233997901364114,
493
+ "grad_norm": 0.35747045278549194,
494
+ "learning_rate": 0.00017500034134499423,
495
+ "loss": 0.1237,
496
+ "step": 660
497
+ },
498
+ {
499
+ "epoch": 0.9373906960475691,
500
+ "grad_norm": 0.30066290497779846,
501
+ "learning_rate": 0.00017391379178284002,
502
+ "loss": 0.1231,
503
+ "step": 670
504
+ },
505
+ {
506
+ "epoch": 0.9513816019587268,
507
+ "grad_norm": 0.3015068769454956,
508
+ "learning_rate": 0.0001728076582378329,
509
+ "loss": 0.1,
510
+ "step": 680
511
+ },
512
+ {
513
+ "epoch": 0.9653725078698846,
514
+ "grad_norm": 0.3291875422000885,
515
+ "learning_rate": 0.0001716822337878932,
516
+ "loss": 0.1256,
517
+ "step": 690
518
+ },
519
+ {
520
+ "epoch": 0.9793634137810423,
521
+ "grad_norm": 0.2612892985343933,
522
+ "learning_rate": 0.0001705378166222032,
523
+ "loss": 0.1114,
524
+ "step": 700
525
+ },
526
+ {
527
+ "epoch": 0.9933543196922001,
528
+ "grad_norm": 0.24723578989505768,
529
+ "learning_rate": 0.00016937470996219973,
530
+ "loss": 0.1021,
531
+ "step": 710
532
+ },
533
+ {
534
+ "epoch": 1.006995452955579,
535
+ "grad_norm": 0.21942616999149323,
536
+ "learning_rate": 0.00016819322198123365,
537
+ "loss": 0.1038,
538
+ "step": 720
539
+ },
540
+ {
541
+ "epoch": 1.0209863588667367,
542
+ "grad_norm": 0.2657986581325531,
543
+ "learning_rate": 0.00016699366572291702,
544
+ "loss": 0.0924,
545
+ "step": 730
546
+ },
547
+ {
548
+ "epoch": 1.0349772647778943,
549
+ "grad_norm": 0.3046330213546753,
550
+ "learning_rate": 0.00016577635901818,
551
+ "loss": 0.095,
552
+ "step": 740
553
+ },
554
+ {
555
+ "epoch": 1.0489681706890521,
556
+ "grad_norm": 0.29112890362739563,
557
+ "learning_rate": 0.0001645416244010593,
558
+ "loss": 0.0939,
559
+ "step": 750
560
+ },
561
+ {
562
+ "epoch": 1.06295907660021,
563
+ "grad_norm": 0.2303277999162674,
564
+ "learning_rate": 0.00016328978902324046,
565
+ "loss": 0.0936,
566
+ "step": 760
567
+ },
568
+ {
569
+ "epoch": 1.0769499825113675,
570
+ "grad_norm": 0.21349187195301056,
571
+ "learning_rate": 0.00016202118456737683,
572
+ "loss": 0.1021,
573
+ "step": 770
574
+ },
575
+ {
576
+ "epoch": 1.0909408884225253,
577
+ "grad_norm": 0.2621854245662689,
578
+ "learning_rate": 0.0001607361471592077,
579
+ "loss": 0.0998,
580
+ "step": 780
581
+ },
582
+ {
583
+ "epoch": 1.1049317943336832,
584
+ "grad_norm": 0.21957777440547943,
585
+ "learning_rate": 0.0001594350172784996,
586
+ "loss": 0.1091,
587
+ "step": 790
588
+ },
589
+ {
590
+ "epoch": 1.1189227002448408,
591
+ "grad_norm": 0.27233201265335083,
592
+ "learning_rate": 0.0001581181396688337,
593
+ "loss": 0.093,
594
+ "step": 800
595
+ },
596
+ {
597
+ "epoch": 1.1189227002448408,
598
+ "eval_loss": 0.1152026355266571,
599
+ "eval_runtime": 21.6054,
600
+ "eval_samples_per_second": 14.719,
601
+ "eval_steps_per_second": 3.703,
602
+ "step": 800
603
+ },
604
+ {
605
+ "epoch": 1.1329136061559986,
606
+ "grad_norm": 0.3158034086227417,
607
+ "learning_rate": 0.00015678586324626337,
608
+ "loss": 0.0907,
609
+ "step": 810
610
+ },
611
+ {
612
+ "epoch": 1.1469045120671564,
613
+ "grad_norm": 0.30520495772361755,
614
+ "learning_rate": 0.00015543854100686676,
615
+ "loss": 0.1057,
616
+ "step": 820
617
+ },
618
+ {
619
+ "epoch": 1.1608954179783142,
620
+ "grad_norm": 0.21135452389717102,
621
+ "learning_rate": 0.0001540765299332177,
622
+ "loss": 0.0929,
623
+ "step": 830
624
+ },
625
+ {
626
+ "epoch": 1.1748863238894718,
627
+ "grad_norm": 0.32276666164398193,
628
+ "learning_rate": 0.00015270019089980077,
629
+ "loss": 0.1085,
630
+ "step": 840
631
+ },
632
+ {
633
+ "epoch": 1.1888772298006296,
634
+ "grad_norm": 0.27095136046409607,
635
+ "learning_rate": 0.00015130988857739498,
636
+ "loss": 0.0984,
637
+ "step": 850
638
+ },
639
+ {
640
+ "epoch": 1.2028681357117874,
641
+ "grad_norm": 0.4224928915500641,
642
+ "learning_rate": 0.0001499059913364517,
643
+ "loss": 0.1117,
644
+ "step": 860
645
+ },
646
+ {
647
+ "epoch": 1.216859041622945,
648
+ "grad_norm": 0.24559757113456726,
649
+ "learning_rate": 0.00014848887114949234,
650
+ "loss": 0.101,
651
+ "step": 870
652
+ },
653
+ {
654
+ "epoch": 1.2308499475341028,
655
+ "grad_norm": 0.2625027894973755,
656
+ "learning_rate": 0.00014705890349255149,
657
+ "loss": 0.1113,
658
+ "step": 880
659
+ },
660
+ {
661
+ "epoch": 1.2448408534452606,
662
+ "grad_norm": 0.31155043840408325,
663
+ "learning_rate": 0.00014561646724569198,
664
+ "loss": 0.0903,
665
+ "step": 890
666
+ },
667
+ {
668
+ "epoch": 1.2588317593564184,
669
+ "grad_norm": 0.2001536637544632,
670
+ "learning_rate": 0.00014416194459261785,
671
+ "loss": 0.123,
672
+ "step": 900
673
+ },
674
+ {
675
+ "epoch": 1.272822665267576,
676
+ "grad_norm": 0.23669183254241943,
677
+ "learning_rate": 0.00014269572091941214,
678
+ "loss": 0.109,
679
+ "step": 910
680
+ },
681
+ {
682
+ "epoch": 1.2868135711787339,
683
+ "grad_norm": 0.2512431740760803,
684
+ "learning_rate": 0.00014121818471242608,
685
+ "loss": 0.1022,
686
+ "step": 920
687
+ },
688
+ {
689
+ "epoch": 1.3008044770898914,
690
+ "grad_norm": 0.26644250750541687,
691
+ "learning_rate": 0.00013972972745534686,
692
+ "loss": 0.0991,
693
+ "step": 930
694
+ },
695
+ {
696
+ "epoch": 1.3147953830010493,
697
+ "grad_norm": 0.24515704810619354,
698
+ "learning_rate": 0.0001382307435254713,
699
+ "loss": 0.1002,
700
+ "step": 940
701
+ },
702
+ {
703
+ "epoch": 1.328786288912207,
704
+ "grad_norm": 0.2648073732852936,
705
+ "learning_rate": 0.0001367216300892127,
706
+ "loss": 0.1074,
707
+ "step": 950
708
+ },
709
+ {
710
+ "epoch": 1.3427771948233649,
711
+ "grad_norm": 0.2987382411956787,
712
+ "learning_rate": 0.00013520278699686897,
713
+ "loss": 0.1017,
714
+ "step": 960
715
+ },
716
+ {
717
+ "epoch": 1.3567681007345227,
718
+ "grad_norm": 0.22436612844467163,
719
+ "learning_rate": 0.00013367461667667923,
720
+ "loss": 0.0923,
721
+ "step": 970
722
+ },
723
+ {
724
+ "epoch": 1.3707590066456803,
725
+ "grad_norm": 0.6144154667854309,
726
+ "learning_rate": 0.00013213752402819773,
727
+ "loss": 0.1021,
728
+ "step": 980
729
+ },
730
+ {
731
+ "epoch": 1.384749912556838,
732
+ "grad_norm": 0.21033185720443726,
733
+ "learning_rate": 0.00013059191631501288,
734
+ "loss": 0.1136,
735
+ "step": 990
736
+ },
737
+ {
738
+ "epoch": 1.3987408184679957,
739
+ "grad_norm": 0.3320418894290924,
740
+ "learning_rate": 0.00012903820305683973,
741
+ "loss": 0.1065,
742
+ "step": 1000
743
+ },
744
+ {
745
+ "epoch": 1.3987408184679957,
746
+ "eval_loss": 0.10766011476516724,
747
+ "eval_runtime": 21.6633,
748
+ "eval_samples_per_second": 14.679,
749
+ "eval_steps_per_second": 3.693,
750
+ "step": 1000
751
+ },
752
+ {
753
+ "epoch": 1.4127317243791535,
754
+ "grad_norm": 0.3217187523841858,
755
+ "learning_rate": 0.00012747679592101498,
756
+ "loss": 0.1025,
757
+ "step": 1010
758
+ },
759
+ {
760
+ "epoch": 1.4267226302903113,
761
+ "grad_norm": 0.19164179265499115,
762
+ "learning_rate": 0.00012590810861342266,
763
+ "loss": 0.0903,
764
+ "step": 1020
765
+ },
766
+ {
767
+ "epoch": 1.4407135362014691,
768
+ "grad_norm": 0.30840256810188293,
769
+ "learning_rate": 0.00012433255676888,
770
+ "loss": 0.0895,
771
+ "step": 1030
772
+ },
773
+ {
774
+ "epoch": 1.4547044421126267,
775
+ "grad_norm": 0.25482040643692017,
776
+ "learning_rate": 0.00012275055784101178,
777
+ "loss": 0.094,
778
+ "step": 1040
779
+ },
780
+ {
781
+ "epoch": 1.4686953480237845,
782
+ "grad_norm": 0.22336170077323914,
783
+ "learning_rate": 0.00012116253099164334,
784
+ "loss": 0.0907,
785
+ "step": 1050
786
+ },
787
+ {
788
+ "epoch": 1.4826862539349424,
789
+ "grad_norm": 0.3286293148994446,
790
+ "learning_rate": 0.00011956889697974045,
791
+ "loss": 0.1058,
792
+ "step": 1060
793
+ },
794
+ {
795
+ "epoch": 1.4966771598461,
796
+ "grad_norm": 0.28686946630477905,
797
+ "learning_rate": 0.00011797007804992633,
798
+ "loss": 0.1009,
799
+ "step": 1070
800
+ },
801
+ {
802
+ "epoch": 1.5106680657572578,
803
+ "grad_norm": 0.2923101782798767,
804
+ "learning_rate": 0.00011636649782060496,
805
+ "loss": 0.0993,
806
+ "step": 1080
807
+ },
808
+ {
809
+ "epoch": 1.5246589716684156,
810
+ "grad_norm": 0.15968987345695496,
811
+ "learning_rate": 0.00011475858117172034,
812
+ "loss": 0.0866,
813
+ "step": 1090
814
+ },
815
+ {
816
+ "epoch": 1.5386498775795734,
817
+ "grad_norm": 0.2587738037109375,
818
+ "learning_rate": 0.00011314675413218156,
819
+ "loss": 0.0874,
820
+ "step": 1100
821
+ },
822
+ {
823
+ "epoch": 1.552640783490731,
824
+ "grad_norm": 0.2577781081199646,
825
+ "learning_rate": 0.00011153144376698347,
826
+ "loss": 0.0923,
827
+ "step": 1110
828
+ },
829
+ {
830
+ "epoch": 1.5666316894018888,
831
+ "grad_norm": 0.27181577682495117,
832
+ "learning_rate": 0.00010991307806405269,
833
+ "loss": 0.1007,
834
+ "step": 1120
835
+ },
836
+ {
837
+ "epoch": 1.5806225953130464,
838
+ "grad_norm": 0.19265908002853394,
839
+ "learning_rate": 0.00010829208582084915,
840
+ "loss": 0.0997,
841
+ "step": 1130
842
+ },
843
+ {
844
+ "epoch": 1.5946135012242042,
845
+ "grad_norm": 0.21604153513908386,
846
+ "learning_rate": 0.0001066688965307534,
847
+ "loss": 0.0954,
848
+ "step": 1140
849
+ },
850
+ {
851
+ "epoch": 1.608604407135362,
852
+ "grad_norm": 0.18990111351013184,
853
+ "learning_rate": 0.00010504394026926902,
854
+ "loss": 0.0976,
855
+ "step": 1150
856
+ },
857
+ {
858
+ "epoch": 1.6225953130465198,
859
+ "grad_norm": 0.28930869698524475,
860
+ "learning_rate": 0.00010341764758007118,
861
+ "loss": 0.1064,
862
+ "step": 1160
863
+ },
864
+ {
865
+ "epoch": 1.6365862189576776,
866
+ "grad_norm": 0.3197149634361267,
867
+ "learning_rate": 0.0001017904493609311,
868
+ "loss": 0.0999,
869
+ "step": 1170
870
+ },
871
+ {
872
+ "epoch": 1.6505771248688352,
873
+ "grad_norm": 0.3212111294269562,
874
+ "learning_rate": 0.0001001627767495465,
875
+ "loss": 0.092,
876
+ "step": 1180
877
+ },
878
+ {
879
+ "epoch": 1.664568030779993,
880
+ "grad_norm": 0.1536320447921753,
881
+ "learning_rate": 9.853506100930875e-05,
882
+ "loss": 0.0979,
883
+ "step": 1190
884
+ },
885
+ {
886
+ "epoch": 1.6785589366911506,
887
+ "grad_norm": 0.3106030821800232,
888
+ "learning_rate": 9.690773341503649e-05,
889
+ "loss": 0.0845,
890
+ "step": 1200
891
+ },
892
+ {
893
+ "epoch": 1.6785589366911506,
894
+ "eval_loss": 0.10427355021238327,
895
+ "eval_runtime": 22.3655,
896
+ "eval_samples_per_second": 14.218,
897
+ "eval_steps_per_second": 3.577,
898
+ "step": 1200
899
+ },
900
+ {
901
+ "epoch": 1.6925498426023085,
902
+ "grad_norm": 0.29129135608673096,
903
+ "learning_rate": 9.528122513870631e-05,
904
+ "loss": 0.0981,
905
+ "step": 1210
906
+ },
907
+ {
908
+ "epoch": 1.7065407485134663,
909
+ "grad_norm": 0.24254217743873596,
910
+ "learning_rate": 9.365596713521077e-05,
911
+ "loss": 0.0976,
912
+ "step": 1220
913
+ },
914
+ {
915
+ "epoch": 1.720531654424624,
916
+ "grad_norm": 0.34802696108818054,
917
+ "learning_rate": 9.203239002817377e-05,
918
+ "loss": 0.0916,
919
+ "step": 1230
920
+ },
921
+ {
922
+ "epoch": 1.734522560335782,
923
+ "grad_norm": 0.2737961411476135,
924
+ "learning_rate": 9.041092399585368e-05,
925
+ "loss": 0.0983,
926
+ "step": 1240
927
+ },
928
+ {
929
+ "epoch": 1.7485134662469395,
930
+ "grad_norm": 0.2548612654209137,
931
+ "learning_rate": 8.879199865716479e-05,
932
+ "loss": 0.0903,
933
+ "step": 1250
934
+ },
935
+ {
936
+ "epoch": 1.762504372158097,
937
+ "grad_norm": 0.276997834444046,
938
+ "learning_rate": 8.717604295784657e-05,
939
+ "loss": 0.099,
940
+ "step": 1260
941
+ },
942
+ {
943
+ "epoch": 1.776495278069255,
944
+ "grad_norm": 0.27574673295021057,
945
+ "learning_rate": 8.556348505681147e-05,
946
+ "loss": 0.0935,
947
+ "step": 1270
948
+ },
949
+ {
950
+ "epoch": 1.7904861839804127,
951
+ "grad_norm": 0.27950429916381836,
952
+ "learning_rate": 8.395475221270124e-05,
953
+ "loss": 0.1004,
954
+ "step": 1280
955
+ },
956
+ {
957
+ "epoch": 1.8044770898915705,
958
+ "grad_norm": 0.3705288767814636,
959
+ "learning_rate": 8.235027067068175e-05,
960
+ "loss": 0.1005,
961
+ "step": 1290
962
+ },
963
+ {
964
+ "epoch": 1.8184679958027283,
965
+ "grad_norm": 0.23482586443424225,
966
+ "learning_rate": 8.075046554950612e-05,
967
+ "loss": 0.0952,
968
+ "step": 1300
969
+ },
970
+ {
971
+ "epoch": 1.832458901713886,
972
+ "grad_norm": 0.2208295315504074,
973
+ "learning_rate": 7.91557607288767e-05,
974
+ "loss": 0.095,
975
+ "step": 1310
976
+ },
977
+ {
978
+ "epoch": 1.8464498076250437,
979
+ "grad_norm": 0.3105419874191284,
980
+ "learning_rate": 7.756657873713513e-05,
981
+ "loss": 0.0817,
982
+ "step": 1320
983
+ },
984
+ {
985
+ "epoch": 1.8604407135362013,
986
+ "grad_norm": 0.2837795615196228,
987
+ "learning_rate": 7.598334063931032e-05,
988
+ "loss": 0.0961,
989
+ "step": 1330
990
+ },
991
+ {
992
+ "epoch": 1.8744316194473591,
993
+ "grad_norm": 0.25267350673675537,
994
+ "learning_rate": 7.440646592555442e-05,
995
+ "loss": 0.0954,
996
+ "step": 1340
997
+ },
998
+ {
999
+ "epoch": 1.888422525358517,
1000
+ "grad_norm": 0.23757292330265045,
1001
+ "learning_rate": 7.28363723999959e-05,
1002
+ "loss": 0.0766,
1003
+ "step": 1350
1004
+ },
1005
+ {
1006
+ "epoch": 1.9024134312696748,
1007
+ "grad_norm": 0.27169138193130493,
1008
+ "learning_rate": 7.127347607003929e-05,
1009
+ "loss": 0.0879,
1010
+ "step": 1360
1011
+ },
1012
+ {
1013
+ "epoch": 1.9164043371808326,
1014
+ "grad_norm": 0.2501109540462494,
1015
+ "learning_rate": 6.971819103614118e-05,
1016
+ "loss": 0.0881,
1017
+ "step": 1370
1018
+ },
1019
+ {
1020
+ "epoch": 1.9303952430919902,
1021
+ "grad_norm": 0.2925432324409485,
1022
+ "learning_rate": 6.81709293820914e-05,
1023
+ "loss": 0.0927,
1024
+ "step": 1380
1025
+ },
1026
+ {
1027
+ "epoch": 1.944386149003148,
1028
+ "grad_norm": 0.29960620403289795,
1029
+ "learning_rate": 6.663210106582838e-05,
1030
+ "loss": 0.1028,
1031
+ "step": 1390
1032
+ },
1033
+ {
1034
+ "epoch": 1.9583770549143056,
1035
+ "grad_norm": 0.28269627690315247,
1036
+ "learning_rate": 6.510211381081794e-05,
1037
+ "loss": 0.0961,
1038
+ "step": 1400
1039
+ },
1040
+ {
1041
+ "epoch": 1.9583770549143056,
1042
+ "eval_loss": 0.10136425495147705,
1043
+ "eval_runtime": 22.0658,
1044
+ "eval_samples_per_second": 14.411,
1045
+ "eval_steps_per_second": 3.626,
1046
+ "step": 1400
1047
+ },
1048
+ {
1049
+ "epoch": 1.9723679608254634,
1050
+ "grad_norm": 0.261138379573822,
1051
+ "learning_rate": 6.358137299802416e-05,
1052
+ "loss": 0.0869,
1053
+ "step": 1410
1054
+ },
1055
+ {
1056
+ "epoch": 1.9863588667366212,
1057
+ "grad_norm": 0.2551378309726715,
1058
+ "learning_rate": 6.207028155850062e-05,
1059
+ "loss": 0.1001,
1060
+ "step": 1420
1061
+ },
1062
+ {
1063
+ "epoch": 2.0,
1064
+ "grad_norm": 0.26610472798347473,
1065
+ "learning_rate": 6.0569239866631124e-05,
1066
+ "loss": 0.1051,
1067
+ "step": 1430
1068
+ },
1069
+ {
1070
+ "epoch": 2.013990905911158,
1071
+ "grad_norm": 0.3179965317249298,
1072
+ "learning_rate": 5.90786456340477e-05,
1073
+ "loss": 0.0866,
1074
+ "step": 1440
1075
+ },
1076
+ {
1077
+ "epoch": 2.0279818118223156,
1078
+ "grad_norm": 0.21667960286140442,
1079
+ "learning_rate": 5.759889380425393e-05,
1080
+ "loss": 0.0839,
1081
+ "step": 1450
1082
+ },
1083
+ {
1084
+ "epoch": 2.0419727177334734,
1085
+ "grad_norm": 0.26058515906333923,
1086
+ "learning_rate": 5.613037644798196e-05,
1087
+ "loss": 0.0659,
1088
+ "step": 1460
1089
+ },
1090
+ {
1091
+ "epoch": 2.055963623644631,
1092
+ "grad_norm": 0.2897161841392517,
1093
+ "learning_rate": 5.467348265931063e-05,
1094
+ "loss": 0.0785,
1095
+ "step": 1470
1096
+ },
1097
+ {
1098
+ "epoch": 2.0699545295557886,
1099
+ "grad_norm": 0.24778111279010773,
1100
+ "learning_rate": 5.3228598452572084e-05,
1101
+ "loss": 0.0743,
1102
+ "step": 1480
1103
+ },
1104
+ {
1105
+ "epoch": 2.0839454354669464,
1106
+ "grad_norm": 0.2585526704788208,
1107
+ "learning_rate": 5.179610666007475e-05,
1108
+ "loss": 0.0844,
1109
+ "step": 1490
1110
+ },
1111
+ {
1112
+ "epoch": 2.0979363413781043,
1113
+ "grad_norm": 0.27612507343292236,
1114
+ "learning_rate": 5.037638683066903e-05,
1115
+ "loss": 0.0978,
1116
+ "step": 1500
1117
+ },
1118
+ {
1119
+ "epoch": 2.111927247289262,
1120
+ "grad_norm": 0.2550652325153351,
1121
+ "learning_rate": 4.896981512918325e-05,
1122
+ "loss": 0.0788,
1123
+ "step": 1510
1124
+ },
1125
+ {
1126
+ "epoch": 2.12591815320042,
1127
+ "grad_norm": 0.33637735247612,
1128
+ "learning_rate": 4.757676423675601e-05,
1129
+ "loss": 0.0833,
1130
+ "step": 1520
1131
+ },
1132
+ {
1133
+ "epoch": 2.1399090591115772,
1134
+ "grad_norm": 0.28613343834877014,
1135
+ "learning_rate": 4.619760325209184e-05,
1136
+ "loss": 0.0786,
1137
+ "step": 1530
1138
+ },
1139
+ {
1140
+ "epoch": 2.153899965022735,
1141
+ "grad_norm": 0.22645096480846405,
1142
+ "learning_rate": 4.483269759366569e-05,
1143
+ "loss": 0.0726,
1144
+ "step": 1540
1145
+ },
1146
+ {
1147
+ "epoch": 2.167890870933893,
1148
+ "grad_norm": 0.2636771500110626,
1149
+ "learning_rate": 4.348240890290289e-05,
1150
+ "loss": 0.0794,
1151
+ "step": 1550
1152
+ },
1153
+ {
1154
+ "epoch": 2.1818817768450507,
1155
+ "grad_norm": 0.312181293964386,
1156
+ "learning_rate": 4.214709494835962e-05,
1157
+ "loss": 0.077,
1158
+ "step": 1560
1159
+ },
1160
+ {
1161
+ "epoch": 2.1958726827562085,
1162
+ "grad_norm": 0.32286760210990906,
1163
+ "learning_rate": 4.0827109530929595e-05,
1164
+ "loss": 0.0798,
1165
+ "step": 1570
1166
+ },
1167
+ {
1168
+ "epoch": 2.2098635886673663,
1169
+ "grad_norm": 0.3038155138492584,
1170
+ "learning_rate": 3.952280239010192e-05,
1171
+ "loss": 0.0802,
1172
+ "step": 1580
1173
+ },
1174
+ {
1175
+ "epoch": 2.223854494578524,
1176
+ "grad_norm": 0.28648459911346436,
1177
+ "learning_rate": 3.8234519111295365e-05,
1178
+ "loss": 0.0833,
1179
+ "step": 1590
1180
+ },
1181
+ {
1182
+ "epoch": 2.2378454004896815,
1183
+ "grad_norm": 0.32507434487342834,
1184
+ "learning_rate": 3.6962601034292766e-05,
1185
+ "loss": 0.076,
1186
+ "step": 1600
1187
+ },
1188
+ {
1189
+ "epoch": 2.2378454004896815,
1190
+ "eval_loss": 0.09979136288166046,
1191
+ "eval_runtime": 22.3104,
1192
+ "eval_samples_per_second": 14.253,
1193
+ "eval_steps_per_second": 3.586,
1194
+ "step": 1600
1195
+ },
1196
+ {
1197
+ "epoch": 2.2518363064008393,
1198
+ "grad_norm": 0.25779277086257935,
1199
+ "learning_rate": 3.570738516280092e-05,
1200
+ "loss": 0.0798,
1201
+ "step": 1610
1202
+ },
1203
+ {
1204
+ "epoch": 2.265827212311997,
1205
+ "grad_norm": 0.27955761551856995,
1206
+ "learning_rate": 3.446920407515887e-05,
1207
+ "loss": 0.0758,
1208
+ "step": 1620
1209
+ },
1210
+ {
1211
+ "epoch": 2.279818118223155,
1212
+ "grad_norm": 0.3353288471698761,
1213
+ "learning_rate": 3.3248385836218977e-05,
1214
+ "loss": 0.0803,
1215
+ "step": 1630
1216
+ },
1217
+ {
1218
+ "epoch": 2.2938090241343128,
1219
+ "grad_norm": 0.2533150613307953,
1220
+ "learning_rate": 3.2045253910423864e-05,
1221
+ "loss": 0.0754,
1222
+ "step": 1640
1223
+ },
1224
+ {
1225
+ "epoch": 2.3077999300454706,
1226
+ "grad_norm": 0.30213606357574463,
1227
+ "learning_rate": 3.086012707610209e-05,
1228
+ "loss": 0.0726,
1229
+ "step": 1650
1230
+ },
1231
+ {
1232
+ "epoch": 2.3217908359566284,
1233
+ "grad_norm": 0.3189963400363922,
1234
+ "learning_rate": 2.9693319341005633e-05,
1235
+ "loss": 0.0798,
1236
+ "step": 1660
1237
+ },
1238
+ {
1239
+ "epoch": 2.3357817418677858,
1240
+ "grad_norm": 0.33093076944351196,
1241
+ "learning_rate": 2.8545139859111446e-05,
1242
+ "loss": 0.0719,
1243
+ "step": 1670
1244
+ },
1245
+ {
1246
+ "epoch": 2.3497726477789436,
1247
+ "grad_norm": 0.25722455978393555,
1248
+ "learning_rate": 2.7415892848708725e-05,
1249
+ "loss": 0.069,
1250
+ "step": 1680
1251
+ },
1252
+ {
1253
+ "epoch": 2.3637635536901014,
1254
+ "grad_norm": 0.30695757269859314,
1255
+ "learning_rate": 2.630587751179422e-05,
1256
+ "loss": 0.0822,
1257
+ "step": 1690
1258
+ },
1259
+ {
1260
+ "epoch": 2.377754459601259,
1261
+ "grad_norm": 0.30474889278411865,
1262
+ "learning_rate": 2.5215387954796555e-05,
1263
+ "loss": 0.0744,
1264
+ "step": 1700
1265
+ },
1266
+ {
1267
+ "epoch": 2.391745365512417,
1268
+ "grad_norm": 0.2297676056623459,
1269
+ "learning_rate": 2.414471311065053e-05,
1270
+ "loss": 0.0695,
1271
+ "step": 1710
1272
+ },
1273
+ {
1274
+ "epoch": 2.405736271423575,
1275
+ "grad_norm": 0.4082636535167694,
1276
+ "learning_rate": 2.3094136662242405e-05,
1277
+ "loss": 0.0792,
1278
+ "step": 1720
1279
+ },
1280
+ {
1281
+ "epoch": 2.4197271773347326,
1282
+ "grad_norm": 0.3242763876914978,
1283
+ "learning_rate": 2.2063936967246136e-05,
1284
+ "loss": 0.0823,
1285
+ "step": 1730
1286
+ },
1287
+ {
1288
+ "epoch": 2.43371808324589,
1289
+ "grad_norm": 0.28933578729629517,
1290
+ "learning_rate": 2.1054386984370434e-05,
1291
+ "loss": 0.0768,
1292
+ "step": 1740
1293
+ },
1294
+ {
1295
+ "epoch": 2.447708989157048,
1296
+ "grad_norm": 0.3418210744857788,
1297
+ "learning_rate": 2.006575420103648e-05,
1298
+ "loss": 0.0729,
1299
+ "step": 1750
1300
+ },
1301
+ {
1302
+ "epoch": 2.4616998950682056,
1303
+ "grad_norm": 0.33131641149520874,
1304
+ "learning_rate": 1.9098300562505266e-05,
1305
+ "loss": 0.0851,
1306
+ "step": 1760
1307
+ },
1308
+ {
1309
+ "epoch": 2.4756908009793634,
1310
+ "grad_norm": 0.2488657683134079,
1311
+ "learning_rate": 1.815228240247323e-05,
1312
+ "loss": 0.0703,
1313
+ "step": 1770
1314
+ },
1315
+ {
1316
+ "epoch": 2.4896817068905213,
1317
+ "grad_norm": 0.2939601540565491,
1318
+ "learning_rate": 1.7227950375154912e-05,
1319
+ "loss": 0.068,
1320
+ "step": 1780
1321
+ },
1322
+ {
1323
+ "epoch": 2.5036726128016786,
1324
+ "grad_norm": 0.2726001441478729,
1325
+ "learning_rate": 1.6325549388870365e-05,
1326
+ "loss": 0.0673,
1327
+ "step": 1790
1328
+ },
1329
+ {
1330
+ "epoch": 2.517663518712837,
1331
+ "grad_norm": 0.2877500653266907,
1332
+ "learning_rate": 1.5445318541154942e-05,
1333
+ "loss": 0.0722,
1334
+ "step": 1800
1335
+ },
1336
+ {
1337
+ "epoch": 2.517663518712837,
1338
+ "eval_loss": 0.09834001958370209,
1339
+ "eval_runtime": 21.9639,
1340
+ "eval_samples_per_second": 14.478,
1341
+ "eval_steps_per_second": 3.642,
1342
+ "step": 1800
1343
+ },
1344
+ {
1345
+ "epoch": 2.5316544246239943,
1346
+ "grad_norm": 0.29231616854667664,
1347
+ "learning_rate": 1.458749105540863e-05,
1348
+ "loss": 0.0809,
1349
+ "step": 1810
1350
+ },
1351
+ {
1352
+ "epoch": 2.545645330535152,
1353
+ "grad_norm": 0.3287057876586914,
1354
+ "learning_rate": 1.3752294219102025e-05,
1355
+ "loss": 0.0666,
1356
+ "step": 1820
1357
+ },
1358
+ {
1359
+ "epoch": 2.55963623644631,
1360
+ "grad_norm": 0.32760322093963623,
1361
+ "learning_rate": 1.2939949323554668e-05,
1362
+ "loss": 0.0773,
1363
+ "step": 1830
1364
+ },
1365
+ {
1366
+ "epoch": 2.5736271423574677,
1367
+ "grad_norm": 0.3478274643421173,
1368
+ "learning_rate": 1.2150671605302566e-05,
1369
+ "loss": 0.0777,
1370
+ "step": 1840
1371
+ },
1372
+ {
1373
+ "epoch": 2.5876180482686255,
1374
+ "grad_norm": 0.29048407077789307,
1375
+ "learning_rate": 1.1384670189069635e-05,
1376
+ "loss": 0.078,
1377
+ "step": 1850
1378
+ },
1379
+ {
1380
+ "epoch": 2.601608954179783,
1381
+ "grad_norm": 0.36669981479644775,
1382
+ "learning_rate": 1.0642148032358645e-05,
1383
+ "loss": 0.084,
1384
+ "step": 1860
1385
+ },
1386
+ {
1387
+ "epoch": 2.615599860090941,
1388
+ "grad_norm": 0.3382461667060852,
1389
+ "learning_rate": 9.923301871676227e-06,
1390
+ "loss": 0.0758,
1391
+ "step": 1870
1392
+ },
1393
+ {
1394
+ "epoch": 2.6295907660020985,
1395
+ "grad_norm": 0.3543117344379425,
1396
+ "learning_rate": 9.228322170406056e-06,
1397
+ "loss": 0.0665,
1398
+ "step": 1880
1399
+ },
1400
+ {
1401
+ "epoch": 2.6435816719132563,
1402
+ "grad_norm": 0.4150249660015106,
1403
+ "learning_rate": 8.55739306834431e-06,
1404
+ "loss": 0.0782,
1405
+ "step": 1890
1406
+ },
1407
+ {
1408
+ "epoch": 2.657572577824414,
1409
+ "grad_norm": 0.2844158113002777,
1410
+ "learning_rate": 7.910692332910452e-06,
1411
+ "loss": 0.0723,
1412
+ "step": 1900
1413
+ },
1414
+ {
1415
+ "epoch": 2.671563483735572,
1416
+ "grad_norm": 0.39910125732421875,
1417
+ "learning_rate": 7.288391312046583e-06,
1418
+ "loss": 0.0731,
1419
+ "step": 1910
1420
+ },
1421
+ {
1422
+ "epoch": 2.6855543896467298,
1423
+ "grad_norm": 0.2358187735080719,
1424
+ "learning_rate": 6.690654888817538e-06,
1425
+ "loss": 0.0697,
1426
+ "step": 1920
1427
+ },
1428
+ {
1429
+ "epoch": 2.699545295557887,
1430
+ "grad_norm": 0.3523266017436981,
1431
+ "learning_rate": 6.117641437723931e-06,
1432
+ "loss": 0.0781,
1433
+ "step": 1930
1434
+ },
1435
+ {
1436
+ "epoch": 2.7135362014690454,
1437
+ "grad_norm": 0.3880462348461151,
1438
+ "learning_rate": 5.569502782739766e-06,
1439
+ "loss": 0.0718,
1440
+ "step": 1940
1441
+ },
1442
+ {
1443
+ "epoch": 2.7275271073802028,
1444
+ "grad_norm": 0.3129269778728485,
1445
+ "learning_rate": 5.046384157085537e-06,
1446
+ "loss": 0.0679,
1447
+ "step": 1950
1448
+ },
1449
+ {
1450
+ "epoch": 2.7415180132913606,
1451
+ "grad_norm": 0.33428144454956055,
1452
+ "learning_rate": 4.548424164747667e-06,
1453
+ "loss": 0.069,
1454
+ "step": 1960
1455
+ },
1456
+ {
1457
+ "epoch": 2.7555089192025184,
1458
+ "grad_norm": 0.30948323011398315,
1459
+ "learning_rate": 4.075754743754478e-06,
1460
+ "loss": 0.0625,
1461
+ "step": 1970
1462
+ },
1463
+ {
1464
+ "epoch": 2.769499825113676,
1465
+ "grad_norm": 0.23879970610141754,
1466
+ "learning_rate": 3.6285011312181873e-06,
1467
+ "loss": 0.0801,
1468
+ "step": 1980
1469
+ },
1470
+ {
1471
+ "epoch": 2.783490731024834,
1472
+ "grad_norm": 0.3375139832496643,
1473
+ "learning_rate": 3.2067818301524497e-06,
1474
+ "loss": 0.082,
1475
+ "step": 1990
1476
+ },
1477
+ {
1478
+ "epoch": 2.7974816369359914,
1479
+ "grad_norm": 0.35570380091667175,
1480
+ "learning_rate": 2.810708578074239e-06,
1481
+ "loss": 0.0717,
1482
+ "step": 2000
1483
+ },
1484
+ {
1485
+ "epoch": 2.7974816369359914,
1486
+ "eval_loss": 0.09761384129524231,
1487
+ "eval_runtime": 21.573,
1488
+ "eval_samples_per_second": 14.741,
1489
+ "eval_steps_per_second": 3.708,
1490
+ "step": 2000
1491
+ },
1492
+ {
1493
+ "epoch": 2.811472542847149,
1494
+ "grad_norm": 0.34989166259765625,
1495
+ "learning_rate": 2.440386317398058e-06,
1496
+ "loss": 0.0611,
1497
+ "step": 2010
1498
+ },
1499
+ {
1500
+ "epoch": 2.825463448758307,
1501
+ "grad_norm": 0.29743126034736633,
1502
+ "learning_rate": 2.095913167630814e-06,
1503
+ "loss": 0.0672,
1504
+ "step": 2020
1505
+ },
1506
+ {
1507
+ "epoch": 2.839454354669465,
1508
+ "grad_norm": 0.34374746680259705,
1509
+ "learning_rate": 1.7773803993743177e-06,
1510
+ "loss": 0.0769,
1511
+ "step": 2030
1512
+ },
1513
+ {
1514
+ "epoch": 2.8534452605806226,
1515
+ "grad_norm": 0.32369616627693176,
1516
+ "learning_rate": 1.4848724101425127e-06,
1517
+ "loss": 0.0786,
1518
+ "step": 2040
1519
+ },
1520
+ {
1521
+ "epoch": 2.8674361664917805,
1522
+ "grad_norm": 0.33380308747291565,
1523
+ "learning_rate": 1.2184667019997209e-06,
1524
+ "loss": 0.083,
1525
+ "step": 2050
1526
+ },
1527
+ {
1528
+ "epoch": 2.8814270724029383,
1529
+ "grad_norm": 0.3711698055267334,
1530
+ "learning_rate": 9.782338610259456e-07,
1531
+ "loss": 0.0744,
1532
+ "step": 2060
1533
+ },
1534
+ {
1535
+ "epoch": 2.8954179783140956,
1536
+ "grad_norm": 0.2819616198539734,
1537
+ "learning_rate": 7.642375386145872e-07,
1538
+ "loss": 0.0715,
1539
+ "step": 2070
1540
+ },
1541
+ {
1542
+ "epoch": 2.9094088842252535,
1543
+ "grad_norm": 0.4502160847187042,
1544
+ "learning_rate": 5.765344346075452e-07,
1545
+ "loss": 0.0782,
1546
+ "step": 2080
1547
+ },
1548
+ {
1549
+ "epoch": 2.9233997901364113,
1550
+ "grad_norm": 0.2982568144798279,
1551
+ "learning_rate": 4.1517428227221267e-07,
1552
+ "loss": 0.0701,
1553
+ "step": 2090
1554
+ },
1555
+ {
1556
+ "epoch": 2.937390696047569,
1557
+ "grad_norm": 0.33230841159820557,
1558
+ "learning_rate": 2.8019983512427293e-07,
1559
+ "loss": 0.0778,
1560
+ "step": 2100
1561
+ },
1562
+ {
1563
+ "epoch": 2.951381601958727,
1564
+ "grad_norm": 0.19723743200302124,
1565
+ "learning_rate": 1.7164685559986072e-07,
1566
+ "loss": 0.0652,
1567
+ "step": 2110
1568
+ },
1569
+ {
1570
+ "epoch": 2.9653725078698847,
1571
+ "grad_norm": 0.31668955087661743,
1572
+ "learning_rate": 8.954410558007497e-08,
1573
+ "loss": 0.0709,
1574
+ "step": 2120
1575
+ },
1576
+ {
1577
+ "epoch": 2.9793634137810425,
1578
+ "grad_norm": 0.3358490765094757,
1579
+ "learning_rate": 3.3913338770263925e-08,
1580
+ "loss": 0.0643,
1581
+ "step": 2130
1582
+ },
1583
+ {
1584
+ "epoch": 2.9933543196922,
1585
+ "grad_norm": 0.29635491967201233,
1586
+ "learning_rate": 4.769294936268765e-09,
1587
+ "loss": 0.0747,
1588
+ "step": 2140
1589
+ }
1590
+ ],
1591
+ "logging_steps": 10,
1592
+ "max_steps": 2145,
1593
+ "num_input_tokens_seen": 0,
1594
+ "num_train_epochs": 3,
1595
+ "save_steps": 500,
1596
+ "stateful_callbacks": {
1597
+ "TrainerControl": {
1598
+ "args": {
1599
+ "should_epoch_stop": false,
1600
+ "should_evaluate": false,
1601
+ "should_log": false,
1602
+ "should_save": true,
1603
+ "should_training_stop": true
1604
+ },
1605
+ "attributes": {}
1606
+ }
1607
+ },
1608
+ "total_flos": 1.6652540184035328e+16,
1609
+ "train_batch_size": 1,
1610
+ "trial_name": null,
1611
+ "trial_params": null
1612
+ }
checkpoints/checkpoint-2145/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dbc9bc83f818f5138562feaa20da67402920a7f2ed95028654b04bd38ebe547e
3
+ size 6417
checkpoints/checkpoint-2145/video_preprocessor_config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "do_center_crop": null,
7
+ "do_convert_rgb": true,
8
+ "do_normalize": true,
9
+ "do_rescale": true,
10
+ "do_resize": true,
11
+ "do_sample_frames": true,
12
+ "fps": 2,
13
+ "image_mean": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "image_std": [
19
+ 0.5,
20
+ 0.5,
21
+ 0.5
22
+ ],
23
+ "input_data_format": null,
24
+ "max_frames": 768,
25
+ "merge_size": 2,
26
+ "min_frames": 4,
27
+ "num_frames": null,
28
+ "pad_size": null,
29
+ "patch_size": 16,
30
+ "processor_class": "Qwen3VLProcessor",
31
+ "resample": 3,
32
+ "rescale_factor": 0.00392156862745098,
33
+ "return_metadata": false,
34
+ "size": {
35
+ "longest_edge": 25165824,
36
+ "shortest_edge": 4096
37
+ },
38
+ "temporal_patch_size": 2,
39
+ "video_metadata": null,
40
+ "video_processor_type": "Qwen3VLVideoProcessor"
41
+ }
checkpoints/checkpoint-2145/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
dataset/annotations.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/dataset_info.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fva_affordance_train": {
3
+ "file_name": "train_llamafactory.json",
4
+ "formatting": "sharegpt",
5
+ "columns": {
6
+ "messages": "conversations",
7
+ "images": "images"
8
+ },
9
+ "tags": {
10
+ "role_tag": "from",
11
+ "content_tag": "value",
12
+ "user_tag": "human",
13
+ "assistant_tag": "gpt"
14
+ }
15
+ },
16
+ "fva_affordance_val": {
17
+ "file_name": "val_llamafactory.json",
18
+ "formatting": "sharegpt",
19
+ "columns": {
20
+ "messages": "conversations",
21
+ "images": "images"
22
+ },
23
+ "tags": {
24
+ "role_tag": "from",
25
+ "content_tag": "value",
26
+ "user_tag": "human",
27
+ "assistant_tag": "gpt"
28
+ }
29
+ }
30
+ }
dataset/train_llamafactory.json ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train_msswift.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/val_llamafactory.json ADDED
The diff for this file is too large to render. See raw diff
 
dataset/val_msswift.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
inference.py ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Inference with fine-tuned Qwen3-VL-2B affordance model.
3
+ Tests the LoRA adapter on sample images.
4
+ """
5
+
6
+ import os
7
+ import json
8
+ import torch
9
+ from PIL import Image
10
+ from unsloth import FastVisionModel
11
+
12
+ # ============================================================
13
+ # CONFIG
14
+ # ============================================================
15
+ ADAPTER_PATH = "c:/Fidelity_dynamics/qwen_affordance_exp/output/lora_adapter"
16
+ DATASET_DIR = "c:/Fidelity_dynamics/qwen_affordance_exp/dataset"
17
+ VAL_FILE = os.path.join(DATASET_DIR, "val_msswift.jsonl")
18
+
19
+ # ============================================================
20
+ # LOAD MODEL + ADAPTER
21
+ # ============================================================
22
+ print("Loading model with LoRA adapter...")
23
+
24
+ model, tokenizer = FastVisionModel.from_pretrained(
25
+ ADAPTER_PATH,
26
+ load_in_4bit=True,
27
+ max_seq_length=2048,
28
+ )
29
+
30
+ FastVisionModel.for_inference(model)
31
+ print("Model loaded!\n")
32
+
33
+ # ============================================================
34
+ # RUN INFERENCE ON VALIDATION SAMPLES
35
+ # ============================================================
36
+ # Load a few val samples
37
+ val_data = []
38
+ with open(VAL_FILE, "r", encoding="utf-8") as f:
39
+ for i, line in enumerate(f):
40
+ if i >= 5: # Test on first 5
41
+ break
42
+ val_data.append(json.loads(line.strip()))
43
+
44
+ print("=" * 60)
45
+ print("INFERENCE RESULTS")
46
+ print("=" * 60)
47
+
48
+ for i, sample in enumerate(val_data):
49
+ img_path = sample["images"][0]
50
+ ground_truth = sample["messages"][2]["content"] # assistant response
51
+
52
+ # Load image
53
+ image = Image.open(img_path).convert("RGB")
54
+ image = image.resize((384, 216), Image.LANCZOS)
55
+
56
+ # Build prompt
57
+ messages = [
58
+ {
59
+ "role": "system",
60
+ "content": [{"type": "text", "text": "You are a visual affordance detection assistant. Given a first-person view image, identify what actions can be performed on the visible objects."}],
61
+ },
62
+ {
63
+ "role": "user",
64
+ "content": [
65
+ {"type": "image", "image": image},
66
+ {"type": "text", "text": "What affordances are present in this scene? Describe what actions can be performed on the visible objects."},
67
+ ],
68
+ },
69
+ ]
70
+
71
+ # Tokenize
72
+ input_text = tokenizer.apply_chat_template(
73
+ messages, tokenize=False, add_generation_prompt=True
74
+ )
75
+ inputs = tokenizer(
76
+ input_text,
77
+ return_tensors="pt",
78
+ add_special_tokens=False,
79
+ ).to(model.device)
80
+
81
+ # Generate
82
+ with torch.no_grad():
83
+ output_ids = model.generate(
84
+ **inputs,
85
+ max_new_tokens=256,
86
+ temperature=0.7,
87
+ do_sample=True,
88
+ )
89
+
90
+ # Decode only new tokens
91
+ new_tokens = output_ids[0][inputs["input_ids"].shape[1]:]
92
+ response = tokenizer.decode(new_tokens, skip_special_tokens=True)
93
+
94
+ print(f"\n--- Sample {i+1} ---")
95
+ print(f"Image: {os.path.basename(img_path)}")
96
+ print(f"Ground Truth: {ground_truth[:150]}...")
97
+ print(f"Prediction: {response[:150]}...")
98
+ print()
99
+
100
+ print("=" * 60)
101
+ print("Inference complete!")
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
prepare_finetune_data.py ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import random
4
+
5
+ random.seed(42)
6
+
7
+ SRC = "c:/Fidelity_dynamics/qwen_affordance_exp/dataset/annotations.jsonl"
8
+ OUT_DIR = "c:/Fidelity_dynamics/qwen_affordance_exp/dataset"
9
+ IMG_BASE = "c:/Fidelity_dynamics/qwen_affordance_exp/dataset"
10
+
11
+ # Load annotations
12
+ annotations = []
13
+ with open(SRC, "r") as f:
14
+ for line in f:
15
+ annotations.append(json.loads(line.strip()))
16
+
17
+ print(f"Loaded {len(annotations)} annotations")
18
+
19
+ # Verify all images exist
20
+ missing = 0
21
+ for a in annotations:
22
+ path = os.path.join(IMG_BASE, a['image_path'])
23
+ if not os.path.exists(path):
24
+ missing += 1
25
+ print(f"Missing images: {missing}")
26
+
27
+ # Shuffle and split: 90% train, 10% val
28
+ random.shuffle(annotations)
29
+ split_idx = int(len(annotations) * 0.9)
30
+ train_data = annotations[:split_idx]
31
+ val_data = annotations[split_idx:]
32
+ print(f"Train: {len(train_data)}, Val: {len(val_data)}")
33
+
34
+ # --- Question templates for diversity ---
35
+ questions = [
36
+ "What affordance is present in this scene?",
37
+ "What action can be performed in this image?",
38
+ "Describe the affordance visible in this first-person view.",
39
+ "What can the person do with the objects in this scene?",
40
+ "Identify the possible interaction in this egocentric view.",
41
+ ]
42
+
43
+ def build_answer(ann):
44
+ """Build a rich answer from annotation fields."""
45
+ affordance = ann['affordance']
46
+ caption = ann['raw_caption']
47
+ task = ann['task'].replace('_', ' ')
48
+ return f"The affordance in this scene is: {affordance}. The scene shows {caption}. This is a {task} task captured from an egocentric viewpoint."
49
+
50
+
51
+ # ============================================================
52
+ # FORMAT 1: MS-SWIFT (Official Qwen recommended)
53
+ # ============================================================
54
+ def to_ms_swift(data, filename):
55
+ out_path = os.path.join(OUT_DIR, filename)
56
+ with open(out_path, "w", encoding="utf-8") as f:
57
+ for ann in data:
58
+ img_path = os.path.join(IMG_BASE, ann['image_path']).replace("\\", "/")
59
+ question = random.choice(questions)
60
+ answer = build_answer(ann)
61
+
62
+ entry = {
63
+ "messages": [
64
+ {
65
+ "role": "system",
66
+ "content": "You are a visual affordance detection assistant. Given a first-person view image, identify what actions can be performed on the visible objects."
67
+ },
68
+ {
69
+ "role": "user",
70
+ "content": f"<image>\n{question}"
71
+ },
72
+ {
73
+ "role": "assistant",
74
+ "content": answer
75
+ }
76
+ ],
77
+ "images": [img_path]
78
+ }
79
+ f.write(json.dumps(entry, ensure_ascii=False) + "\n")
80
+ print(f"Written: {out_path} ({len(data)} samples)")
81
+
82
+
83
+ # ============================================================
84
+ # FORMAT 2: LLaMA-Factory ShareGPT
85
+ # ============================================================
86
+ def to_llamafactory(data, filename):
87
+ out_path = os.path.join(OUT_DIR, filename)
88
+ all_entries = []
89
+ for ann in data:
90
+ img_path = ann['image_path'] # relative path
91
+ question = random.choice(questions)
92
+ answer = build_answer(ann)
93
+
94
+ entry = {
95
+ "conversations": [
96
+ {
97
+ "from": "human",
98
+ "value": f"<image>\n{question}"
99
+ },
100
+ {
101
+ "from": "gpt",
102
+ "value": answer
103
+ }
104
+ ],
105
+ "images": [img_path]
106
+ }
107
+ all_entries.append(entry)
108
+
109
+ with open(out_path, "w", encoding="utf-8") as f:
110
+ json.dump(all_entries, f, ensure_ascii=False, indent=2)
111
+ print(f"Written: {out_path} ({len(data)} samples)")
112
+
113
+
114
+ # ============================================================
115
+ # FORMAT 3: LLaMA-Factory dataset_info.json
116
+ # ============================================================
117
+ def write_dataset_info():
118
+ info = {
119
+ "fva_affordance_train": {
120
+ "file_name": "train_llamafactory.json",
121
+ "formatting": "sharegpt",
122
+ "columns": {
123
+ "messages": "conversations",
124
+ "images": "images"
125
+ },
126
+ "tags": {
127
+ "role_tag": "from",
128
+ "content_tag": "value",
129
+ "user_tag": "human",
130
+ "assistant_tag": "gpt"
131
+ }
132
+ },
133
+ "fva_affordance_val": {
134
+ "file_name": "val_llamafactory.json",
135
+ "formatting": "sharegpt",
136
+ "columns": {
137
+ "messages": "conversations",
138
+ "images": "images"
139
+ },
140
+ "tags": {
141
+ "role_tag": "from",
142
+ "content_tag": "value",
143
+ "user_tag": "human",
144
+ "assistant_tag": "gpt"
145
+ }
146
+ }
147
+ }
148
+ out_path = os.path.join(OUT_DIR, "dataset_info.json")
149
+ with open(out_path, "w", encoding="utf-8") as f:
150
+ json.dump(info, f, indent=2)
151
+ print(f"Written: {out_path}")
152
+
153
+
154
+ # Generate all formats
155
+ print("\n" + "=" * 60)
156
+ print("Generating MS-SWIFT format...")
157
+ print("=" * 60)
158
+ to_ms_swift(train_data, "train_msswift.jsonl")
159
+ to_ms_swift(val_data, "val_msswift.jsonl")
160
+
161
+ print("\n" + "=" * 60)
162
+ print("Generating LLaMA-Factory format...")
163
+ print("=" * 60)
164
+ to_llamafactory(train_data, "train_llamafactory.json")
165
+ to_llamafactory(val_data, "val_llamafactory.json")
166
+ write_dataset_info()
167
+
168
+ # Print sample from each format
169
+ print("\n" + "=" * 60)
170
+ print("SAMPLE: MS-SWIFT format")
171
+ print("=" * 60)
172
+ with open(os.path.join(OUT_DIR, "train_msswift.jsonl"), "r") as f:
173
+ sample = json.loads(f.readline())
174
+ print(json.dumps(sample, indent=2))
175
+
176
+ print("\n" + "=" * 60)
177
+ print("SAMPLE: LLaMA-Factory format")
178
+ print("=" * 60)
179
+ with open(os.path.join(OUT_DIR, "train_llamafactory.json"), "r") as f:
180
+ data = json.load(f)
181
+ print(json.dumps(data[0], indent=2))
182
+
183
+ print("\n" + "=" * 60)
184
+ print("ALL FILES GENERATED")
185
+ print("=" * 60)
186
+ for fname in os.listdir(OUT_DIR):
187
+ fpath = os.path.join(OUT_DIR, fname)
188
+ if os.path.isfile(fpath):
189
+ size = os.path.getsize(fpath) / 1024
190
+ print(f" {fname} ({size:.1f} KB)")