fix(build): honor --no-optimize and add multilingual similarity recipes - #1370
ssss141414 wants to merge 2 commits into
Conversation
|
REQUEST_CHANGES Reviewed candidate One required
The implementation itself consumes Evidence review: all six supplied upstream manifests rehashed cleanly; the candidate worktree is clean and matches parent/tree identity; the PR is OPEN and DRAFT with Live checks at capture time:
Active checks above are recorded as pending, not PASS. A fresh Reviewer pass must rebind the new head, re-enumerate all threads/comments, and require every live check to complete successfully. This is an ordinary reviewer opinion comment, not a GitHub Review state. Preserve the draft PR. |
|
APPROVE Reviewed repaired candidate The prior Engineering review found the combined four-file diff sound and scoped to Outcome L2. Evidence verification: all nine frozen Planner/Producer/Tester/Learner/prior-Reviewer/repair/Explainer manifests and members rehashed exactly. Candidate identity is clean with no drift. Direct evidence confirms FP32/FP16 L0-L3 coverage, true FP16 initializers and 0.500004 external-data ratio, complete 383-node/19-op static Analyze with retained limitations, bounded two-row Independent quality gates at this head: full Ruff passed; Live PR state: OPEN draft, base Live checks at the reviewed SHA:
Coverage is full: reachable and verified tuples are CPU/cpu FP32 and CPU/cpu FP16; deferred tuples: none. Disposition: terminal skill-level APPROVE. This is an ordinary conversation comment, not a GitHub Review state. Preserve the draft PR. |
Summary
This L2 contribution adds CPU FP32 and FP16 sentence-similarity recipes for
dell-research-harvard/lt-wikidata-comp-multiand fixes shared build-stage control for Hugging Face and direct-ONNX inputs. The candidate reached the committed L3 goal with full planned CPU coverage: both precisions passed structural, performance, and bounded numeric validation, and FP32 passed the bounded multilingual functional smoke Eval. A test-only follow-up now proves that configured compile returns a distinct output and that finalization consumes it in both concrete no-optimize paths. The current candidate is3cd22269dfbfaac8baef63cb221c44c9e803af91, with parenta4ad838ecb83d103ee2a338dda5746a72492262b.Model metadata
What the model does
A multilingual text-embedding checkpoint for company-alias record linkage and sentence similarity across 12 advertised languages; it exports contextual token states consumed by downstream mean pooling into 768-dimensional embeddings.
dell-research-harvard/lt-wikidata-comp-multi@129b41d6e02494453aef06108baec55d85c6ad8c, its model card,config.model_type=xlm-roberta,architectures=[XLMRobertaModel], and1_Pooling/config.jsonwithpooling_mode_mean_tokens=true.verified.Primary user stories
verified.Supported tasks
sentence-similarityon the checkpoint and WinML surfaces. Evidence: Hubpipeline_tag=sentence-similarity;winml eval --schema --task sentence-similarityexits 0. Confidence:verified.feature-extractionon Transformers, Optimum ONNX, and WinML surfaces. Evidence:winml inspectresolves feature extraction throughXLMRobertaIOConfig; current main contains exact-model FP32/FP16 feature-extraction recipes. Confidence:verified.Model architecture
modeling_xlm_roberta.py, pinned pooling config, and built ONNX graph structure (verified).Validation and support evidence
Baseline
Baseline was freshly measured on main commit
6b16162816121bec4f1610726dc0769b2df5a703withwinml, version 0.0.1.dev0. Auto-config generated a sentence-similarity recipe. A no-optimize CPU build exited 0 in 124.8 s (Export 69.0 s, Optimize 30.0 s), but still emitted an Optimize stage and optimized artifact, proving that--no-optimizewas ignored by the concrete HF pipeline. The resulting baseline perf was 310.26 ms mean, 312.81 ms p50, 314.20 ms p90, 3.22 samples/s, and +105.0 MB RAM over three measured iterations. Baseline Eval evidence contained only Python REPL startup and established no task metric.The Optimum registry probe found the vendor and WinML surfaces both advertising feature extraction, fill-mask, multiple choice, question answering, text classification, and token classification; WinML added no task. The aggregate probe exceeded its 10-minute wall-time and was terminated (
probe_exit_code=-1), so no probe PASS is inferred. The baseline goal floor was L1.Goal
--no-optimizebehavior with quantization and defaults preserved; independent FP32/FP16 CPU recipe validation with true-FP16 evidence; and one final-SHA, two-row, pinned English-German functional smoke Eval with all fan-out caps retained.No charter re-issue or ceiling change occurred.
Outcome
The shipped tier is L2 and the highest goal verdict is
L3 PASS. Coverage isfullfor the planned CPU/cpu FP32 and FP16 tuples, with no deferred tuples. The contribution adds two sentence-similarity recipes, changes shared build behavior, and adds concrete-sink regression tests.The follow-up from
a4ad838ecb83d103ee2a338dda5746a72492262bto3cd22269dfbfaac8baef63cb221c44c9e803af91changes onlytests/unit/commands/test_build.py. Fresh testing at3cd22269...covered the four concrete HF/ONNX sink cases, the complete commands partition, and touched-file Ruff. Because production code, recipes,uv.lock, model artifacts, evaluator, compiler, optimizer, and workflows are unchanged, the Tester made an explicitREUSE-REBINDdecision for L0 builds/structure, L1 perf, L2 parity, L3 Eval, component/op Analyze, models/optim/remaining partitions, full Ruff, and mypy. Those values below were executed ata4ad838e...and are preserved as provenance-bound evidence; they were not rerun or relabeled as executions at3cd22269....Learner findings
xlm-roberta-005throughxlm-roberta-010and methodology finding_meta-114were published separately in Lane A PR gim-home/ModelKitArtifacts#289 at commit6b485ff17aeb128651335f0d53301479b06f3151, based on prerequisite PR #288 at commit63e0bb74b4b79a394d5aaffef496d3d83404447b. Those skill and knowledge files are not part of this winml-cli contribution.Per-EP/device/precision results and Functional smoke Eval
The following L0-L3 model values are
REUSE-REBINDevidence executed ata4ad838e...; no production or artifact-producing input changed in the test-only follow-up.The L1 figures are short-run measurements with one warmup and three measured iterations; they are not a stable benchmark claim.
Functional smoke Eval:
L3 PASS, executed at candidatea4ad838ecb83d103ee2a338dda5746a72492262band retained for3cd22269...by the Tester's explicitREUSE-REBINDdecision. It used FP32 CPU andmteb/sts17-crosslingual-stsat requested and resolved revisionbb1de64ee6fd9ccd66e0bdbadcafe990f652d887, configen-de, splittest. Deterministic first-N selection requested and processed two English-German sentence pairs. Schema was verified; labels are STS relatedness scores; predictions are cosine similarities of attention-mask mean-pooled, L2-normalizedlast_hidden_stateembeddings; pooling was verified against the pinned configuration. Fan-out was capped at two sentence pairs, oneen-delanguage direction, sequence length 512, no beams, and no candidate labels or prompts. The rawspearman_correlationwas0.9999999999999999(approximately 1.0). With only two rows, this is functional end-to-end operability evidence only, not representative accuracy or benchmark-quality evidence.Delta
Changed winml-cli files across the full current candidate:
src/winml/modelkit/commands/build.pytests/unit/commands/test_build.pyexamples/recipes/dell-research-harvard_lt-wikidata-comp-multi/cpu/cpu/sentence-similarity_fp32_config.jsonexamples/recipes/dell-research-harvard_lt-wikidata-comp-multi/cpu/cpu/sentence-similarity_fp16_config.jsonThe FP32 recipe is identical to the Planner's starting auto-config. The FP16 recipe changes only JSON pointer
/quant, fromnullto explicit FP16 configuration: modefp16, samples10, calibration methodminmax, weight and activation typesuint8,per_channel=false,symmetric=false, uniform distribution, model/task/type identity, andfp16_keep_io_types=true; optional symmetry, paths, op lists, block lists, and seed remain null. The production recipe README is untouched. Recipe-free acceptance passed, and the delta is reducibility-consistent with the charter.The repair commit changes only
tests/unit/commands/test_build.py: its HF and ONNX no-optimize tests now configure compile to return a path distinct from the quantized or exported input, assert compile ordering, and assert that finalization consumes that compiled path. It changes no production behavior, recipes, lock data, or artifacts.Bug fix explanation
winml build ... --no-optimizepropagated the flag but still ran Optimize on a concrete Hugging Face build; direct-ONNX builds had the same sink-level gap.skip_optimizeinbuild_pipeline_extra_kwargs, but_build_hf_pipelineand_build_onnx_pipelinedid not consume it before unconditionally invoking the optimize helper. Existing propagation-only tests mocked the concrete sink and could not detect this._build_hf_pipelineand_build_onnx_pipelineconsumeskip_optimizeand bypass only the Optimize helper. Requested FP16/other quantization, compile, and finalize stages continue to run.--no-optimizehonor its documented meaning.3cd22269..., four concrete HF/ONNX sink cases passed in 4.83 s. They cover quantized and no-quant paths, make compile output distinct, assert compile receives the quantized or exported output, and assert finalization receives the compiled output while Optimize alone is skipped. The complete commands partition passed with 3648 passed, 9 skipped, 1 warning in 317.31 s (0:05:17), and touched-file Ruff reportedAll checks passed!.Analyze summary - component level and op level
ANALYZE-PARTIAL-SUCCESS: Analyze emitted complete seven-EP JSON and exited1; the nonzero status is retained because findings include partial/unknown support and EPs without rule data. This is static rule analysis of the FP32 graph, not runtime execution. No all-EP runtime support was measured, and no FP16 all-EP Analyze run was supplied. This section isREUSE-REBINDevidence executed ata4ad838e..., not a fresh Analyze run at3cd22269....Component-level summary
last_hidden_stateboundary; downstream mean poolingOp-level summary
CUDA and MIGraphX classifications had ambiguous type-derived counts (380 supported nodes, 2 partial, 1 unknown). TensorRT and DML had no rule data, leaving all 383 nodes unclassified. None of these static rows claims provider runtime execution.
CI quality partitions
Fresh local evidence at
3cd22269...:Live PR #1370 CI at head
3cd22269dfbfaac8baef63cb221c44c9e803af91: all nine reported checks completed successfully: Analyze (Python), lint, test (analyze), test (models), test (optim), test (commands), test (remaining), CodeQL, and license/cla.Preserved
REUSE-REBINDevidence executed ata4ad838e...:insert-license: Passed.ruff-full: All checks passed.mypy-full: Success, no issues in 441 source files.The prior remaining-partition attempt was environment-blocked because Node 22 was absent; the final supplemental run used Node v22.23.2 on
PATHand passed.Reproduce commands
Run from a winml-cli checkout after installing its frozen environment. These are the Tester-supplied portable public commands retained from the original model-validation handoff:
This body is ready to replace the description of existing draft PR #1370, which carries the
model-scale-by-skilllabel. This refresh does not mutate the PR.