Skip to content

recipe(mpnet): add dell-research-harvard/lt-wikidata-comp-en (feature-extraction, sentence-similarity)#1112

Open
DingmaomaoBJTU wants to merge 4 commits into
mainfrom
add-dell-research-harvard-lt-wikidata-comp-en
Open

recipe(mpnet): add dell-research-harvard/lt-wikidata-comp-en (feature-extraction, sentence-similarity)#1112
DingmaomaoBJTU wants to merge 4 commits into
mainfrom
add-dell-research-harvard-lt-wikidata-comp-en

Conversation

@DingmaomaoBJTU

Copy link
Copy Markdown
Collaborator

This draft adds curated WinML recipes for dell-research-harvard/lt-wikidata-comp-en, a LinkTransformer entity/record-linkage sentence embedder using mpnet / MPNetModel. It ships four recipe configs: feature-extraction and sentence-similarity, each in the catalog fp16 unquantized bucket plus w8a16 QDQ form. This is a recipe-only L0 contribution: the baseline auto-config on origin/main already builds MPNet through vendor support, so no per-architecture WinML code is changed. Highest verified goal is L1 PASS on CPU; GPU/NPU and full 10-bucket fp16 eval remain deferred/blocked as described below.

Summary

  • Model: dell-research-harvard/lt-wikidata-comp-en.
  • What it is: LinkTransformer entity/record-linkage sentence embedder fine-tuned from sentence-transformers/multi-qa-mpnet-base-dot-v1; Hugging Face model_type=mpnet, MPNetModel, encoder-only CLS-pooling.
  • Added recipes: 4 configs total — feature-extraction + sentence-similarity, each with fp16 + w8a16 variants.
  • Contribution type: recipe-only L0; baseline auto-config on origin/main already builds, so no WinML model code is included.

Effort / Goal / Outcome tiers

  • Effort: L0 (new recipe, existing mpnet template/vendor path; no code).
  • Goal ceiling: L1 (perf).
  • Outcome: L0 (recipes + README).
  • Target EPs: ["cpu"].

Files changed

  • examples/recipes/README.md
  • examples/recipes/dell-research-harvard_lt-wikidata-comp-en/feature-extraction_fp16_config.json
  • examples/recipes/dell-research-harvard_lt-wikidata-comp-en/feature-extraction_w8a16_config.json
  • examples/recipes/dell-research-harvard_lt-wikidata-comp-en/sentence-similarity_fp16_config.json
  • examples/recipes/dell-research-harvard_lt-wikidata-comp-en/sentence-similarity_w8a16_config.json

models_all.json is intentionally untouched, matching prior recipe-PR precedent.

Recipe design

The recipes mirror the existing sentence-transformers/multi-qa-mpnet-base-dot-v1 template. The fp16 recipes use quant: null: this is the catalog unquantized bucket, realized per EP by --precision fp16; on CPU it remains FLOAT-dominant/fp32 by design. This is the catalog convention, not a mislabel (see #1097). The w8a16 recipes use QDQ UINT8/UINT16 quantization with quant.model_id set to dell-research-harvard/lt-wikidata-comp-en for calibration.

Verification / evidence

1. Recipe path(s)

  • examples/recipes/dell-research-harvard_lt-wikidata-comp-en/feature-extraction_fp16_config.json
  • examples/recipes/dell-research-harvard_lt-wikidata-comp-en/feature-extraction_w8a16_config.json
  • examples/recipes/dell-research-harvard_lt-wikidata-comp-en/sentence-similarity_fp16_config.json
  • examples/recipes/dell-research-harvard_lt-wikidata-comp-en/sentence-similarity_w8a16_config.json

2. README row

Added rows:

Model Task
dell-research-harvard/lt-wikidata-comp-en feature-extraction
dell-research-harvard/lt-wikidata-comp-en sentence-similarity

Updated total line to 77 curated (model, task) tuples and explicitly notes these new rows are build + CPU-perf verified, with full-bucket fp16 eval pending.

3. Build output dir

N/A — tester supplied build verdicts/timings and dtype counts, but did not supply a build output directory path.

4. Build log

L0 build PASS from tester verdicts:

Recipe Verdict Build time Dtype evidence
feature-extraction fp16 PASS 193.4s {FLOAT:200, INT32:1, INT64:55}
feature-extraction w8a16 PASS 176.5s includes {UINT16:221, UINT8:194}
sentence-similarity fp16 PASS 184.2s {FLOAT:200, INT32:1, INT64:55}

The fp16 dtype distribution is FLOAT-dominant with zero FLOAT16, which is expected unquantized-bucket-on-CPU behavior. The w8a16 dtype counts show genuine quantization.

5. Appended findings

Lane A reference only; not included in this Lane B PR:

  • mpnet.json: mpnet-001, mpnet-002, mpnet-003.
  • skill_meta/findings.json: _meta-061, _meta-062, _meta-063.

6. Optimum-coverage probe

VENDOR-ONLY. Baseline auto-config build on origin/main passed for MPNet; no WinML code change was needed.

7. Claimed (Effort, Goal, Outcome)

  • Effort L0.
  • Goal L1.
  • Outcome L0.
  • Ceiling held: L1 PASS.

8. Goal-ladder verdict table

Tier Verdict Evidence
L0 build PASS feature-extraction fp16 193.4s; feature-extraction w8a16 176.5s; sentence-similarity fp16 184.2s. fp16 dtypes {FLOAT:200, INT32:1, INT64:55}; w8a16 includes UINT16:221, UINT8:194.
L1 perf (CPU) PASS fp16 mean 1455.6ms (winml perf) / 2505.9ms (custom valid-input harness); w8a16 mean 7207.3ms (winml perf) / 5703.1ms (custom valid-input harness). w8a16 is slower than fp16 on CPU; expected quant inversion, not a defect.
GPU/NPU HOST-BLOCKED CPU-only host.

9. Methodology-evolution declaration

Learner recorded Lane A findings _meta-061, _meta-062, and _meta-063; these are intentionally not part of this Lane B model PR.

10. Perf & eval data

EP / Device Precision Verdict Mean (winml perf) Mean (custom valid-input harness) Notes
CPU / cpu fp16 bucket PASS 1455.6ms 2505.9ms CPU realizes this unquantized bucket as FLOAT-dominant/fp32 by design.
CPU / cpu w8a16 PASS 7207.3ms 5703.1ms Slower than fp16 on CPU; expected quant inversion. Value is size/NPU portability rather than CPU latency.
GPU / gpu N/A HOST-BLOCKED CPU-only host; not tested.
QNN / npu N/A HOST-BLOCKED CPU-only host; not runtime-tested. Static analyze reports QNN support as below.

No full fp16 eval matrix/task metric is claimed here. The README's all-10-bucket fp16-eval bar is not certified by this PR for the two new rows; that remains deferred to eval/CI.

11. Component / op-level data

winml analyze evidence from tester: 389 operators total, 17 unique operator types. QNN static support classification: 389/389 supported, 0 unsupported. This is an NPU-portability signal only; it is not runtime proof because NPU execution was HOST-BLOCKED on the CPU-only host. Analyze artifact path: N/A — tester did not supply a path.

12. Reproducible commands

N/A — tester did not supply exact reproducible command lines. Per role contract, this PR transcribes supplied verdicts and does not rerun build/perf/analyze/eval to generate missing report fields.

Coverage: partial

CPU is verified for build + perf through L1. GPU/NPU are HOST-BLOCKED on a CPU-only host and were not tested. Full fp16 eval across all 10 EP/device buckets is pending; this run's ceiling was L1 perf, not L2/L3 eval. QNN analyze showing 389/389 supported operators is a static portability signal only, not runtime certification.

Baseline

  • Baseline branch/SHA: origin/main at 6cbc78fe.
  • Tooling: winml 0.2.0.

…-extraction, sentence-similarity)

Add new fp16 and w8a16 recipes for the LinkTransformer mpnet embedder, mirroring the sentence-transformers/multi-qa-mpnet-base-dot-v1 template.

Recipe-only contribution: mpnet is already vendor-supported with no winml code changes; CPU build and perf were verified.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@DingmaomaoBJTU

Copy link
Copy Markdown
Collaborator Author

VERDICT: APPROVE
coverage: partial
not_yet_tested_on: [gpu, npu, full-fp16-eval-matrix]
REQUEST_CHANGES: none

Independent reviewer: DingmaomaoBJTU. Posted as PR comment due same-identity approval constraint; did not use gh pr review.

Baseline freshness:

HEAD=1cc1caa38f026b87817c00282e959573fe9686da
origin_main=3f5e4683dfaf453c7874bae7cd300be0e07f5406
baseline_count=2
baseline_commit=6cbc78febbd62190881a44e52dd54feeaca996e1
6cbc78fe..origin/main: genai/perf-only files; no examples/recipes changes. Stale-baseline caveat noted; judged non-blocking for this pure-recipe PR.

Scope / no-leakage:

1cc1caa3 recipe(mpnet): add dell-research-harvard/lt-wikidata-comp-en (feature-extraction, sentence-similarity)
 examples/recipes/README.md                         |  4 +-
 .../feature-extraction_fp16_config.json            | 64 +++++++++++++++++
 .../feature-extraction_w8a16_config.json           | 82 ++++++++++++++++++++++
 .../sentence-similarity_fp16_config.json           | 64 +++++++++++++++++
 .../sentence-similarity_w8a16_config.json          | 82 ++++++++++++++++++++++
 5 files changed, 295 insertions(+), 1 deletion(-)

Files are exactly the 4 recipe JSONs plus examples/recipes/README.md. No src/, tests/, model_knowledge/, skill_meta/, or models_all.json. Commit trailer present: Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>.

Recipe JSON assertions:

target_files= ['feature-extraction_fp16_config.json', 'feature-extraction_w8a16_config.json', 'sentence-similarity_fp16_config.json', 'sentence-similarity_w8a16_config.json']
fp32_files= []
feature-extraction_fp16_config.json: loader.task=feature-extraction loader.model_type=mpnet loader.model_id=<ABSENT> quant_is_null=True mirror_allowed_only=True
feature-extraction_w8a16_config.json: loader.task=feature-extraction loader.model_type=mpnet loader.model_id=<ABSENT> quant.mode=qdq quant.model_id=dell-research-harvard/lt-wikidata-comp-en quant.weight_type=uint8 quant.activation_type=uint16 mirror_allowed_only=True
sentence-similarity_fp16_config.json: loader.task=sentence-similarity loader.model_type=mpnet loader.model_id=<ABSENT> quant_is_null=True mirror_allowed_only=True
sentence-similarity_w8a16_config.json: loader.task=sentence-similarity loader.model_type=mpnet loader.model_id=<ABSENT> quant.mode=qdq quant.model_id=dell-research-harvard/lt-wikidata-comp-en quant.weight_type=uint8 quant.activation_type=uint16 mirror_allowed_only=True
all_expected_present= True

README check:

17: Total: **77** (model, task) tuples with curated recipes. 75 pass fp16 eval on all 10 (EP, device) buckets; dell-research-harvard/lt-wikidata-comp-en (feature-extraction, sentence-similarity) ships fp16 + w8a16 mpnet recipes verified via build and CPU perf, with full-bucket fp16 eval pending.
43: | dell-research-harvard/lt-wikidata-comp-en | feature-extraction |
44: | dell-research-harvard/lt-wikidata-comp-en | sentence-similarity |

Rows are alphabetically placed between deepset/bert... and deepset/roberta..., and the Total line is honest (build+CPU-perf verified; full-bucket fp16 eval pending). No other table rows disturbed.

Independent recipe-driven build smoke:

# Exact requested shape with --use-cache + -o on this CLI:
Error: --output-dir and --use-cache are mutually exclusive.

# Re-ran recipe-driven without --use-cache; no --device/--ep/--precision overrides:
.\.venv\Scripts\winml.exe build -m dell-research-harvard/lt-wikidata-comp-en -c examples\recipes\dell-research-harvard_lt-wikidata-comp-en\feature-extraction_fp16_config.json -o temp\lt_review\fe_fp16 --rebuild
✅ Build complete in 145.6s
EXITCODE=0
MODEL_ONNX_PRESENT=1
BUILD_CONFIG_PRESENT=1
fe_fp16 initializer_dtype_names= {'FLOAT': 200, 'INT32': 1, 'INT64': 55}
fe_fp16 inputs=[('input_ids', [1, 512], 'INT32'), ('attention_mask', [1, 512], 'INT32')]
fe_fp16 outputs=[('last_hidden_state', [1, 512, 768], 'FLOAT')]

Optional w8a16 corroboration:

.\.venv\Scripts\winml.exe build -m dell-research-harvard/lt-wikidata-comp-en -c examples\recipes\dell-research-harvard_lt-wikidata-comp-en\feature-extraction_w8a16_config.json -o temp\lt_review\fe_w8a16 --rebuild
✅ Build complete in 218.0s
EXITCODE=0
initializer_dtype_names= {'FLOAT': 409, 'UINT8': 194, 'UINT16': 221, 'INT32': 195, 'INT64': 55}
build_config_quant.model_id=dell-research-harvard/lt-wikidata-comp-en; weight_type=uint8; activation_type=uint16

Coverage computation:
CPU build+perf is the reachable verified path from the tester table. GPU and NPU remain HOST-BLOCKED; full fp16 eval matrix remains pending. Therefore coverage is partial, with deferred set above. Static CI/checks observed green via gh pr checks (Analyze, CodeQL, lint, test shards, CLA all pass).

@DingmaomaoBJTU DingmaomaoBJTU marked this pull request as ready for review July 14, 2026 13:01
@DingmaomaoBJTU DingmaomaoBJTU requested a review from a team as a code owner July 14, 2026 13:01
… EP/device)

Move the 4 feature-extraction/sentence-similarity fp16+w8a16 recipes from the flat model dir into cpu/cpu/, reflecting the only EP/device combo actually validated (build + CPU perf; GPU/NPU host-blocked). Follows the _meta-051 one-folder-per-EP+device layout. Note: the e2e eval discover_recipe_variants uses a flat, non-recursive glob, so these nested recipes are not auto-discovered until the harness is taught to recurse. Contents unchanged; verified a recipe-driven fp16 build still succeeds from the new path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@DingmaomaoBJTU

Copy link
Copy Markdown
Collaborator Author

Update: recipes reorganized under cpu/cpu/ (tested EP/device layout)

Following the _meta-051 "one folder per EP+device" convention, the 4 recipes have been moved from the flat model dir into a nested cpu/cpu/ folder — reflecting the only EP/device combo actually validated (build + CPU perf). GPU/NPU were host-blocked, so no dml/gpu, qnn/npu, etc. folders are claimed.

examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/
  ├─ feature-extraction_fp16_config.json
  ├─ feature-extraction_w8a16_config.json
  ├─ sentence-similarity_fp16_config.json
  └─ sentence-similarity_w8a16_config.json

Nature of the change: pure git mv — 100% rename similarity, 0 insertions(+), 0 deletions(-). Recipe contents are byte-identical to the approved versions.

Re-verified: a recipe-driven fp16 build (winml build -c cpu/cpu/feature-extraction_fp16_config.json -m dell-research-harvard/lt-wikidata-comp-en, no override flags) still succeeds from the new path — export → optimize → model.onnx in ~104s.

Known caveat (deliberate): the e2e eval harness discover_recipe_variants (scripts/e2e_eval/utils/recipes.py:131) uses a flat, non-recursive glob (model_dir.glob("{task}_*_config*.json")), so recipes nested under <ep>/<device>/ are not auto-discovered until the harness is taught to recurse. This mirrors the real nested examples on main (facebook_dinov2-base, microsoft_swinv2-*), which keep flat defaults and add a nested qnn/npu/ override — here we intentionally went pure-nested per the requested layout. (Separately, this model's models_all.json entry is keyed to task: tabular-classification, not the authored feature-extraction/sentence-similarity, so the models_all-driven eval already keys it on a different task.)

@ssss141414

Copy link
Copy Markdown
Contributor

Please revert readme. I will emphasize this on skill later.

Reviewer requested reverting the README changes (will be emphasized on
the skill later). Restores the Total line to 75 and removes the two
dell-research-harvard/lt-wikidata-comp-en rows. The four recipe JSON
configs under cpu/cpu/ are unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…mp-en

Per CPU precision policy: the cpu/cpu bucket ships both float precisions
(fp32 + fp16, quant:null) and no w8a16 - quantization regressed vs float on
CPU with no int8/VNNI benefit.

- add feature-extraction_fp32_config.json + sentence-similarity_fp32_config.json
  (byte-identical to the fp16 recipes; quant:null)
- remove feature-extraction_w8a16_config.json + sentence-similarity_w8a16_config.json
- fp16 recipes unchanged

Verified: recipe-driven build of feature-extraction_fp32 completed in 181.6s,
model.onnx 427.5 MB (fp32 initializers on CPU by design).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@DingmaomaoBJTU

Copy link
Copy Markdown
Collaborator Author

@ssss141414 Done — reverted examples/recipes/README.md back to the base: count stays 75 and the two dell-research-harvard/lt-wikidata-comp-en rows are removed. Only the README is reverted; the recipe JSONs are unchanged. Will leave the README emphasis to the skill as you noted.

DingmaomaoBJTU added a commit that referenced this pull request Jul 16, 2026
…cation, NLI) (#1117)

## Summary

Adds a curated CPU float recipe for
**`cross-encoder/nli-deberta-v3-base`** — a DeBERTa-v3 cross-encoder for
natural-language inference (3-way sequence classification: contradiction
/ entailment / neutral; config `model_type = deberta-v2`). Ships **fp32
+ fp16** variants under `cpu/cpu/` (both `quant: null`; no CPU quantized
variant per repo convention).

This is a **recipe-only (L0★)** contribution: Optimum already covers
`deberta-v2` `text-classification` natively, so `main` builds this model
with zero source changes. The delta this PR adds is the **curated CPU
reference recipe** plus an **L2 numeric-parity proof** that the trained
3-way NLI head is preserved end-to-end (which a plain build does not
demonstrate). Claimed tiers: **Effort L0★ · Goal ceiling L2 · Outcome
L0**.

---

### 1. Recipe path(s)
-
`examples/recipes/cross-encoder_nli-deberta-v3-base/cpu/cpu/text-classification_fp32_config.json`
-
`examples/recipes/cross-encoder_nli-deberta-v3-base/cpu/cpu/text-classification_fp16_config.json`

Both are byte-identical (`quant: null` float bucket; on CPU both realize
as fp32, fp16 materializes on GPU/NPU). opset 17, batch 1, inputs
`input_ids[1,512]` + `attention_mask[1,512]` (int32), output `logits`.
No `token_type_ids` — `deberta-v2` has `type_vocab_size = 0`.

### 2. README row
None. Recipe-only, CPU-only — deliberately **not** added to the "Total:
N (model, task) tuples that pass fp16 eval on all 10 (EP, device)
buckets" table, which would be a factual overclaim for a CPU-only recipe
(consistent with the reviewed outcome on #1084 / #1112).

### 3. Build output dir
`temp/nli_deberta_v3/` (scratch, gitignored) — `model.onnx` +
`model.onnx.data` (786 MB fp32).

### 4. Build log
`✅ Build complete` — recipe-driven `winml build` exit 0 (269.5 s). ONNX
IR 8, opset 17, external data co-located, output `logits[1,3]`.

### 5. Appended findings
`model_knowledge/deberta.json` → `deberta-001` (new family). Lane A
(skill repo); **not** part of this model PR's diff.

### 6. Optimum-coverage probe
`deberta-v2` `text-classification` is **VENDOR-ONLY** (`added_by_winml =
[]`). Vendor onnx tasks: `[feature-extraction, fill-mask,
multiple-choice, question-answering, text-classification,
token-classification]`. No winml-added exporter exists or is needed.

### 7. Claimed (Effort, Goal, Outcome)
**L0★ / L2 / L0.** Baseline: `winml build -m
cross-encoder/nli-deberta-v3-base` on `main` (`origin/main = 7434269`,
winml 0.2.0) already **PASSES** build-only. Contribution = curated CPU
float recipe (fp32 + fp16) + L2 trained-head-preservation proof.

### 8. Goal-ladder verdict table

| Tier | Verdict | Evidence |
|---|---|---|
| L0 (build) | **PASS** | recipe-driven build exit 0 (269.5 s); ONNX
opset 17, inputs `input_ids[1,512]`+`attention_mask[1,512]`, output
`logits[1,3]`, external data co-located |
| L1 (perf) | **PASS** | CPU/fp32 avg 5951 ms, throughput 0.17
samples/s, RAM Δ +618 MB (slow but deterministic; ContextPooler pools
fixed position 0, so random-dummy perf is safe) |
| L2 (numeric vs PyTorch) | **PASS** | 4 real NLI pairs: cosine
**1.000000**, max-abs **1.9e-6**, argmax agreement **4/4** — trained
3-way NLI head + disentangled attention export losslessly |

Ceiling L2 reached; no downgrade.

### 9. Methodology-evolution declaration
No methodology friction this cycle. `deberta` is a new model family (new
`model_knowledge/deberta.json`), but the existing pipeline handled it
without a skill_meta change.

### 10. Perf & eval data

| EP / Device | Precision | Verdict | Mean | p50 | Throughput | RAM Δ |
Task metric |
|---|---|---|---|---|---|---|---|
| CPUExecutionProvider / cpu | fp32 | PASS | 5951 ms | — | 0.17
samples/s | +618 MB | N/A (L3 not marched — L2 ceiling) |

`winml eval` not run (Goal ceiling L2). NLI label order for this
checkpoint is `{0:contradiction, 1:entailment, 2:neutral}`, which
differs from the GLUE/MNLI dataset order — an eval would need a label
remap, so no eval block is shipped (mirrors `facebook/bart-large-mnli`).

### 11. Component / op-level data
`winml analyze --ep all`: **568 total operators, 17 unique**. Per-EP op
classification: **QNN NPU 17/17 supported**, **OpenVINO NPU 17/17
supported** (includes the disentangled-attention `GatherElements` ops);
**VitisAI all-unknown** (no rule data — analyze exit 1, expected, not a
functional failure). Artifact: `temp/nli_deberta_v3/analyze_all.json`.

### 12. Reproducible commands

```powershell
# baseline (main already builds this model, no recipe)
winml build -m cross-encoder/nli-deberta-v3-base -o temp\nli_deberta_v3_baseline

# recipe-driven build (this PR)
winml build -m cross-encoder/nli-deberta-v3-base `
  -c examples\recipes\cross-encoder_nli-deberta-v3-base\cpu\cpu\text-classification_fp32_config.json `
  -o temp\nli_deberta_v3

# L1 perf (CPU)
winml perf -m temp\nli_deberta_v3\model.onnx --iterations 20 --warmup 5 --no-analyze

# op coverage
winml analyze -m temp\nli_deberta_v3\model.onnx --ep all -o temp\nli_deberta_v3\analyze_all.json

# L2 parity vs PyTorch: temp\nli_deberta_v3_l2.py (4 real NLI pairs, pad to 512, int32 inputs, drop token_type_ids)
python temp\nli_deberta_v3_l2.py
```

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ssss141414 ssss141414 added the model-scale-by-skill Model support PR created or maintained by the adding-model-support skill label Jul 16, 2026
DingmaomaoBJTU added a commit that referenced this pull request Jul 16, 2026
…ication, reranker) (#1118)

## Summary

Adds a curated CPU float recipe for
**`mixedbread-ai/mxbai-rerank-base-v1`** — a cross-encoder **reranker**
that scores `(query, document)` relevance (config `model_type =
deberta-v2`, `DebertaV2ForSequenceClassification`, `num_labels = 1` → a
single relevance logit). Ships **fp32 + fp16** variants under `cpu/cpu/`
(both `quant: null`; no CPU quantized variant per repo convention).

This is a **recipe-only (L0★)** contribution: Optimum already covers
`deberta-v2` `text-classification` natively, so `main` builds this model
with zero source changes. The delta is the **curated CPU reference
recipe** plus an **L2 numeric + ranking parity proof** that the trained
reranker head is preserved end-to-end. Notably the recipe is
**byte-identical** to the now-merged `cross-encoder/nli-deberta-v3-base`
recipe (#1117, on `main` at `e95011d3`) — identical git blob OID
`7b36e69520b418c7c86b2d8a39eab741cb9742c5` (git-stored SHA256
`8b587c4b…bec8`; verify with `git rev-parse HEAD:<path>`). The
`model_id` is CLI-passed and the output width is config-driven, so one
`deberta-v2` text-classification recipe serves the whole task family.
Claimed tiers: **Effort L0★ · Goal ceiling L2 · Outcome L0**.

> **Updated after review (#1118):** rebased onto current `origin/main`
(`e95011d3`, which now includes the merged #1117 NLI recipe) and
corrected the byte-identity evidence to git's canonical blob OID. (An
earlier `Get-FileHash` value `59E337…` was the Windows **CRLF**
working-tree hash; git normalizes to **LF** on commit, so the on-`main`
content hash is `8b587c4b…`.)

---

### 1. Recipe path(s)
-
`examples/recipes/mixedbread-ai_mxbai-rerank-base-v1/cpu/cpu/text-classification_fp32_config.json`
-
`examples/recipes/mixedbread-ai_mxbai-rerank-base-v1/cpu/cpu/text-classification_fp16_config.json`

Byte-identical (`quant: null` float bucket; on CPU both realize as fp32,
fp16 materializes on GPU/NPU). opset 17, batch 1, inputs
`input_ids[1,512]` + `attention_mask[1,512]` (int32), output
`logits[1,1]`. No `token_type_ids` — `deberta-v2` has `type_vocab_size =
0`.

### 2. README row
None. Recipe-only, CPU-only — deliberately **not** added to the "passes
fp16 eval on all 10 (EP, device) buckets" table, which would be a
factual overclaim for a CPU-only recipe (consistent with #1084 / #1112 /
#1117).

### 3. Build output dir
`temp/mxbai_rerank/` (scratch, gitignored) — `model.onnx` +
`model.onnx.data` (786 MB fp32).

### 4. Build log
`✅ Build complete in 633.6s` (Export 369.6s + Optimize 256.9s; **no
quantize** — `quant: null`). ONNX IR 8, opset 17, external data
co-located, output `logits[1,1]`.

### 5. Appended findings
`model_knowledge/deberta.json` → `deberta-002` (second model in the
`deberta` family; `mxbai-rerank-base-v1` added to `models_tested`). Lane
A (skill repo); **not** part of this model PR's diff.

### 6. Optimum-coverage probe
`deberta-v2` `text-classification` is **VENDOR-ONLY** (`added_by_winml =
[]`). Vendor onnx tasks: `[feature-extraction, fill-mask,
multiple-choice, question-answering, text-classification,
token-classification]`. No winml-added exporter exists or is needed.

### 7. Claimed (Effort, Goal, Outcome)
**L0★ / L2 / L0.** Baseline: `winml build -m
mixedbread-ai/mxbai-rerank-base-v1` on `main` (`origin/main = e95011d`
— branch rebased onto current main; winml 0.2.0) already **PASSES**
(default pipeline 973.3s incl. quantize → uint8/16 327.5 MB).
Contribution = curated CPU float recipe (fp32 + fp16) + L2
relevance-head-preservation proof.

### 8. Goal-ladder verdict table

| Tier | Verdict | Evidence |
|---|---|---|
| L0 (build) | **PASS** | recipe-driven float build exit 0 (633.6 s, no
quantize); ONNX opset 17, inputs
`input_ids[1,512]`+`attention_mask[1,512]`, output `logits[1,1]`,
external data co-located |
| L1 (perf) | **PASS** | CPU/fp32 avg 7027.85 ms, 0.14 samples/s, RAM Δ
+624.7 MB (also auto-ran on QNN/NPU at 523.99 ms / 1.91 samples/s) |
| L2 (numeric vs PyTorch) | **PASS** | 4 real `(query, doc)` pairs:
cosine **1.000000**, max-abs **1.097e-05**, **ranking order 4/4
identical**, top-1 doc agrees |

Ceiling L2 reached; no downgrade.

### 9. Methodology-evolution declaration
No methodology friction. This is the **second** model in the `deberta`
family (added in #1117) — it exercised the self-learning path as
designed: `deberta-001` predicted the recipe shape, the recipe came out
byte-identical (same git blob OID `7b36e695…`), and `deberta-002`
records the reranker-specific ranking-parity check. No skill_meta change
needed.

### 10. Perf & eval data

| EP / Device | Precision | Verdict | Mean | p50 | Throughput | RAM Δ |
Task metric |
|---|---|---|---|---|---|---|---|
| CPUExecutionProvider / cpu | fp32 | PASS | 7027.85 ms | 6933.79 ms |
0.14 samples/s | +624.7 MB | N/A (L3 not marched — L2 ceiling) |
| QNNExecutionProvider / npu | (auto) | PASS (bonus) | 523.99 ms |
522.76 ms | 1.91 samples/s | +1791.7 MB | — (not a full NPU validation)
|

`winml eval` not run (Goal ceiling L2). The NPU row is a bonus data
point from `winml perf` auto-selecting QNN — it is **not** a claimed
coverage bucket (no NPU-side L2 parity yet), so coverage stays
CPU-only/partial.

### 11. Component / op-level data
`winml analyze --ep all`: **568 total operators, 17 unique** (identical
op profile to the NLI sibling). Per-EP: **QNN NPU 17/17 supported**,
**OpenVINO NPU 17/17 supported** (includes the disentangled-attention
`GatherElements` ops); **VitisAI all-unknown** (no rule data — analyze
exit 1, expected, not a functional failure). Artifact:
`temp/mxbai_rerank/analyze_all.json`.

### 12. Reproducible commands

```powershell
# baseline (main already builds this model, no recipe)
winml build -m mixedbread-ai/mxbai-rerank-base-v1 -o temp\mxbai_rerank_baseline

# recipe-driven float build (this PR)
winml build -m mixedbread-ai/mxbai-rerank-base-v1 `
  -c examples\recipes\mixedbread-ai_mxbai-rerank-base-v1\cpu\cpu\text-classification_fp32_config.json `
  -o temp\mxbai_rerank

# L1 perf (CPU, pinned)
winml perf -m temp\mxbai_rerank\model.onnx --device cpu --ep cpu --iterations 15 --warmup 3 --no-analyze

# op coverage
winml analyze -m temp\mxbai_rerank\model.onnx --ep all -o temp\mxbai_rerank\analyze_all.json

# L2 parity + ranking vs PyTorch: temp\mxbai_rerank_l2.py
#   (tokenizes (query, doc) cross-encoder pairs, pad to 512, int32 ids, drop token_type_ids,
#    runs each pair at batch=1 since the recipe fixes batch_size=1, compares logits + argsort)
python temp\mxbai_rerank_l2.py
```

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model-scale-by-skill Model support PR created or maintained by the adding-model-support skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants