recipe(mmarco-mMiniLMv2-L12-H384-v1): add CPU reranking recipes - #1339
Draft
ssss141414 wants to merge 1 commit into
Conversation
Contributor
Author
REQUEST_CHANGESReviewed exact candidate Blocking changes
Verified checks
Leave the PR draft. |
Contributor
Author
APPROVEReviewed the full PR afresh at exact candidate Prior blockers resolved
Full review
No residual blockers. Leave the PR draft; this comment does not authorize readiness or any other metadata change. |
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
This adds CPU fp32 and fp16 reranking recipes for
cross-encoder/mmarco-mMiniLMv2-L12-H384-v1, a multilingual cross-encoder that emits one raw relevance logit per query-passage pair. The shipped Effort and Outcome are L0, layered on the generic reranking capability owned by dependency PR #1322. Candidate evidence reaches L3 PASS with full CPU fp32/fp16 coverage; exact current-main hosted evidence establishes the recipe-free fp32 baseline while confirming that current-main reranking config and Eval are unsupported.Model metadata
What the model does
A multilingual cross-encoder reranker that jointly tokenizes a query and candidate passage, then emits one raw relevance logit used to sort passages in descending order.
XLMRobertaForSequenceClassificationwith one label and Identity activation; Transformers v5.14.1 supplies the one-logit sequence-classification path. Confidence:verified.Primary user stories
verified.verified.Supported tasks
rerankingon the checkpoint and Transformers surfaces. Evidence: checkpointpipeline_tag=text-rankingand the paired-input raw-logit model-card example. Confidence:verified.text-classificationon the Transformers and WinML surfaces. Evidence: checkpoint Transformers metadata selectsAutoModelForSequenceClassification; the existing exact-model text-classification fp16 recipe remains unchanged. Confidence:mapped.Model architecture
XLMRobertaForSequenceClassificationsource (verified).Validation and support evidence
1. Baseline
main:0876e5ae1c98a169a6137e092e0d7b30bf9cee33.winml, version 0.3.0. Hosted recovery supplied an exact-lock current-main environment after the earlier local hydration attempt was blocked.input_idsandattention_maskINT32[1,512], FLOATlogits[1,1], 435 nodes, and external data.210.972 ms, p50211.587 ms, throughput4.74 samples/s, and RSS total delta+80.81 MB.AutoModelForSequenceClassification,xlm-roberta, andtext-classification. Explicittext-rankingandrerankingconfig requests both exit 2. Current-main reranking Eval is UNSUPPORTED-TASK, exits 1, and emits no metrics.text-classification, and WinML adds no task:VENDOR-ONLY. The exact-lock live probe could not import Optimum's ONNX model-config module because the locked Optimum/Transformers pair is incompatible (_CAN_RECORD_REGISTRYimport failure), so its evidence remainsSTATIC-MAPPED; LIVE-PROBE-LOCK-INCOMPATIBILITY; this does not become a claim that WinML added reranking support.2. Goal
3. Outcome
The shipped Outcome is L0: exactly two model-specific CPU reranking recipes declare verified fp32 and fp16 coverage while generic reranking remains owned by dependency PR #1322. The highest reached Goal verdict is L3 PASS on candidate
bc7377782d96a4788e565ff3acf0a6c2f06ae56d, with full required-tuple coverage and no deferred tuples.Learner findings
xlm-roberta-005throughxlm-roberta-009retain the resolved autoconf/HTP facts, complete static analysis, fp32/fp16 structure and bounded perf, raw-logit parity/order, and pinned Chinese functional-smoke evidence. They are separate Lane A knowledge changes, as is methodology finding_meta-113(Lane A commit113413ae, compare); none is included in this model PR.Exact-candidate quality: Ruff passed, mypy reported no issues in 438 source files, and the five candidate test partitions passed an aggregate 8420 tests: models 1534 passed / 6 skipped / 2 xfailed; optim 848 passed / 16 skipped / 1 xfailed; commands 3641 passed / 9 skipped / 1 warning; analyze 1526 passed / 45 skipped; remaining 871 passed / 2 skipped / 1 deselected / 1 warning. Aggregate non-pass accounting was 78 skipped, 3 xfailed, and 1 deselected.
The original exact-head validation workflow concluded failure: its model job stopped when
winml analyzereturned exit 1 for partial/unknown static findings, so the wrapper skipped its summarizer even though complete JSON had already been emitted and was independently validated. This was a harness false negative and a non-candidate blocker, not a candidate change or a claim that the original workflow was green.Methodology finding
_meta-113is now mechanism confirmed by validation-only run 32660811255 on unchanged candidatebc7377782d96a4788e565ff3acf0a6c2f06ae56d, through closed, unmerged draft PR #1341. The repaired control flow captured analyze exit 1, continued to the summarizer, validated the completeANALYZE-PARTIAL-SUCCESSresult with 387 operators, 20 unique types, and all 7 requested EP rows, then returned wrapper exit 0 with both validator and final job successful. This exercises the repair without changing the candidate.4. Per-EP/device/precision results and Functional smoke Eval
input_idsandattention_maskINT32[1,512]; FLOATlogits[1,1]; 204 FLOAT initializers; artifact size 470724506 bytes.input_idsandattention_maskINT32[1,512]; FLOATlogits[1,1]; 204 FLOAT16 initializers; artifact size 235435418 bytes.0.9999999999999137, max absolute difference0.0000057220458984375; reference and ONNX descending order[0,1,2].0.9999999857145679, max absolute difference0.0023097991943359375; reference and ONNX descending order[0,1,2].Functional smoke Eval: L3 PASS on final candidate
bc7377782d96a4788e565ff3acf0a6c2f06ae56d, FP32 CPU, usingC-MTEB/Mmarco-reranking, configurationdefault, splitdev, pinned revision8e0c766dbe9e16e1d221116a3f36795fbade07f6. Deterministic first-N selection with no shuffle retained source candidate order and processed/scored 2/2 groups, 20/20 expanded pairs, with zero skipped groups and zero groups without a positive. Caps were 2 groups, 10 candidates per group, 20 total pairs, and sequence length 512. Schema (query,positive,negative), positive/negative relevance labels, and descending raw-logit prediction semantics were verified. MRR@10 =0.333333, Recall@1 =0.0, and Recall@10 =1.0. This Chinese run is functional smoke only: it proves end-to-end evaluator operability, not benchmark accuracy or multilingual quality. No fp16 or accelerator Eval claim is made. The former blocker was the absence of a WinML reranking evaluator; dependency PR #1322 supplies generic task resolution, paired-input inference, raw-logit evaluation, grouped relevance metrics, and dataset adaptation.5. Delta
The candidate diff contains exactly these two model-specific recipes:
examples/recipes/cross-encoder_mmarco-mMiniLMv2-L12-H384-v1/cpu/cpu/reranking_fp32_config.jsonexamples/recipes/cross-encoder_mmarco-mMiniLMv2-L12-H384-v1/cpu/cpu/reranking_fp16_config.json/loader/tasktext-classificationreranking/quantnull/eval8e0c766dbe9e16e1d221116a3f36795fbade07f6; samples 2; shuffle false; streaming true; query/positive/negative columns; max candidates 10/loader/tasktext-classificationreranking/quant/tasktext-classificationreranking/eval8e0c766dbe9e16e1d221116a3f36795fbade07f6; samples 2; shuffle false; streaming true; query/positive/negative columns; max candidates 10The current-main generated auto-config was recovered and compared field by field after stripping note-only fields:
/evalleaves absent from auto-config (task; dataset path/name/revision/split/samples/shuffle/streaming; query/positive/negative/max-candidates mappings),/loader/taskchangestext-classificationtoreranking, and auto-config-only/export/compatibility/transformers_attention=eageris omitted. The eval block encodes the Producer-owned pinned bounded smoke plan; the loader delta selects dependency PR Add WinML reranking support for cross-encoder/ms-marco-MiniLM-L6-v2 #1322's paired-input reranking semantics; omitting the compatibility hint preserves the existing exact-model recipe contract./compile;/optim/clamp_constant_values; loader model class/type; export batch, cleanup, folding, dynamo, hierarchy, parameter, verbosity and opset settings; both named INT32 input shapes and value ranges; and thelogitsoutput name. fp32 also has identical/quant=null./quantitself plus/quant/{activation_symmetric,activation_type,calibration_load_path,calibration_method,calibration_save_path,distribution,fp16_keep_io_types,fp16_op_block_list,mode,model_id,model_type,nodes_to_exclude,op_types_to_quantize,per_channel,samples,save_calibration,seed,symmetric,task,weight_symmetric,weight_type}. They have no like-for-like value because current-main auto-config was generated without a precision flag; this is a precision realization, not an auto-config regression.Relative to the existing exact-model legacy recipe, export, optimization, and compile configuration are identical; the recipes preserve
AutoModelForSequenceClassification,xlm-roberta, opset 17, INT32[1,512]named inputs, notoken_type_ids, and one logits output. The existing text-classification recipe is unchanged. No source, tests, workflow files, or production recipe README are changed. Current-main recipe-free fp32 acceptance passes, while current-main reranking config/Eval remain unsupported; generic reranking behavior and acceptance remain dependency PR #1322 ownership. The two-recipe delta is reducibility-consistent with the charter and contains no checkpoint-specific shared-code behavior.6. Analyze summary - component level and op level
Static rule analysis completed as
ANALYZE-PARTIAL-SUCCESSwith exit code 1; complete JSON was emitted and independently validated. This is static compatibility analysis, not accelerator runtime execution.Component-level summary
The unresolved mapping gap is 127 optimizer-generated/helper nodes in fp32; repeated encoder layers are collapsed above.
Op-level summary
No unsupported operator type was reported. CUDA, MIGraphX, TensorRT, and DML have no rule classifications. These are complete per-EP static findings, not runtime support claims.
7. Reproduce commands