feat(exp): 四个 Arm 的实验编排与基准脚本

同一模型、同一批 5184 张图、同样 100 epoch,只换监督信号:
- Arm C: VLM 重描述(唯一长 caption)
- Arm D: 同 C 数据,模型缩到 13.4M(5.1M 非嵌入)
- Arm E: prompt 压成 4 个共享模板
- Arm F: 颜色 + 车身两级模板

结果:C/D 颜色词被忽略(码一致率 0.75 / 0.60),
E 降到 0.000 且色相 3/4 命中,F 在 20 格交叉积上只剩 1 列稳定。

bench_strata: strata(Qwen3.8)视觉描述的延迟与吞吐基准,1.06 s/img。
compare_gen: 多检查点批量出图对比。pdl.sh: 分片下载辅助。
This commit is contained in:
liuhuajie committed 2026-12-03 10:37:55 +08:00
1 parent 5d2d3a2fb5
commit 9e29277715
7 files changed
+307

No files matched your search

Executable
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# Arm D: same 5,184 VLM captions, same iters, but a much smaller model.
# Hypothesis: the 45M model memorised the dataset (val image-token acc 0.002)
# and therefore encodes "car -> that exact image" instead of the colour attribute.
# If capacity is the binding constraint, a ~5M non-embedding model must generalise.
set -e
cd /home/lhj/projects/tiny-gpt/mm
PY=/home/lhj/projects/tiny-gpt/.venv/bin/python
echo "=== train Arm D (small) ==="
$PY train.py \
--data ../data_mm_car_q/train.bin --val_data ../data_mm_car_q/val.bin --row_len 128 \
--n_layer 4 --n_embd 256 --n_head 8 --n_kv_head 4 \
--ngram_vocab 65536 --ngram_dim 32 \
--batch_size 64 --grad_accum 2 \
--max_iters 4050 --warmup 100 \
--eval_interval 405 --eval_iters 20 \
--log_interval 405 --save_interval 0 \
--mtp 0 --out_dir out_car_d 2>&1 | grep -Ev '^\s*$'
echo "=== probe Arm D ==="
$PY probe_ctrl.py --ckpt out_car_d/ckpt.pt --label armD 2>&1 | tail -10
echo "=== ARM D DONE ==="