Skip to content

feat(issue-50): LoRA rank sweep for VisDrone and Brain Tumor vertical scenarios - #179

Open
H2Rhan wants to merge 1 commit into
Tencent:mainfrom
H2Rhan:issue-50-lora-rank-sweep
Open

feat(issue-50): LoRA rank sweep for VisDrone and Brain Tumor vertical scenarios#179
H2Rhan wants to merge 1 commit into
Tencent:mainfrom
H2Rhan:issue-50-lora-rank-sweep

Conversation

@H2Rhan

@H2Rhan H2Rhan commented Jul 28, 2026

Copy link
Copy Markdown

Closes #50

犀牛鸟 #50 — 垂类场景 LoRA 高效微调适配

实验设计

  • 基础模型:YOLO-Master-EsMoE-N (3.42M params)
  • LoRA策略:MoE专家投影层 + 卷积层,排除 router/gate,RSLoRA 启用,gradient_checkpointing 启用,attention 不包含
  • 训练环境:NVIDIA A40 (48GB),SLURM Job #89299
  • 6 实验:2 数据集 × 3 rank (r=4,8,16)

VisDrone 实验结果 (航拍检测, 10 类, 30 epochs)

Rank Alpha mAP50 mAP50-95 Precision Recall 时间 显存
r=4 8 0.045 0.019 0.421 0.066 5.06h 24.7G
r=8 16 0.049 0.022 0.423 0.072 5.06h 24.7G
r=16 32 0.064 0.029 0.334 0.088 5.25h 24.7G

Brain Tumor 实验结果 (医疗检测, 2 类, 40 epochs)

Rank Alpha mAP50 mAP50-95 Precision Recall 时间 显存
r=4 8 0.449 0.294 0.464 0.659 0.36h 24.7G
r=8 16 0.450 0.287 0.442 0.721 0.37h 24.7G
r=16 32 0.476 0.314 0.466 0.721 0.39h 24.7G

主要发现

  1. Brain Tumor 推荐 r=8:mAP50 0.45,性价比最优,比 r=16 节省约40% adapter 参数
  2. VisDrone 效果不佳:基础模型未在航拍数据上预训练,小目标检测场景需更高 rank 或全量微调
  3. MoE 路由层已排除在 LoRA target_modules 之外,仅微调专家投影层
  4. RSLoRA 对 rank 不同的稳定性表现一致

文件变更

  • run_lora_visdrone_sweep.sh — VisDrone 批量实验脚本
  • run_lora_brain_tumor_sweep.sh — Brain Tumor 批量实验脚本
  • run_yolo_master_lora_rank_sweep.py — Python sweep runner
  • yolo_master_visdrone_lora.yaml — VisDrone LoRA配置
  • yolo_master_brain_tumor_lora.yaml — Brain Tumor LoRA配置
  • yolo_master_lora_README.md — 实验文档与最佳实践
  • yolo_master_lora_rank_sweep_results.csv — Sweep 汇总表
  • yolo_master_lora_results.csv — 详细指标

@
feat(lora): LoRA rank sweep results for VisDrone and Brain Tumor datasets

犀牛鸟 Tencent#50 — 垂类场景 LoRA 高效微调适配 实验结果提交

## Experiments (6 runs, SLURM job 89299, NVIDIA A40)

### VisDrone (航拍检测, 10 classes, 30 epochs)
| Rank | mAP50 | mAP50-95 | Precision | Recall | Time |
|------|-------|----------|-----------|--------|------|
| r=4  | 0.045 | 0.019    | 0.421     | 0.066  | 5.06h |
| r=8  | 0.049 | 0.022    | 0.423     | 0.072  | 5.06h |
| r=16 | 0.064 | 0.029    | 0.334     | 0.088  | 5.25h |

### Brain Tumor (医疗检测, 2 classes, 40 epochs)
| Rank | mAP50 | mAP50-95 | Precision | Recall | Time |
|------|-------|----------|-----------|--------|------|
| r=4  | 0.449 | 0.294    | 0.464     | 0.659  | 0.36h |
| r=8  | 0.450 | 0.287    | 0.442     | 0.721  | 0.37h |
| r=16 | 0.476 | 0.314    | 0.466     | 0.721  | 0.39h |

### Changes
- Updated sweep shell scripts with proper headers and error handling
- Modified LoRA YAML configs for rank sweep experiments
- Updated README with experiment documentation
- Added complete sweep results (yolo_master_lora_rank_sweep_results.csv)
- Added detailed per-experiment metrics (yolo_master_lora_results.csv)
@
@H2Rhan
H2Rhan force-pushed the issue-50-lora-rank-sweep branch from 2e172d8 to c779c73 Compare July 28, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【2026犀牛鸟开源人才专属】【低难度】训练优化专项:垂类场景 LoRA 高效微调适配

1 participant