recipe(mmarco-mMiniLMv2-L12-H384-v1): add CPU text classification configs#1191
Draft
fuliucansheng wants to merge 1 commit into
Draft
Conversation
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 CPU recipe coverage for
cross-encoder/mmarco-mMiniLMv2-L12-H384-v1, a multilingual MMARCO cross-encoder reranker exported through WinML's existing XLM-RoBERTa sequence-classification path. This is an L0 recipe-only contribution: currentmainalready builds and runs the model, and this PR records verified CPU fp32/fp16 coverage with checked-in recipes.Model metadata
What the model does:
cross-encoder/mmarco-mMiniLMv2-L12-H384-v1scores query/passage text pairs for multilingual retrieval reranking. The checkpoint exposes a single-logitXLMRobertaForSequenceClassificationhead, so WinML exports it throughtext-classificationeven though its semantic use is text ranking.Primary user stories:
Supported tasks:
text-rankingtext-classificationModel architecture:
Source/confidence: pinned checkpoint config resolves
model_type: xlm-roberta,architectures: [XLMRobertaForSequenceClassification], hidden size 384, 12 layers, 12 attention heads, and one output label.Validation and support evidence
Baseline
Baseline was run from current
origin/mainat2c378c7dc213e0a69afec87d3d7c5015eb4e570dwithwinml, version 0.2.0.winml inspectAutoModelForSequenceClassification, exporterXLMRobertaIOConfig, WinML classWinMLModelForSequenceClassification; inputsinput_idsandattention_maskint32[1, 512]; outputlogits.xlm-roberta: vendor tasks includetext-classification; WinML adds no extra task override.1.71661376953125e-05.text-classificationeval uses GLUE/MRPC label alignment and fails on labelequivalent; this checkpoint is a single-score reranker, not a MRPC class-label model.Baseline
winml configis the source for the checked-in recipe shape, task, loader, and optimization defaults.Goal
Effort: L0. Goal ceiling: L2. Outcome: L0 recipe-only.
Success means the checked-in CPU fp32/fp16 recipes build structurally valid ONNX artifacts, run
winml perfon CPU, and match the PyTorch reference numerically through WinML compare mode. L3 is explicitly blocked by dataset/task semantics for this reranking checkpoint.Outcome
Highest verified goal: L2 PASS on CPU for both fp32 and fp16. Coverage is full for the targeted EP set (
cpu/cpu/fp32,cpu/cpu/fp16); no accelerator tuples are claimed.Shipped recipes:
examples/recipes/cross-encoder_mmarco-mMiniLMv2-L12-H384-v1/cpu/cpu/text-classification_fp32_config.jsonexamples/recipes/cross-encoder_mmarco-mMiniLMv2-L12-H384-v1/cpu/cpu/text-classification_fp16_config.jsonMethodology friction observed: none. Model finding: XLM-RoBERTa single-logit cross-encoder rerankers export cleanly through
text-classification; task-metric eval needs a text-ranking dataset/metric rather than the default GLUE/MRPC text-classification path.Per-EP/device/precision results
input_ids,attention_maskint32[1, 512], outputlogits [1, 1], 396 nodes, external data colocated withmodel.onnx.--precision fp16; final artifact is about 235.8 MB and reports fp16 at perf time, with 397 nodes.winml eval --mode compare: cosine mean 1.0, max absolute diff max1.71661376953125e-05, SQNR mean 114.598 dB.winml eval --mode compare: cosine mean 1.0, max absolute diff max0.013412952423095703, SQNR mean 58.651 dB.text-classificationeval datasetnyu-mll/glue/mrpcfails label alignment for labelequivalent; checkpoint emits a single reranking score.Delta
Both recipes are generated from current
winml configoutput for this checkpoint. The fp32 recipe is identical to auto-config for loader/export/optim fields. The fp16 recipe is identical towinml config -p fp16, preserving the generated fp16 quantization block and model metadata. No source code or tests are changed, andexamples/recipes/README.mdis untouched.Reducibility: recipe-only is appropriate because auto-config already resolves task, loader, exporter, and WinML inference class correctly; this PR is a per-checkpoint verified CPU coverage declaration rather than a class-wide code fix.
Analyze summary
Static rule analysis completed with partial-success exit semantics: QNN/OpenVINO rows were complete, while VitisAI has no rule data and is all-unknown. This is compatibility analysis, not runtime execution.
Component-level summary
Castop unknown, no unsupported ops; VitisAI: no rule data.Op-level summary
Cast); VitisAI: 397 unknown.Reproduce commands