Upload configs/opd_12g.yaml with huggingface_hub
Browse files- configs/opd_12g.yaml +55 -0
configs/opd_12g.yaml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OPD 蒸馏 - 适配 12G 显存 (4070 Ti)
|
| 2 |
+
# 将 SFT box 专家 + SFT point 专家蒸馏为统一模型
|
| 3 |
+
# 按任务路由 teacher: counting/spatial→box, maze/path→point
|
| 4 |
+
# 使用 forward KL + 温度缩放,student 从 pretrain 初始化
|
| 5 |
+
|
| 6 |
+
student_model: "outputs/sft_box/final"
|
| 7 |
+
teacher_models:
|
| 8 |
+
- "outputs/sft_box/final"
|
| 9 |
+
- "outputs/sft_point/final"
|
| 10 |
+
teacher_weights:
|
| 11 |
+
- 0.5
|
| 12 |
+
- 0.5
|
| 13 |
+
|
| 14 |
+
freeze_vision_tower: true
|
| 15 |
+
freeze_llm: false
|
| 16 |
+
torch_dtype: "bfloat16"
|
| 17 |
+
|
| 18 |
+
load_in_4bit: true
|
| 19 |
+
load_in_8bit: false
|
| 20 |
+
|
| 21 |
+
datasets:
|
| 22 |
+
- path: "data/sft/grounding/sft_grounding.jsonl"
|
| 23 |
+
image_root: "data/coco/train/coco/train"
|
| 24 |
+
task_type: "grounding"
|
| 25 |
+
weight: 2.0
|
| 26 |
+
- path: "data/sft/counting/counting_data.jsonl"
|
| 27 |
+
image_root: "data/coco/train/coco/train"
|
| 28 |
+
task_type: "counting"
|
| 29 |
+
weight: 2.0
|
| 30 |
+
- path: "data/sft/spatial/spatial_data.jsonl"
|
| 31 |
+
image_root: "data/sft/spatial"
|
| 32 |
+
task_type: "spatial"
|
| 33 |
+
weight: 1.0
|
| 34 |
+
- path: "data/sft/maze/maze_data.jsonl"
|
| 35 |
+
image_root: "data/sft/maze"
|
| 36 |
+
task_type: "maze"
|
| 37 |
+
weight: 1.0
|
| 38 |
+
- path: "data/sft/path/path_data.jsonl"
|
| 39 |
+
image_root: "data/sft/path"
|
| 40 |
+
task_type: "path"
|
| 41 |
+
weight: 1.0
|
| 42 |
+
|
| 43 |
+
batch_size: 1
|
| 44 |
+
gradient_accumulation_steps: 16
|
| 45 |
+
epochs: 3
|
| 46 |
+
learning_rate: 1.0e-6
|
| 47 |
+
temperature: 1.0
|
| 48 |
+
ce_coeff: 0.5
|
| 49 |
+
weight_decay: 0.01
|
| 50 |
+
warmup_ratio: 0.05
|
| 51 |
+
max_length: 1024
|
| 52 |
+
image_size: 336
|
| 53 |
+
num_workers: 0
|
| 54 |
+
save_every: 1
|
| 55 |
+
device: "cuda"
|