From ae145f72b488d26b9047500a60ad01e8d5e6491e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Jul 2026 16:56:36 +0800 Subject: [PATCH 1/4] Add LayoutLM document QA recipe support Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- examples/recipes/README.md | 3 +- .../question-answering_fp16_config.json | 81 +++++++++++++++ .../question-answering_w8a16_config.json | 98 +++++++++++++++++++ src/winml/modelkit/models/hf/__init__.py | 1 + src/winml/modelkit/models/hf/layoutlm.py | 60 ++++++++++++ src/winml/modelkit/onnx/io.py | 7 ++ .../unit/export/test_onnx_config_overrides.py | 55 +++++++++++ tests/unit/export/test_pytorch_export.py | 15 +++ 8 files changed, 319 insertions(+), 1 deletion(-) create mode 100644 examples/recipes/impira_layoutlm-document-qa/question-answering_fp16_config.json create mode 100644 examples/recipes/impira_layoutlm-document-qa/question-answering_w8a16_config.json create mode 100644 src/winml/modelkit/models/hf/layoutlm.py diff --git a/examples/recipes/README.md b/examples/recipes/README.md index 1077e4f74..de99b89a7 100644 --- a/examples/recipes/README.md +++ b/examples/recipes/README.md @@ -14,7 +14,7 @@ Each *(model, task)* includes: ## Models -Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. +Total: **76** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. | Model | Task | |---|---| @@ -61,6 +61,7 @@ Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) bu | google-bert/bert-large-uncased-whole-word-masking-finetuned-squad | question-answering | | google/vit-base-patch16-224 | image-classification | | google/vit-base-patch16-224-in21k | image-feature-extraction | +| impira/layoutlm-document-qa | question-answering | | joeddav/xlm-roberta-large-xnli | zero-shot-classification | | laion/CLIP-ViT-B-32-laion2B-s34B-b79K | feature-extraction | | mattmdjaga/segformer_b2_clothes | image-segmentation | diff --git a/examples/recipes/impira_layoutlm-document-qa/question-answering_fp16_config.json b/examples/recipes/impira_layoutlm-document-qa/question-answering_fp16_config.json new file mode 100644 index 000000000..0fe7d1a21 --- /dev/null +++ b/examples/recipes/impira_layoutlm-document-qa/question-answering_fp16_config.json @@ -0,0 +1,81 @@ +{ + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "input_ids", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 50265 + ] + }, + { + "name": "bbox", + "dtype": "int32", + "shape": [ + 1, + 512, + 4 + ], + "value_range": [ + 0, + 1000 + ] + }, + { + "name": "attention_mask", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 2 + ] + }, + { + "name": "token_type_ids", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 1 + ] + } + ], + "output_tensors": [ + { + "name": "start_logits" + }, + { + "name": "end_logits" + } + ] + }, + "optim": { + "clamp_constant_values": true + }, + "quant": null, + "loader": { + "task": "question-answering", + "model_class": "LayoutLMForQuestionAnswering", + "model_type": "layoutlm" + } +} diff --git a/examples/recipes/impira_layoutlm-document-qa/question-answering_w8a16_config.json b/examples/recipes/impira_layoutlm-document-qa/question-answering_w8a16_config.json new file mode 100644 index 000000000..6cc5f1745 --- /dev/null +++ b/examples/recipes/impira_layoutlm-document-qa/question-answering_w8a16_config.json @@ -0,0 +1,98 @@ +{ + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "input_ids", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 50265 + ] + }, + { + "name": "bbox", + "dtype": "int32", + "shape": [ + 1, + 512, + 4 + ], + "value_range": [ + 0, + 1000 + ] + }, + { + "name": "attention_mask", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 2 + ] + }, + { + "name": "token_type_ids", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 1 + ] + } + ], + "output_tensors": [ + { + "name": "start_logits" + }, + { + "name": "end_logits" + } + ] + }, + "optim": { + "clamp_constant_values": true + }, + "quant": { + "mode": "qdq", + "samples": 10, + "calibration_method": "minmax", + "weight_type": "uint8", + "activation_type": "uint16", + "per_channel": false, + "symmetric": false, + "save_calibration": false, + "distribution": "uniform", + "seed": null, + "calibration_load_path": null, + "calibration_save_path": null, + "op_types_to_quantize": null, + "nodes_to_exclude": null, + "task": "question-answering", + "model_id": "impira/layoutlm-document-qa" + }, + "loader": { + "task": "question-answering", + "model_class": "LayoutLMForQuestionAnswering", + "model_type": "layoutlm" + } +} diff --git a/src/winml/modelkit/models/hf/__init__.py b/src/winml/modelkit/models/hf/__init__.py index 094714494..13250616f 100644 --- a/src/winml/modelkit/models/hf/__init__.py +++ b/src/winml/modelkit/models/hf/__init__.py @@ -44,6 +44,7 @@ from .depth_anything import DepthAnythingIOConfig as _DepthAnythingIOConfig # triggers registration from .depth_pro import DepthProIOConfig as _DepthProIOConfig # triggers registration from .detr import DETR_CONFIG +from .layoutlm import LayoutLMQAIOConfig as _LayoutLMQAIOConfig # triggers registration from .marian import MARIAN_CONFIG from .marian import MODEL_CLASS_MAPPING as _MARIAN_CLASS_MAPPING from .marian import MarianDecoderIOConfig as _MarianDecoderIOConfig # triggers registration diff --git a/src/winml/modelkit/models/hf/layoutlm.py b/src/winml/modelkit/models/hf/layoutlm.py new file mode 100644 index 000000000..63c19e319 --- /dev/null +++ b/src/winml/modelkit/models/hf/layoutlm.py @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +# -------------------------------------------------------------------------- +"""LayoutLM HuggingFace Model Configuration.""" + +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, cast + +from optimum.exporters.onnx.model_configs import LayoutLMOnnxConfig +from optimum.utils import NormalizedTextConfig +from optimum.utils.input_generators import DummyBboxInputGenerator, DummyVisionInputGenerator + +from ...export import MaxLengthTextInputGenerator, register_onnx_overwrite + + +if TYPE_CHECKING: + import torch + + +class ZeroTokenTypeLayoutLMTextInputGenerator(MaxLengthTextInputGenerator): + """LayoutLM text dummy generator that keeps token_type_ids within type_vocab_size=1.""" + + def generate( + self, + input_name: str, + framework: str = "pt", + int_dtype: str = "int64", + float_dtype: str = "fp32", + ) -> torch.Tensor: + """Generate LayoutLM text inputs, replacing token_type_ids with zeros.""" + tensor = cast( + "torch.Tensor", + super().generate( + input_name, + framework=framework, + int_dtype=int_dtype, + float_dtype=float_dtype, + ), + ) + if input_name == "token_type_ids": + return tensor.new_zeros(tensor.shape) + return tensor + + +@register_onnx_overwrite("layoutlm", "question-answering", library_name="transformers") +class LayoutLMQAIOConfig(LayoutLMOnnxConfig): # type: ignore[misc] # optimum base is untyped + """LayoutLM question-answering OnnxConfig with bbox and safe token type IDs.""" + + NORMALIZED_CONFIG_CLASS = NormalizedTextConfig.with_args( + sequence_length="max_position_embeddings", + allow_new=True, + MAX_2D_POSITION_EMBEDDINGS="max_2d_position_embeddings", + ) + DUMMY_INPUT_GENERATOR_CLASSES: tuple[type[Any], ...] = ( + ZeroTokenTypeLayoutLMTextInputGenerator, + DummyVisionInputGenerator, + DummyBboxInputGenerator, + ) diff --git a/src/winml/modelkit/onnx/io.py b/src/winml/modelkit/onnx/io.py index 1c58362cf..547f1c7cc 100644 --- a/src/winml/modelkit/onnx/io.py +++ b/src/winml/modelkit/onnx/io.py @@ -106,6 +106,13 @@ def to_tensor(self) -> Any: lo, hi = self.value_range if torch_dtype.is_floating_point: return torch.rand(concrete_shape, dtype=torch_dtype) * (hi - lo) + lo + if self.name == "bbox" and len(concrete_shape) >= 1 and concrete_shape[-1] == 4: + coords = torch.randint(int(lo), int(hi), concrete_shape, dtype=torch_dtype) + x0 = torch.minimum(coords[..., 0], coords[..., 2]) + y0 = torch.minimum(coords[..., 1], coords[..., 3]) + x1 = torch.maximum(coords[..., 0], coords[..., 2]) + y1 = torch.maximum(coords[..., 1], coords[..., 3]) + return torch.stack((x0, y0, x1, y1), dim=-1) return torch.randint(int(lo), int(hi), concrete_shape, dtype=torch_dtype) # Fallback: no range info (backward compatible) diff --git a/tests/unit/export/test_onnx_config_overrides.py b/tests/unit/export/test_onnx_config_overrides.py index f7ba15a39..29478512c 100644 --- a/tests/unit/export/test_onnx_config_overrides.py +++ b/tests/unit/export/test_onnx_config_overrides.py @@ -57,6 +57,7 @@ class TestOnnxConfigRegistration: ("xlm-roberta", "fill-mask", "XLMRobertaIOConfig"), ("camembert", "fill-mask", "CamemBERTIOConfig"), ("mpnet", "fill-mask", "MPNetIOConfig"), + ("layoutlm", "question-answering", "LayoutLMQAIOConfig"), ("zoedepth", "depth-estimation", "ZoeDepthIOConfig"), ], ids=[ @@ -67,6 +68,7 @@ class TestOnnxConfigRegistration: "xlm-roberta", "camembert", "mpnet", + "layoutlm-qa", "zoedepth", ], ) @@ -131,6 +133,59 @@ def test_bert_io_specs_shape_matches(self, bert_config) -> None: ) +class TestLayoutLMQuestionAnsweringOverride: + """LayoutLM QA export must include bbox and safe token_type_ids.""" + + def test_layoutlm_qa_dummy_inputs_include_bbox_and_zero_token_types(self) -> None: + """Dummy inputs must keep bbox while forcing token_type_ids to zero.""" + from transformers import LayoutLMConfig + + layoutlm_config = LayoutLMConfig( + vocab_size=100, + hidden_size=64, + num_hidden_layers=2, + num_attention_heads=2, + intermediate_size=128, + max_position_embeddings=32, + max_2d_position_embeddings=1024, + type_vocab_size=1, + ) + + inputs = generate_dummy_inputs("layoutlm", "question-answering", layoutlm_config) + + assert set(inputs) == {"input_ids", "bbox", "attention_mask", "token_type_ids"} + assert inputs["input_ids"].shape == (1, layoutlm_config.max_position_embeddings) + assert inputs["bbox"].shape == (1, layoutlm_config.max_position_embeddings, 4) + assert inputs["token_type_ids"].shape == (1, layoutlm_config.max_position_embeddings) + assert inputs["token_type_ids"].max().item() == 0 + + def test_layoutlm_qa_io_specs_include_span_outputs(self) -> None: + """LayoutLM QA specs expose document bbox input and span logits outputs.""" + from transformers import LayoutLMConfig + + layoutlm_config = LayoutLMConfig( + vocab_size=100, + hidden_size=64, + num_hidden_layers=2, + num_attention_heads=2, + intermediate_size=128, + max_position_embeddings=32, + max_2d_position_embeddings=1024, + type_vocab_size=1, + ) + + specs = resolve_io_specs("layoutlm", "question-answering", layoutlm_config) + + assert specs["input_names"] == [ + "input_ids", + "bbox", + "attention_mask", + "token_type_ids", + ] + assert specs["input_shapes"] == [(1, 32), (1, 32, 4), (1, 32), (1, 32)] + assert specs["output_names"] == ["start_logits", "end_logits"] + + # ============================================================================= # Class 3: _adjust_position_embeddings unit tests # ============================================================================= diff --git a/tests/unit/export/test_pytorch_export.py b/tests/unit/export/test_pytorch_export.py index 5b6aeae26..f22fc47b6 100644 --- a/tests/unit/export/test_pytorch_export.py +++ b/tests/unit/export/test_pytorch_export.py @@ -122,6 +122,21 @@ def test_int64_tensor(self) -> None: assert t.dtype == torch.int64 assert (t == 1).all() + def test_bbox_tensor_generates_ordered_coordinates_within_range(self) -> None: + spec = InputTensorSpec( + name="bbox", + dtype="int32", + shape=(2, 128, 4), + value_range=(0, 1000), + ) + t = spec.to_tensor() + assert t.dtype == torch.int32 + assert t.shape == (2, 128, 4) + assert int(t.min()) >= 0 + assert int(t.max()) < 1000 + assert torch.all(t[:, :, 2] >= t[:, :, 0]) + assert torch.all(t[:, :, 3] >= t[:, :, 1]) + def test_no_dtype_defaults_float(self) -> None: spec = InputTensorSpec(name="x", shape=(1, 10)) t = spec.to_tensor() From b945df393ab5f0b2f729ad5a55855c03fd807e72 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 11 Jul 2026 23:34:46 +0800 Subject: [PATCH 2/4] fix: rename layoutlm fp32 recipe Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- examples/recipes/README.md | 12 +++++++----- ...nfig.json => question-answering_fp32_config.json} | 0 2 files changed, 7 insertions(+), 5 deletions(-) rename examples/recipes/impira_layoutlm-document-qa/{question-answering_fp16_config.json => question-answering_fp32_config.json} (100%) diff --git a/examples/recipes/README.md b/examples/recipes/README.md index de99b89a7..4c0362763 100644 --- a/examples/recipes/README.md +++ b/examples/recipes/README.md @@ -6,15 +6,17 @@ Curated recipe configuration samples for **portable, high-performance, and high- DML/GPU, MLAS/CPU, OpenVINO (CPU/GPU/NPU), QNN (GPU/NPU), VitisAI/NPU, NVIDIA TensorRT RTX/GPU -Each *(model, task)* includes: +Each *(model, task)* includes one or more checked-in precision variants: -- `fp16` -- `w8a8` -- `w8a16` quantized variants +- `fp32` or `fp16` +- optional `w8a8` +- optional `w8a16` quantized variants ## Models -Total: **76** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. +Total: **76** indexed (model, task) tuples with built-in recipes. + +Precision note: `impira/layoutlm-document-qa` currently ships `question-answering_fp32_config.json` and `question-answering_w8a16_config.json`. | Model | Task | |---|---| diff --git a/examples/recipes/impira_layoutlm-document-qa/question-answering_fp16_config.json b/examples/recipes/impira_layoutlm-document-qa/question-answering_fp32_config.json similarity index 100% rename from examples/recipes/impira_layoutlm-document-qa/question-answering_fp16_config.json rename to examples/recipes/impira_layoutlm-document-qa/question-answering_fp32_config.json From 1a2bc7910f58447da610728b76e3d834cc892dbb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Jul 2026 19:18:58 +0800 Subject: [PATCH 3/4] recipe(layoutlm): nest CPU recipes, ship fp32+fp16, address review - Move question-answering recipe to cpu/cpu/ (tested EP/device) and ship both fp32 and fp16 float variants (both quant:null); drop CPU w8a16. - layoutlm.py: remove inert MAX_2D_POSITION_EMBEDDINGS normalized-config mapping (Optimum's DummyBboxInputGenerator never reads it) and document the sequence_length binding. - onnx/io.py: document the bbox HF-convention name heuristic. - README: update the precision note to fp32 + fp16. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- examples/recipes/README.md | 2 +- .../cpu/question-answering_fp16_config.json} | 0 .../cpu/question-answering_fp32_config.json} | 19 +------------------ src/winml/modelkit/models/hf/layoutlm.py | 10 +++++++++- src/winml/modelkit/onnx/io.py | 6 ++++++ 5 files changed, 17 insertions(+), 20 deletions(-) rename examples/recipes/impira_layoutlm-document-qa/{question-answering_fp32_config.json => cpu/cpu/question-answering_fp16_config.json} (100%) rename examples/recipes/impira_layoutlm-document-qa/{question-answering_w8a16_config.json => cpu/cpu/question-answering_fp32_config.json} (73%) diff --git a/examples/recipes/README.md b/examples/recipes/README.md index 4c0362763..de29ad872 100644 --- a/examples/recipes/README.md +++ b/examples/recipes/README.md @@ -16,7 +16,7 @@ Each *(model, task)* includes one or more checked-in precision variants: Total: **76** indexed (model, task) tuples with built-in recipes. -Precision note: `impira/layoutlm-document-qa` currently ships `question-answering_fp32_config.json` and `question-answering_w8a16_config.json`. +Precision note: `impira/layoutlm-document-qa` ships `cpu/cpu/question-answering_fp32_config.json` and `cpu/cpu/question-answering_fp16_config.json` (CPU float bucket, both `quant: null`; no CPU quantized variant). | Model | Task | |---|---| diff --git a/examples/recipes/impira_layoutlm-document-qa/question-answering_fp32_config.json b/examples/recipes/impira_layoutlm-document-qa/cpu/cpu/question-answering_fp16_config.json similarity index 100% rename from examples/recipes/impira_layoutlm-document-qa/question-answering_fp32_config.json rename to examples/recipes/impira_layoutlm-document-qa/cpu/cpu/question-answering_fp16_config.json diff --git a/examples/recipes/impira_layoutlm-document-qa/question-answering_w8a16_config.json b/examples/recipes/impira_layoutlm-document-qa/cpu/cpu/question-answering_fp32_config.json similarity index 73% rename from examples/recipes/impira_layoutlm-document-qa/question-answering_w8a16_config.json rename to examples/recipes/impira_layoutlm-document-qa/cpu/cpu/question-answering_fp32_config.json index 6cc5f1745..0fe7d1a21 100644 --- a/examples/recipes/impira_layoutlm-document-qa/question-answering_w8a16_config.json +++ b/examples/recipes/impira_layoutlm-document-qa/cpu/cpu/question-answering_fp32_config.json @@ -72,24 +72,7 @@ "optim": { "clamp_constant_values": true }, - "quant": { - "mode": "qdq", - "samples": 10, - "calibration_method": "minmax", - "weight_type": "uint8", - "activation_type": "uint16", - "per_channel": false, - "symmetric": false, - "save_calibration": false, - "distribution": "uniform", - "seed": null, - "calibration_load_path": null, - "calibration_save_path": null, - "op_types_to_quantize": null, - "nodes_to_exclude": null, - "task": "question-answering", - "model_id": "impira/layoutlm-document-qa" - }, + "quant": null, "loader": { "task": "question-answering", "model_class": "LayoutLMForQuestionAnswering", diff --git a/src/winml/modelkit/models/hf/layoutlm.py b/src/winml/modelkit/models/hf/layoutlm.py index 63c19e319..8085eb0ef 100644 --- a/src/winml/modelkit/models/hf/layoutlm.py +++ b/src/winml/modelkit/models/hf/layoutlm.py @@ -48,10 +48,18 @@ def generate( class LayoutLMQAIOConfig(LayoutLMOnnxConfig): # type: ignore[misc] # optimum base is untyped """LayoutLM question-answering OnnxConfig with bbox and safe token type IDs.""" + # sequence_length is bound to the model's max_position_embeddings so + # MaxLengthTextInputGenerator emits full-length text inputs instead of + # Optimum's default of 16 (allow_new=True permits adding this mapping). + # We deliberately do NOT map max_2d_position_embeddings here: Optimum's + # DummyBboxInputGenerator hardcodes its coordinate range (its + # normalized_config.max_2d_position_embeddings read is commented out + # upstream), so such a mapping is inert and never becomes a sequence + # length. bbox coordinate bounds for the shipped recipe come from the + # recipe's `value_range` instead. NORMALIZED_CONFIG_CLASS = NormalizedTextConfig.with_args( sequence_length="max_position_embeddings", allow_new=True, - MAX_2D_POSITION_EMBEDDINGS="max_2d_position_embeddings", ) DUMMY_INPUT_GENERATOR_CLASSES: tuple[type[Any], ...] = ( ZeroTokenTypeLayoutLMTextInputGenerator, diff --git a/src/winml/modelkit/onnx/io.py b/src/winml/modelkit/onnx/io.py index 547f1c7cc..d2ad85878 100644 --- a/src/winml/modelkit/onnx/io.py +++ b/src/winml/modelkit/onnx/io.py @@ -106,6 +106,12 @@ def to_tensor(self) -> Any: lo, hi = self.value_range if torch_dtype.is_floating_point: return torch.rand(concrete_shape, dtype=torch_dtype) * (hi - lo) + lo + # bbox uses the HF convention: a [..., 4] tensor of box corners + # (x0, y0, x1, y1). We key on the input name because "bbox" is the + # canonical HF/Optimum name for 2D box coordinates; a model using a + # different name (e.g. "bboxes") simply falls through to the generic + # randint path below. Reorder so x0<=x1 and y0<=y1 to keep each box + # well-formed for layout models. if self.name == "bbox" and len(concrete_shape) >= 1 and concrete_shape[-1] == 4: coords = torch.randint(int(lo), int(hi), concrete_shape, dtype=torch_dtype) x0 = torch.minimum(coords[..., 0], coords[..., 2]) From 6a0318e0e0c442706fdb15f7f4b59c7f8592a0fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Jul 2026 21:02:29 +0800 Subject: [PATCH 4/4] recipe(layoutlm): revert examples/recipes/README.md per review Revert all README changes for impira/layoutlm-document-qa (count/precision note/model row); README updates will be handled via the skill later. The recipe configs (cpu/cpu fp32 + fp16), layoutlm.py, and io.py changes are unchanged. Reviewer code-comment fixes (bbox assumption note in io.py; max_2d_position_embeddings removal + sequence_length comment in layoutlm.py) remain in place. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- examples/recipes/README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/recipes/README.md b/examples/recipes/README.md index de29ad872..1077e4f74 100644 --- a/examples/recipes/README.md +++ b/examples/recipes/README.md @@ -6,17 +6,15 @@ Curated recipe configuration samples for **portable, high-performance, and high- DML/GPU, MLAS/CPU, OpenVINO (CPU/GPU/NPU), QNN (GPU/NPU), VitisAI/NPU, NVIDIA TensorRT RTX/GPU -Each *(model, task)* includes one or more checked-in precision variants: +Each *(model, task)* includes: -- `fp32` or `fp16` -- optional `w8a8` -- optional `w8a16` quantized variants +- `fp16` +- `w8a8` +- `w8a16` quantized variants ## Models -Total: **76** indexed (model, task) tuples with built-in recipes. - -Precision note: `impira/layoutlm-document-qa` ships `cpu/cpu/question-answering_fp32_config.json` and `cpu/cpu/question-answering_fp16_config.json` (CPU float bucket, both `quant: null`; no CPU quantized variant). +Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. | Model | Task | |---|---| @@ -63,7 +61,6 @@ Precision note: `impira/layoutlm-document-qa` ships `cpu/cpu/question-answering_ | google-bert/bert-large-uncased-whole-word-masking-finetuned-squad | question-answering | | google/vit-base-patch16-224 | image-classification | | google/vit-base-patch16-224-in21k | image-feature-extraction | -| impira/layoutlm-document-qa | question-answering | | joeddav/xlm-roberta-large-xnli | zero-shot-classification | | laion/CLIP-ViT-B-32-laion2B-s34B-b79K | feature-extraction | | mattmdjaga/segformer_b2_clothes | image-segmentation |