recipe(owlvit): add base patch16 fp16 recipe#1155
Draft
kujin66 wants to merge 1 commit into
Draft
Conversation
Author
|
APPROVE Reviewer checks performed from PR branch
Coverage annotation: full for charter target EP |
kujin66
marked this pull request as ready for review
July 21, 2026 03:50
ssss141414
marked this pull request as draft
July 22, 2026 16:49
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.
Adds a CPU-validated FP16 recipe for
google/owlvit-base-patch16zero-shot object detection. The model already exports on currentorigin/main, but the auto-config/baseline artifact assigns ONNX input names to the wrong shapes; this recipe fixes the input order to matchOwlViTForObjectDetection.forward(input_ids, pixel_values, attention_mask)and adds a verified FP16 artifact path.Recipe path(s)
examples/recipes/google_owlvit-base-patch16/zero-shot-object-detection_fp16_config.jsonREADME row
examples/recipes/README.mdcurrently says the table lists model/task tuples that pass fp16 eval on all 10 EP/device buckets; this PR has CPU build/perf evidence only, so adding a row would over-claim catalog coverage.Build output dir
temp/baseline_google_owlvit_base_patch16temp/verify_google_owlvit_base_patch16_fp16_fixedtemp/owlvit_fp16_perf_cpu.jsonBuild log
uv run winml build -m google/owlvit-base-patch16 -o temp/baseline_google_owlvit_base_patch16 --ep cpu --device cpu --no-analyze --no-optimize --no-quant --no-compile --rebuildBuild complete in 126.9s; final artifacttemp/baseline_google_owlvit_base_patch16/model.onnx; baseline HEAD38767add6f91c7b10b6394fae3af6f437e02effd; winml-cli package version0.2.0.pixel_values [1,16],input_ids [1,3,768,768],attention_mask [1,16].uv run winml build -c examples/recipes/google_owlvit-base-patch16/zero-shot-object-detection_fp16_config.json -m google/owlvit-base-patch16 -o temp/verify_google_owlvit_base_patch16_fp16_fixed --ep cpu --device cpu --precision fp16 --no-analyze --no-compile --rebuildBuild complete in 90.4s; final artifacttemp/verify_google_owlvit_base_patch16_fp16_fixed/model.onnx; FP16 stage14.5s; quantized artifact291.1 MB.Appended findings
model_knowledge/owlvit.json, findingowlvit-001.input_tensorsasinput_ids,pixel_values,attention_mask; the inspect/autoconfig order can build but produces semantic ONNX input-name/shape swaps.skill_metafinding added; existing reviewer guidance already covers semantically wrong recipe I/O and FP16 initializer validation.Optimum-coverage probe
model_type:owlvitarchitectures:['OwlViTForObjectDetection']vendor:['feature-extraction', 'zero-shot-object-detection']after_winml:['feature-extraction', 'zero-shot-object-detection']added_by_winml:[]VENDOR-ONLYwinml inspectresolves taskzero-shot-object-detection, loaderAutoModelForZeroShotObjectDetection, exporterOwlViTOnnxConfig, WinML classWinMLModelForGenericTask.Claimed (Effort, Goal, Outcome)
L0recipe-only, with an existing OWLv2 zero-shot-object-detection template.L1CPU.L0model PR plus skill-sidemodel_knowledgefinding.['cpu'].Goal-ladder verdict table
L0 PASS: recipe JSON parses; build completed in90.4s; ONNX structural validation: inputsinput_ids [1,16],pixel_values [1,3,768,768],attention_mask [1,16]; outputslogits [1,2304,1],pred_boxes [1,2304,4],text_embeds [1,1,512],image_embeds [1,48,48,768]; FP16 validation found419FLOAT16 initializers and0FLOAT initializers;model.onnx.datais304,811,008bytes vs baseline609,623,040bytes.L1 PASS:uv run winml perf -m temp/verify_google_owlvit_base_patch16_fp16_fixed/model.onnx --device cpu --ep cpu --format json -o temp/owlvit_fp16_perf_cpu.json --overwritewrote JSON withCPUExecutionProvider, 100 iterations, mean2566.361 ms, p502550.853 ms, throughput0.39 samples/s, RSS total delta1978.02 MB. Available providers snapshot:['DmlExecutionProvider', 'CPUExecutionProvider'].Methodology-evolution declaration
_metarule was observed. The run did surface a model-family gotcha, captured inmodel_knowledge/owlvit.json(owlvit-001), and the existing reviewer checklist already requires semantic recipe sanity plus emitted FP16 validation.