recipe(cross-encoder/ms-marco-MiniLM-L6-v2): add text-classification fp16 and w8a16 recipes#1080
Open
codykk wants to merge 1 commit into
Open
recipe(cross-encoder/ms-marco-MiniLM-L6-v2): add text-classification fp16 and w8a16 recipes#1080codykk wants to merge 1 commit into
codykk wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree company="Microsoft" |
20cfe78 to
9bf8846
Compare
…fp16 and w8a16 recipes Add recipe configurations for cross-encoder/ms-marco-MiniLM-L6-v2 (BertForSequenceClassification, 22.7M params, 6 layers) for text-classification task with fp16 (baseline) and w8a16 (quantized) variants. - fp16: opset 17, seq_len 512, vocab 30522, eval on GLUE MRPC - w8a16: QDQ uint8/uint16, minmax calibration, 61% size reduction (86.7MB -> 33.4MB) - Both recipes include GLUE MRPC eval configuration - README row added
9bf8846 to
df3b518
Compare
DingmaomaoBJTU
approved these changes
Jul 10, 2026
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.
Add recipe configurations for
cross-encoder/ms-marco-MiniLM-L6-v2(BertForSequenceClassification, 22.7M params, 6 layers) with fp16 and w8a16 quantized variants. The w8a16 recipe delivers 61% model size reduction (86.7 MB → 33.4 MB). Effort L0, Goal L1 PASS on CPU, Outcome L0.1. Recipe path(s)
examples/recipes/cross-encoder_ms-marco-MiniLM-L6-v2/text-classification_fp16_config.jsonexamples/recipes/cross-encoder_ms-marco-MiniLM-L6-v2/text-classification_w8a16_config.json2. README row
Added
cross-encoder/ms-marco-MiniLM-L6-v2 | text-classificationtoexamples/recipes/README.md.3. Build output dir
temp/verify_cross-encoder_ms-marco-MiniLM-L6-v2_fp16/temp/verify_cross-encoder_ms-marco-MiniLM-L6-v2_w8a16/4. Build log
✅ Build complete in 23.6s(export 4.8s, optimize 18.2s)✅ Build complete in 33.7s(export 4.9s, optimize 19.2s, quantize 8.6s)Structural validation (w8a16): IR version 8, inputs
input_ids [1, 512],attention_mask [1, 512],token_type_ids [1, 512], outputlogits [1, 1].5. Appended findings
No existing
model_knowledge/bert.jsonin skill repo. No methodology friction observed — standard BERT text-classification, fully vendor-covered (Optimum + winml defaults). Note: despite the HuggingFacetext-classificationtask label, this is a cross-encoder ranking / regression model (MS MARCO passage ranking). Output islogits [1, 1]— a single relevance score, not a multi-class softmax. Standard text-classification eval datasets (MRPC, SST-2) are incompatible due to label mismatch (KeyError: 'equivalent'). Eval section intentionally omitted from recipe.6. Optimum-coverage probe
{"vendor": ["feature-extraction", "fill-mask", "multiple-choice", "question-answering", "text-classification", "token-classification"], "after_winml": ["feature-extraction", "fill-mask", "multiple-choice", "question-answering", "text-classification", "token-classification"], "added_by_winml": [], "verdict": "VENDOR-ONLY"}7. Claimed (Effort, Goal, Outcome)
8. Goal-ladder verdict table
✅ Build complete in 23.6s, artifact 86.7 MB; w8a16:✅ Build complete in 33.7s, artifact 33.4 MB.onnx.loadOK, IR=8, inputs match recipe.9. Methodology-evolution declaration
No methodology friction observed. Standard BERT text-classification path, fully covered by Optimum vendor defaults. One finding: cross-encoder ranking models (output
logits [1, 1]) are labeledtext-classificationon HuggingFace but incompatible with standard classification eval datasets —winml evalwith MRPC fails withKeyError: 'equivalent'at label alignment. Eval section removed from recipe; L3 goal not applicable for this model type without a ranking-specific eval dataset.10. Perf & eval data
Size delta: baseline 86.7 MB → w8a16 33.4 MB (61% reduction).
Note: w8a16 latency is higher than fp32 due to QDQ overhead on CPU — known for small models where quantization/dequantization cost exceeds compute savings. The value is in model size reduction for deployment-constrained scenarios.
11. Component / op-level data
Runtime check rules not available on this host (source-tree build, no parquet rules downloaded).
winml analyzeskipped — to be populated when rules are available.12. Reproducible commands