microsoft / microsoft/winml-cli

deberta + deberta-v2 / text-classification + zero-shot-classification: all models pass wmk perf

Open
#128 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

graph-optimizer model / task scale NPU P2 triaged
Dominant language
Python
Stars
40
Forks
11
Avg merge
1d 8h
Merged PRs (30d)
50

Description

Summary

DeBERTa (v1 xlarge) fails with ONNX protobuf size limit. Multiple mDeBERTa-v3 models (deberta-v2) hit compilation timeouts. This blocks the entire DeBERTa family across text-classification and zero-shot-classification tasks.

Eval Results (2026-03-11)

Status Model model_type Task Error
FAIL microsoft/deberta-xlarge-mnli deberta text-classification Error parsing message with type 'onnx.ModelProto'
FAIL MoritzLaurer/deberta-v3-large-zeroshot-v2.0 deberta-v2 zero-shot-classification TIMEOUT (600s)
FAIL MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli deberta-v2 zero-shot-classification TIMEOUT (600s)
FAIL MoritzLaurer/mDeBERTa-v3-base-mnli-xnli deberta-v2 zero-shot-classification TIMEOUT (3753s)
PASS cross-encoder/nli-deberta-v3-small deberta-v2 zero-shot-classification ✓ (382s)
PASS MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 deberta-v2 zero-shot-classification ✓ (463s)

4 fail, 2 pass — larger models hit TIMEOUT.

Root Cause

  1. deberta-xlarge (deberta model_type): Large model ONNX exceeds 2GB protobuf limit — same as xlm-roberta issue (#429). Fix: external data format.
  2. mDeBERTa-v3-large (deberta-v2 model_type): Small deberta-v2 models pass (nli-deberta-v3-small ✓), but large variants timeout during compilation or export. DeBERTa-v3 uses a disentangled attention mechanism with complex graph structure that slows compilation on QNN.

Current State

  • No deberta.py in modelkit/models/hf/
  • cross-encoder/nli-deberta-v3-small passes — confirms deberta-v2 export path works for small models
  • Timeout for large deberta-v2 models suggests compilation (QNN graph compose) is the bottleneck

Desired State

All 4 failing DeBERTa models pass wmk perf.

Acceptance Criteria

  • microsoft/deberta-xlarge-mnli passes (fix ONNX size via external data format)
  • MoritzLaurer/deberta-v3-large-zeroshot-v2.0 passes
  • MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli passes
  • MoritzLaurer/mDeBERTa-v3-base-mnli-xnli passes
  • Fix is universal — no hardcoded model names (CLAUDE.md Cardinal Rule #1)
  • uv run pytest tests/ passes (CLAUDE.md Cardinal Rule #3)

Technical Notes

  • For deberta-xlarge ONNX size: same fix as xlm-roberta/qwen — enable external data format
  • For deberta-v2 timeouts: investigate if compilation timeout is in ONNX export phase or QNN compilation phase. Consider raising the timeout threshold, or adding a DeBERTa-specific optimization config that reduces graph complexity (e.g., attention head fusion)
  • mDeBERTa-v3-base-mnli-xnli ran for 3753s (>1h) — indicates a loop/hang, not just slow compilation

Related Files

  • modelkit/models/hf/bert.py — pattern for model config
  • modelkit/export/config.py — export config with potential timeout/size settings
  • eval_results/2026-03-11/models/microsoft__deberta-xlarge-mnli__text-classification/result.json

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with modelkit/models/hf/bert.py and modelkit/export/config.py, then inspect eval_results/2026-03-11/models/microsoft__deberta-xlarge-mnli__text-classification/result.json. Run the listed wmk perf cases to determine whether the DeBERTa-v2 timeout occurs during export or QNN compilation, and compare external-data handling for related models. Done means all four named models pass wmk perf, uv run pytest tests/ passes, and no model-specific workaround is added.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.