microsoft / microsoft/winml-cli
pix2struct + vilt / 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 pix2struct and vilt models fail on visual-question-answering. Pix2struct's ONNX config does not list visual-question-answering as a supported task. ViLT has no OnnxConfig registered at all.
Eval Results (2026-03-11)
| Status | Model | model_type | Task | Error |
|---|---|---|---|---|
| FAIL | google/pix2struct-docvqa-base | pix2struct | visual-question-answering | pix2struct doesn't support task visual-question-answering for the onnx backend |
| FAIL | google/pix2struct-ai2d-base | pix2struct | visual-question-answering | same |
| FAIL | google/deplot | pix2struct | visual-question-answering | same |
| FAIL | dandelin/vilt-b32-finetuned-vqa | vilt | visual-question-answering | No OnnxConfig registered for model_type='vilt' with task='visual-question-answering' |
4/4 models fail — 0 pass.
Root Cause
- pix2struct: Optimum's
pix2structOnnxConfig only supportsimage-to-text— notvisual-question-answering. Pix2struct performs VQA by taking image + question as input and generating an answer (seq2seq). The task needs to be registered as an alias or a dedicated config added. - vilt: No OnnxConfig exists for
viltmodel type in either Optimum or ModelKit. ViLT (Vision-and-Language Transformer) is a multimodal model requiring custom ONNX export config.
Current State
- No
pix2struct.pyorvilt.pyinmodelkit/models/hf/ - Optimum supports
pix2structforimage-to-textbut notvisual-question-answering - ViLT has no Optimum ONNX support
Desired State
All 4 models pass wmk perf.
Acceptance Criteria
-
google/pix2struct-docvqa-base,pix2struct-ai2d-base,google/deplotpasswmk perf -
dandelin/vilt-b32-finetuned-vqapasseswmk 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
- pix2struct VQA:
visual-question-answeringis architecturally equivalent toimage-to-textfor pix2struct (image + text prompt → text answer). Registervisual-question-answeringas a task alias in a customPix2StructIOConfigusing@register_onnx_overwrite("pix2struct", "visual-question-answering", ...) - pix2struct inputs: Uses
flattened_patches(notpixel_values) +attention_mask— dummy input generator must handle this non-standard input name - vilt: ViLT takes
pixel_values+input_ids+token_type_ids+attention_mask. Will need a customViltOnnxConfig. Check if Optimum has any vilt support upstream. - Both pix2struct and vilt may also hit the EncoderDecoderCache issue if they use seq2seq generation (pix2struct does)
Related Files
modelkit/models/hf/blip.py— pattern for multimodal ONNX config registrationmodelkit/export/io.py—register_onnx_overwrite()eval_results/2026-03-11/models/google__pix2struct-docvqa-base__visual-question-answering/result.jsoneval_results/2026-03-11/models/dandelin__vilt-b32-finetuned-vqa__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 by reading modelkit/models/hf/blip.py for the multimodal ONNX configuration pattern and modelkit/export/io.py for register_onnx_overwrite(). Review the listed evaluation result files, then run the visual-question-answering checks and uv run pytest tests/. Done means all four named models pass wmk perf without hardcoded IDs and the full test suite passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100