microsoft / microsoft/winml-cli
blip + blip-2 / visual-question-answering: all models pass wmk perf
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40
- Forks
- 11
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 50
Description
Summary
All BLIP and BLIP-2 models fail on visual-question-answering. BLIP reports the task is not supported by its ONNX config. BLIP-2 has no OnnxConfig registered at all for visual-question-answering. ModelKit has a modelkit/models/hf/blip.py but it does not cover the VQA task.
Eval Results (2026-03-11)
| Status | Model | model_type | Task | Error |
|---|---|---|---|---|
| FAIL | Salesforce/blip-vqa-base | blip | visual-question-answering | blip doesn't support task visual-question-answering for the onnx backend. Supported tasks are: image-to-text, image-text-to-text |
| FAIL | Salesforce/blip2-opt-2.7b | blip-2 | visual-question-answering | No OnnxConfig registered for model_type='blip-2' with task='visual-question-answering' |
| FAIL | Salesforce/blip2-opt-2.7b-coco | blip-2 | visual-question-answering | same |
| FAIL | Salesforce/blip2-flan-t5-xl | blip-2 | visual-question-answering | same |
4/4 models fail — 0 pass.
Root Cause
- BLIP (blip):
modelkit/models/hf/blip.pyregisters ONNX configs forimage-to-textandimage-text-to-textonly.visual-question-answeringis architecturally equivalent toimage-text-to-textfor BLIP (image + question → answer) but is not registered as a supported task alias. - BLIP-2 (blip-2): No OnnxConfig registered for
blip-2model type at all —modelkit/models/hf/blip.pyonly coversblip, notblip-2. BLIP-2 uses a different architecture (Q-Former + frozen LLM backbone).
Current State
modelkit/models/hf/blip.py— exists, coversblipmodel_type forimage-to-textandimage-text-to-text- No registration for
blip+visual-question-answering - No registration for
blip-2model type at all
Desired State
All 4 BLIP/BLIP-2 VQA models pass wmk perf.
Acceptance Criteria
-
Salesforce/blip-vqa-basepasseswmk perf -
Salesforce/blip2-opt-2.7bpasseswmk perf -
Salesforce/blip2-opt-2.7b-cocopasseswmk perf -
Salesforce/blip2-flan-t5-xlpasseswmk perf - Fix is universal — no hardcoded model IDs (CLAUDE.md Cardinal Rule #1)
-
uv run pytest tests/passes (CLAUDE.md Cardinal Rule #3)
Technical Notes
- BLIP VQA: Add
visual-question-answeringas a registered task for theblipONNX config, mapping to the same config asimage-text-to-text - BLIP-2: Complex multi-stage architecture (ViT image encoder → Q-Former → language model). May require a custom
Blip2OnnxConfigor separate encoder/decoder export strategy. Check Optimum'sBlip2OnnxConfigif it exists. - BLIP-2 models are large (2.7B params) — may also need external data format for ONNX export
Salesforce/blip2-flan-t5-xluses T5 as LLM backbone — the T5 encoder-decoder cache issue (#426) may also apply
Related Files
modelkit/models/hf/blip.py— existing BLIP config (needs VQA task + blip-2 extension)modelkit/models/hf/__init__.py— where blip-2 config import would be addedmodelkit/export/io.py—register_onnx_overwrite()eval_results/2026-03-11/models/Salesforce__blip-vqa-base__visual-question-answering/result.jsoneval_results/2026-03-11/models/Salesforce__blip2-opt-2.7b__visual-question-answering/result.json
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with modelkit/models/hf/blip.py and modelkit/models/hf/init.py, then inspect modelkit/export/io.py and Optimum's Blip2OnnxConfig support. Compare the listed eval result files and existing tests before determining how BLIP and BLIP-2 VQA exports are registered. Done means all four models pass wmk perf and uv run pytest tests/ passes without hardcoded model IDs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100