This document supersedes the earlier GQA dataset choice for implementation. The research survey remains useful for method selection, but the deployed project uses VQAv2 as the only primary training dataset to match Project 019.
- Primary dataset: VQAv2 train/val with MS COCO 2014 images.
- Backbones: BLIP-2 Flan-T5-XL and InstructBLIP Flan-T5-XL.
- PEFT comparison: Q-Former LoRA, LLM LoRA, and dual-module LoRA.
- Standard metrics: official VQA soft accuracy overall and by answer type.
- Hallucination focus: object existence, counting, complementary-pair visual dependence, mismatched-image sensitivity, and answer coverage.
- Inference-time method: Visual Contrastive Decoding after stable SFT baselines.
- Optional external evaluation: POPE/HallusionBench only after the primary VQAv2 result is reproducible.
Every large or rapidly growing path lives under:
/root/autodl-tmp/vision-language
The system disk must not contain datasets, environments, model snapshots,
Hugging Face caches, pip caches, temporary training files, or checkpoints.
Run source scripts/server_env.sh before any project command.
- PyTorch recognizes RTX 5090 and can allocate a CUDA tensor.
- All unit tests pass.
- System disk use remains effectively unchanged after dependency installation.
- BLIP-2 and InstructBLIP load in 4-bit mode.
- Both answer the same fixed COCO smoke-test question.
- Record peak VRAM, latency, package versions, prompt, and decoding parameters.
- Download val questions, annotations, and val2014 images first.
- Verify every ZIP before extraction.
- Validate 100 random question/image/annotation joins.
- Confirm normalization and leave-one-annotator-out scoring with tests.
- Evaluate a deterministic validation subset first, then full validation.
- Report overall, yes/no, number, and other accuracy.
- Add blank-image and mismatched-image diagnostics.
- Overfit 32 examples with Q-Former LoRA.
- Repeat with LLM-only and dual LoRA.
- Verify only intended adapter parameters receive gradients.
- Save and reload adapters; predictions must be stable.
- Use matched data order, seed, effective batch size, and decoding.
- Compare accuracy, trainable parameters, VRAM, throughput, and adapter size.
- Select the best BLIP-2 adapter scope before training InstructBLIP.
- Use VQAv2 complementary image pairs as visual-dependence supervision.
- Use COCO instance annotations to generate verified absent-object and count negatives.
- Compare SFT with SFT plus hallucination-aware contrastive training.
- Reject improvements caused by answer shortening or excessive
noresponses.
- Compare greedy decoding and VCD with identical maximum output length.
- Run three seeds for final variants.
- Produce prediction files, metrics, bootstrap intervals, error categories, model card, and reproducible commands.
| ID | Backbone | Adapter | Hallucination loss | Decoding |
|---|---|---|---|---|
| E0 | BLIP-2 | none | none | greedy |
| E1 | InstructBLIP | none | none | greedy |
| E2 | BLIP-2 | Q-Former LoRA | none | greedy |
| E3 | BLIP-2 | LLM LoRA | none | greedy |
| E4 | BLIP-2 | dual LoRA | none | greedy |
| E5 | InstructBLIP | best matched LoRA | none | greedy |
| E6 | BLIP-2 | best LoRA | grounded contrastive | greedy |
| E7 | InstructBLIP | best LoRA | grounded contrastive | greedy |
| E8 | best E6/E7 | unchanged | unchanged | VCD |
- Install CUDA-capable PyTorch and project dependencies in the data-disk venv.
- Run unit tests and CUDA capability check.
- Download model processors/configs and run BLIP-2 smoke inference.
- Run InstructBLIP smoke inference.
- Download VQAv2 validation metadata and images in a detached
screenjob. - Run a 100-sample data-integrity audit.
- Produce E0/E1 predictions on a small deterministic subset.