recipe(cross-encoder/ms-marco-MiniLM-L6-v2): add text-classification fp32/fp16 recipes#1120
Open
codykk wants to merge 1 commit into
Open
recipe(cross-encoder/ms-marco-MiniLM-L6-v2): add text-classification fp32/fp16 recipes#1120codykk wants to merge 1 commit into
codykk wants to merge 1 commit into
Conversation
…MiniLM-L6-v2 Recipe-only contribution. Adds fp32 and fp16 recipe configs for cross-encoder/ms-marco-MiniLM-L6-v2 (BertForSequenceClassification) on two verified EP/device combinations: cpu/cpu and dml/gpu. Goal ladder (verified on local hardware): - L0 (build): PASS on all 4 configs - L1 (perf): - cpu/cpu fp32: 21.11ms avg, 47.38 samples/s, 86.7MB - cpu/cpu fp16: 21.44ms avg, 46.64 samples/s, 43.4MB (50% size reduction) - dml/gpu fp32: 16.35ms avg, 61.16 samples/s - dml/gpu fp16: 47.80ms avg, 20.92 samples/s
9498c12 to
91a818c
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.
Recipe-only contribution (Effort L0). Adds fp32 and fp16 recipe configs for
cross-encoder/ms-marco-MiniLM-L6-v2 (
BertForSequenceClassification, tasktext-classification)on two verified EP/device combinations: CPU and DML (GPU). Goal L1 (perf) PASS on all 4 configs.
1. Recipe path(s)
examples/recipes/cross-encoder_ms-marco-MiniLM-L6-v2/cpu/cpu/text-classification_fp32_config.jsonexamples/recipes/cross-encoder_ms-marco-MiniLM-L6-v2/cpu/cpu/text-classification_fp16_config.jsonexamples/recipes/cross-encoder_ms-marco-MiniLM-L6-v2/dml/gpu/text-classification_fp32_config.jsonexamples/recipes/cross-encoder_ms-marco-MiniLM-L6-v2/dml/gpu/text-classification_fp16_config.json2. README row
N/A — README not modified in this PR. The model has not yet passed fp16 eval on all 10 (EP, device) buckets; only cpu/cpu and dml/gpu are verified.
3. Build output dir
temp/minilm_cpu_fp32/(cpu/cpu fp32)temp/minilm_cpu_fp16/(cpu/cpu fp16)temp/minilm_dml_fp32/(dml/gpu fp32)temp/minilm_dml_fp16/(dml/gpu fp16)4. Build log
All 4 configs completed successfully:
✅ Build complete in 20.1s(Export 4.4s, Optimize 15.2s)✅ Build complete in 21.3s(Export 4.3s, Optimize 15.6s, FP16 0.8s)✅ Build complete in 19.9s(Export 4.3s, Optimize 15.0s)✅ Build complete in 20.6s(Export 4.3s, Optimize 15.0s, FP16 0.8s)5. Appended findings
N/A — no
model_knowledge/orskill_meta/entries added (recipe-only L0 contribution; skill repo is separate from this working repo).6. Optimum-coverage probe
bertarchitecture is fully supported by Optimum'sBertOnnxConfigand winml'sBertIOConfig. No custom OnnxConfig needed.winml inspectconfirms all components at "Default" status.7. Claimed (Effort, Goal, Outcome)
8. Goal-ladder verdict table
winml buildwinml perf(see item 10)9. Methodology-evolution declaration
No methodology friction observed during this contribution.
10. Perf & eval data
Model size: fp32 = 86.7 MB; fp16 = 43.4 MB (50% size reduction).
Note: DML fp16 is slower than fp32 on this model (47.8ms vs 16.4ms). This is a known characteristic of small models where fp16 conversion overhead on GPU outweighs the compute savings.
11. Component / op-level data
From
winml analyze(post-optimization):gelu_fusion,matmul_add_fusion(autoconf converged in 2 iterations)temp/minilm_cpu_fp32/analyze_result.json12. Reproducible commands