recipe(cross-encoder): add MiniLM L2 text-classification recipes#1143
Draft
kujin66 wants to merge 1 commit into
Draft
recipe(cross-encoder): add MiniLM L2 text-classification recipes#1143kujin66 wants to merge 1 commit into
kujin66 wants to merge 1 commit into
Conversation
kujin66
force-pushed
the
kujin66/add-cross-encoder-minilm-l2-recipe
branch
from
July 20, 2026 08:43
e882392 to
f9b7b63
Compare
Author
|
APPROVE (coverage: full for target EPs cpu and dml-gpu) Reviewer checks performed:
No requested changes. |
kujin66
marked this pull request as ready for review
July 20, 2026 08:48
kujin66
force-pushed
the
kujin66/add-cross-encoder-minilm-l2-recipe
branch
from
July 22, 2026 09:17
f9b7b63 to
3ad2863
Compare
kujin66
marked this pull request as draft
July 22, 2026 09:18
kujin66
force-pushed
the
kujin66/add-cross-encoder-minilm-l2-recipe
branch
from
July 22, 2026 09:28
3ad2863 to
d70a4d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds recipe coverage for
cross-encoder/ms-marco-MiniLM-L2-v2as a BERT sentence-pair text-classification cross-encoder. This is an L0 recipe-only contribution: currentorigin/mainalready builds the model, and the checked-in recipes make the verified CPU and DML GPU fp32/fp16 tuples discoverable and reproducible. The refreshed Goal ladder reaches L2 on CPU; L3 task-metric eval is blocked by dataset/label-semantics mismatch for this MS MARCO single-logit relevance checkpoint.Model metadata
What the model does
cross-encoder/ms-marco-MiniLM-L2-v2scores the relevance of a query/document text pair using a BERT-family sequence-classification head. Evidence/confidence: Hugging Face config resolvesarchitectures=['BertForSequenceClassification'],model_type='bert', tasktext-classification; confidence: verified from checkpoint config and WinML inspection/build behavior.Primary user stories
Supported tasks
text-classification, with sentence-pair inputsinput_ids,attention_mask, andtoken_type_ids, outputlogits [1, 1]. Support surfaces: checkpoint, transformers, Optimum ONNX, WinML. Evidence/confidence: Optimum probe forbertincludestext-classification; WinML config/build emittedAutoModelForSequenceClassification; confidence: verified.Model architecture
Validation and support evidence
Baseline
origin/main:5deebd422e95f28fe8fd912ee50ce874710187b3.d70a4d0d4bb5788b98deaf16ca881437067ccdf4.0.2.0.winml build -m cross-encoder/ms-marco-MiniLM-L2-v2 --ep cpu --device cpu --no-analyze --no-optimize --no-quant --no-compile --rebuildcompleted withBuild complete in 12.7s; model I/O wasinput_ids,attention_mask,token_type_ids[1, 512]int32 ->logits [1, 1].winml config -m cross-encoder/ms-marco-MiniLM-L2-v2emitted a BERT text-classification config with the same I/O,loader.model_class=AutoModelForSequenceClassification,loader.model_type=bert, andoptim.clamp_constant_values=true.bert: vendor and after-WinML tasks arefeature-extraction,fill-mask,multiple-choice,question-answering,text-classification,token-classification;added_by_winml=[], verdictVENDOR-ONLY.Goal
L0recipe-only.L2, because current main already provides L0 build support and CPU can reach L1 perf and L2 numeric comparison.L0checked-in recipe coverage for exact PASS tuples.fp32, CPU/cpufp16, DML/gpufp32, DML/gpufp16.Outcome
L2 PASSon CPU.examples/recipes/cross-encoder_ms-marco-MiniLM-L2-v2/cpu/cpu/text-classification_fp32_config.jsonexamples/recipes/cross-encoder_ms-marco-MiniLM-L2-v2/cpu/cpu/text-classification_fp16_config.jsonexamples/recipes/cross-encoder_ms-marco-MiniLM-L2-v2/dml/gpu/text-classification_fp32_config.jsonexamples/recipes/cross-encoder_ms-marco-MiniLM-L2-v2/dml/gpu/text-classification_fp16_config.jsonexamples/recipes/README.mdremains untouched by this PR.Per-EP/device/precision results
Providers snapshot:
['DmlExecutionProvider', 'CPUExecutionProvider'].glue/mrpcvalidation, 5 samples, sentence-pair columns; eval failed during label alignment: dataset labelequivalentdoes not align to this checkpoint's MS MARCO single-logit relevance label space.Delta
Compared with the refreshed auto-config recipe from
winml config -m cross-encoder/ms-marco-MiniLM-L2-v2:/optim/clamp_constant_valuestruegelu_fusionandmatmul_add_fusion/quantfor fp16 recipesnullmode=fp16,fp16_keep_io_types=true--precision fp16, and artifact validation confirms fp16 initializers and half-size model.cpu/cpuanddml/gpurecipe copiesReducibility: recipe-only remains appropriate. The model family is already vendor-covered and WinML builds it without source changes; these files are verified coverage artifacts for exact EP/device/precision tuples, not a class-wide code fix.
Analyze summary
Static rule analysis completed with populated v0.2.0 runtime rules and emitted JSON. The command returned non-zero while still writing complete per-EP records; treated as
ANALYZE-PARTIAL-SUCCESSbecause rule-less EP rows are all-unknown, while rule-backed rows are complete.Component-level summary
Op-level summary
Reproduce commands
Quality gates
uv run ruff check src/ tests/: PASS,All checks passed!uv run mypy -p winml.modelkit: PASS,Success: no issues found in 415 source files.uv run pytest tests/unit/models tests/unit/loader tests/unit/datasets tests/unit/export --tb=short --no-cov -m "not e2e and not npu and not gpu": PASS,1351 passed, 6 skipped, 1 xfailed.uv run pytest tests/unit/commands tests/unit/config tests/unit/build tests/unit/compiler tests/unit/session tests/unit/eval --tb=short --no-cov -m "not e2e and not npu and not gpu": PASS,2373 passed, 8 skipped, 2 deselected.Rebase freshness note: after rebase from 3ad2863 to d70a4d0, git diff 3ad2863..HEAD -- examples/recipes/cross-encoder_ms-marco-MiniLM-L2-v2 was empty, so the full four-tuple build/perf/analyze evidence remains tied to byte-identical recipe files; baseline, ruff, and mypy were rerun on the refreshed head.