Upload configs/sft_box_12g.yaml with huggingface_hub
Browse files- configs/sft_box_12g.yaml +50 -0
configs/sft_box_12g.yaml
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 专家 SFT (Box) - 适配 12G 显存
|
| 2 |
+
# 从预训练 final checkpoint 继续,统一训练 grounding + counting + spatial
|
| 3 |
+
# 使用统一 thinking 模板: "1. Analyzing → 2. Object grounding → 3. Conclusion"
|
| 4 |
+
|
| 5 |
+
model_name_or_path: "outputs/pretrain/final"
|
| 6 |
+
freeze_vision_tower: true
|
| 7 |
+
freeze_llm: false
|
| 8 |
+
use_lora: true
|
| 9 |
+
lora_r: 64
|
| 10 |
+
lora_alpha: 128
|
| 11 |
+
lora_target_modules:
|
| 12 |
+
- "q_proj"
|
| 13 |
+
- "k_proj"
|
| 14 |
+
- "v_proj"
|
| 15 |
+
- "o_proj"
|
| 16 |
+
- "gate_proj"
|
| 17 |
+
- "up_proj"
|
| 18 |
+
- "down_proj"
|
| 19 |
+
lora_dropout: 0.05
|
| 20 |
+
torch_dtype: "bfloat16"
|
| 21 |
+
|
| 22 |
+
load_in_4bit: false
|
| 23 |
+
load_in_8bit: false
|
| 24 |
+
|
| 25 |
+
datasets:
|
| 26 |
+
- path: "data/sft/grounding/sft_grounding.jsonl"
|
| 27 |
+
image_root: "data/coco/train/coco/train"
|
| 28 |
+
task_type: "grounding"
|
| 29 |
+
weight: 1.0
|
| 30 |
+
- path: "data/sft/counting/counting_data.jsonl"
|
| 31 |
+
image_root: "data/coco/train/coco/train"
|
| 32 |
+
task_type: "counting"
|
| 33 |
+
weight: 1.0
|
| 34 |
+
- path: "data/sft/spatial/spatial_data.jsonl"
|
| 35 |
+
image_root: "data/sft/spatial"
|
| 36 |
+
task_type: "spatial"
|
| 37 |
+
weight: 1.0
|
| 38 |
+
|
| 39 |
+
total_samples: 40000
|
| 40 |
+
batch_size: 1
|
| 41 |
+
gradient_accumulation_steps: 16
|
| 42 |
+
epochs: 5
|
| 43 |
+
learning_rate: 5.0e-5
|
| 44 |
+
weight_decay: 0.01
|
| 45 |
+
warmup_ratio: 0.03
|
| 46 |
+
max_length: 1024
|
| 47 |
+
image_size: 336
|
| 48 |
+
num_workers: 0
|
| 49 |
+
save_every: 1
|
| 50 |
+
device: "cuda"
|