recipe(distilbert): add MNLI text classification recipes#1153
Draft
kujin66 wants to merge 4 commits into
Draft
Conversation
Author
|
Reviewer verdict: APPROVE fallback comment / Lane B model PR is ready for maintainer review. Checked items:
Methodology note:
|
kujin66
marked this pull request as ready for review
July 21, 2026 03:05
ssss141414
marked this pull request as draft
July 22, 2026 18:27
ssss141414
approved these changes
Jul 22, 2026
ssss141414
left a comment
Contributor
There was a problem hiding this comment.
APPROVE — independent final-head review
Reviewed SHA: 33a018c68703ba57a6181557f7fa7283e2db51a9.
- Scope: current-main merge preserves the contributor history; the merge-base diff contains only the nested CPU fp32/fp16 recipe JSON files. The production recipe README and Python source are unchanged.
- Baseline: the cited main SHA
5deebd422e95f28fe8fd912ee50ce874710187b3still equalsorigin/main(0commits ahead at final review). - Fresh final-head builds: fp32 and fp16 both emitted
Build complete; graphs are 224/225 nodes with int32[1,512]named inputs and[1,3]logits. fp16 has 109 FLOAT16 initializers and 133,911,552-byte external data versus fp32's 267,823,104 bytes. - Independent L1 spot check: fp32 mean/p50 117.904/117.767 ms, 8.48 samples/s, +275.12 MB RSS; fp16 mean/p50 139.600/138.830 ms, 7.16 samples/s, +294.20 MB RSS. Both are within the tester's expected host variance.
- Independent L2 rerun exactly reproduced fp32 cosine
0.999999999999422, max-abs1.0728836059570312e-05, 6/6 argmax and fp16 cosine0.9999998731168774, max-abs0.005286037921905518, 6/6 argmax. - Independent L3 rerun exactly reproduced accuracy
0.76for both artifacts on pinnednyu-mll/glue@bcdcba79d07bc864c1c254ccfcedcce55bcc9a8c,mnli/validation_matched, first 100 unshuffled rows. - Analyze: independent fp16 scan reproduced 225 operators / 17 types and all 11 requested target records when JSON was captured from stdout. The first review pass found that
--outputretained only the first target; the explainer repaired the public commands to capture stdout and added self-contained semantic-input and L2 harness generation. The PR body, not the stale earlier comment, is the source of truth. - Quality: fresh review checkout passed
uv run ruff check src/ tests/anduv run mypy -p winml.modelkit(409source files). Exact-head GitHub checks all completed successfully: CodeQL/Analyze, lint, analyze/models/optim/commands/remaining tests, and CLA. Producer-side exact-head partitions also passed: 1,351 models tests and 2,373 commands tests. - Feedback reconciliation: 0 line comments, 1 conversation comment, 0 formal reviews, 0 review threads, and 0 unresolved threads. The old conversation comment is explicitly superseded because it describes the prior flat fp16/w8a16/README state and old measurements.
- Knowledge: separate Draft Lane A PR https://github.com/gim-home/ModelKitArtifacts/pull/178 contains only
model_knowledge/distilbert.json; no methodology friction trigger was observed. - Shipment: PR remains Draft and retains the actual
model-scale-by-skilllabel.
Highest Goal verdict: L3 PASS for CPU/cpu fp32 and fp16. No deferred required tuples and no unresolved failures.
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 nested CPU fp32 and fp16 recipes for
typeform/distilbert-base-uncased-mnlitext classification while preserving the contributor's original commits. This is an Effort L0, Outcome L0 recipe-only contribution; both required tuples reach Goal L3 with CPU runtime, PyTorch parity, and pinned GLUE MNLI evaluation evidence. The production recipe README remains unchanged.Model metadata
What the model does
A compact DistilBERT natural-language-inference classifier that accepts a premise/hypothesis text pair and returns logits for entailment, neutral, or contradiction.
cfa538a0fddbbd978fefe8966c1aeff7ad409c90, plusDistilBertForSequenceClassificationsource (verified).Primary user stories
verified).pipeline_tag=zero-shot-classificationand model card (verified).Supported tasks
text-classification: checkpoint, Transformers, Optimum ONNX, and WinML; evidenced by the concrete checkpoint class, Optimum registry, and WinML inspect/config (verified).zero-shot-classification: checkpoint and Transformers; evidenced by the checkpoint pipeline tag and model card (verified).Model architecture
mapped).Validation and support evidence
Baseline
main:5deebd422e95f28fe8fd912ee50ce874710187b3(feat(optim): add Conv channel-affine folding (#1167)); WinML CLI 0.2.0.nyu-mll/glue@bcdcba79d07bc864c1c254ccfcedcce55bcc9a8c,mnli/validation_matched, first 10 unshuffled rows, accuracy 1.0. JSON was emitted before the same post-result native cleanup exit.input_idsandattention_maskat[1,512], fp32/no quantization, and no optimization or compilation. The PR adds explicit precision coverage and pinned evaluation configuration.VENDOR-ONLY; WinML adds no task registration. Vendor tasks include text classification.Goal
Outcome
examples/recipes/typeform_distilbert-base-uncased-mnli/cpu/cpu/text-classification_fp32_config.jsonexamples/recipes/typeform_distilbert-base-uncased-mnli/cpu/cpu/text-classification_fp16_config.jsonPer-EP/device/precision results — including perf and eval data
Goal ladder
Perf
Eval
The checkpoint label map
0=ENTAILMENT, 1=NEUTRAL, 2=CONTRADICTIONmatches the authoritative GLUE MNLI map by index and case-normalized name, so this L3 comparison is semantically valid.nyu-mll/glue@bcdcba79d07bc864c1c254ccfcedcce55bcc9a8c,mnli/validation_matchednyu-mll/glue@bcdcba79d07bc864c1c254ccfcedcce55bcc9a8c,mnli/validation_matchedDelta
Relative to current-main auto-config, both recipes add the same
/evalobject: tasktext-classification; datasetnyu-mll/glue; namemnli; splitvalidation_matched; samples100; mappingsinput_column=premiseandsecond_input_column=hypothesis./quant: null; export, optimizer, compile, and loader blocks are otherwise identical to the current-main auto-config./quantfromnulltomode=fp16, pins the checkpoint model id/type, and keeps graph I/O types with/quant/fp16_keep_io_types: true./auto=false,/eval/device=auto,/eval/skip_build=true,/eval/dataset/shuffle=true, and/eval/dataset/seed=42. No optimization is auto-added.cpu/cpu, CPU w8a16 is removed, and mandatory CPU fp32 is added.Analyze summary — component level and op level
Both artifacts are ANALYZE-PARTIAL-SUCCESS: complete parseable 11-target JSON was emitted and exit 1 reflects partial/unknown static classifications. This is static compatibility analysis, not runtime execution.
Component-level summary
HTP metadata agrees across precisions: 66,955,779 parameters, 96 modules, 28 traced modules (29.17%), and 56 execution steps.
Op-level summary
Rule-less CUDA, MIGraphX, DML, CPU, and VitisAI rows classify all 17 types unknown; those rows are retained internally and are not runtime-failure claims.
Reproduce commands