Views
No views yet
Qwen/Qwen2-VL-7B-Instruct to detect
nutrition tables in product images: LoRA adapters, per-stage checkpoints, merged weights, and
full optimizer/scheduler/RNG state for both stages.Serving this model? UseMayaKD/qwen2-vl-7b-nutrition-vllminstead. Weights here live in subfolders, which vLLM cannot load directly (there is nosubfolder=parameter). That repo is a flat copy of the final merged weights, and carries the full model card, usage examples, benchmarks, and limitations.
exp13_mod121925_full_visio/ Stage 1 — full vision encoder
├── adapter_model.safetensors LoRA adapter (43 MB)
├── checkpoint-102/ Trainer state: optimizer, scheduler, RNG, tokenizer
└── merged/ Stage 1 adapter merged into base (16.6 GB)
exp13_mod121925_joint/ Stage 2 — joint vision + language
├── adapter_model.safetensors LoRA adapter (205 MB)
├── checkpoint-102/ Trainer state: optimizer, scheduler, RNG, tokenizer
└── merged/ Final model, adapter merged into base (16.6 GB)exp13_mod121925_joint/merged/ is the shipped model. Stage 2 begins from stage 1's merged/
directory, not from stacked adapters.| Stage | Targets | Epochs | Batch × grad-accum | LR |
|---|---|---|---|---|
| 1 — Full vision | All vision blocks (attn + MLP) + merger MLP | 6 | 2 × 16 | 1e-4 |
| 2 — Joint | Vision + LLM q/k/v/o_proj, gate/up/down_proj | 6 | 1 × 32 | 1e-5 |
SFTTrainer + accelerate on 2× RTX Pro 6000. BF16, Flash Attention 2, fused AdamW. Best
checkpoint by eval_loss, early stopping patience 3. Image resolution min_pixels=784,
max_pixels=705600; sequence length is intentionally uncapped, since truncation corrupts
image tokens.| Metric (123 val samples) | Value | |
|---|---|---|
| Mean IoU | 0.82 | primary metric |
| Precision@0.5 | ≤ 0.91 | upper bound |
| Recall@0.5 | ≤ 0.89 | upper bound |
| F1@0.5 | ≤ 0.90 | upper bound |
merge_and_unload() and save_pretrained() concurrently, the
processes interleave writes to the same shards. The result loads without error but scores
0.300 IoU against 0.794 for the identical in-memory model.accelerator.is_main_process, fenced by
wait_for_everyone() barriers on both sides. All checkpoints in this repo were produced after
that fix; pre-merge and post-merge evaluations agree within ~1%.MayaKD/qwen2-vl-7b-nutrition-vllmopenfoodfacts/nutrition-table-detection