From d78be8a886580483491254309642a707dc66e520 Mon Sep 17 00:00:00 2001 From: Shiyi Zheng Date: Sun, 12 Jul 2026 16:57:17 +0800 Subject: [PATCH 1/3] Add audio-classification fp16 recipe for audeering/wav2vec2-large-robust-24-ft-age-gender Custom trust_remote_code model (AgeGenderModel: wav2vec2 backbone + age/gender heads). Stock 'winml build' auto-config mis-resolves the task to text-classification, which the ONNX backend rejects for wav2vec2. This recipe forces task=audio-classification (via 'winml config -t'), making the model buildable. Validated on CPU: fp32 + fp16 builds succeed (fp16 artifact = 428 FLOAT16 inits / 0 FLOAT32), L1 perf P50 132ms. --- examples/recipes/README.md | 3 +- .../audio-classification_fp16_config.json | 60 +++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/audio-classification_fp16_config.json diff --git a/examples/recipes/README.md b/examples/recipes/README.md index 1077e4f74..7fe3e8505 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 | |---|---| @@ -37,6 +37,7 @@ Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) bu | StanfordAIMI/dinov2-base-xray-224 | image-feature-extraction | | ahotrod/electra_large_discriminator_squad2_512 | question-answering | | apple/mobilevit-small | image-classification | +| audeering/wav2vec2-large-robust-24-ft-age-gender | audio-classification | | cardiffnlp/twitter-roberta-base-sentiment-latest | text-classification | | dbmdz/bert-large-cased-finetuned-conll03-english | token-classification | | deepset/bert-large-uncased-whole-word-masking-squad2 | question-answering | diff --git a/examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/audio-classification_fp16_config.json b/examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/audio-classification_fp16_config.json new file mode 100644 index 000000000..400828c51 --- /dev/null +++ b/examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/audio-classification_fp16_config.json @@ -0,0 +1,60 @@ +{ + "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_values", + "dtype": "float32", + "shape": [ + 1, + 16000 + ], + "value_range": [ + -1, + 1 + ] + } + ], + "output_tensors": [ + { + "name": "logits" + } + ] + }, + "optim": {}, + "quant": { + "mode": "fp16", + "samples": 10, + "calibration_method": "minmax", + "weight_type": "uint8", + "activation_type": "uint8", + "per_channel": false, + "symmetric": false, + "weight_symmetric": null, + "activation_symmetric": null, + "save_calibration": false, + "distribution": "uniform", + "seed": null, + "calibration_load_path": null, + "calibration_save_path": null, + "op_types_to_quantize": null, + "nodes_to_exclude": null, + "fp16_keep_io_types": true, + "fp16_op_block_list": null + }, + "compile": null, + "loader": { + "task": "audio-classification", + "model_class": "AutoModelForAudioClassification", + "model_type": "wav2vec2", + "trust_remote_code": true + } +} From c90b86e7cc672402d83448e51885e2e893a9c877 Mon Sep 17 00:00:00 2001 From: Shiyi Zheng Date: Mon, 13 Jul 2026 13:47:13 +0800 Subject: [PATCH 2/3] recipe(wav2vec2-age-gender): nest under cpu/cpu/ per tested-EP layout (_meta-058) --- .../{ => cpu/cpu}/audio-classification_fp16_config.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/{ => cpu/cpu}/audio-classification_fp16_config.json (100%) diff --git a/examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/audio-classification_fp16_config.json b/examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/cpu/cpu/audio-classification_fp16_config.json similarity index 100% rename from examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/audio-classification_fp16_config.json rename to examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/cpu/cpu/audio-classification_fp16_config.json From b2e88b86f143c15e17544d32187565636ea6dc88 Mon Sep 17 00:00:00 2001 From: Shiyi Zheng Date: Mon, 13 Jul 2026 20:12:47 +0800 Subject: [PATCH 3/3] recipe: drop README index-row change (recipe-only PR; not certified for all-10-bucket README) --- examples/recipes/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/recipes/README.md b/examples/recipes/README.md index 7fe3e8505..1077e4f74 100644 --- a/examples/recipes/README.md +++ b/examples/recipes/README.md @@ -14,7 +14,7 @@ Each *(model, task)* includes: ## Models -Total: **76** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. +Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. | Model | Task | |---|---| @@ -37,7 +37,6 @@ Total: **76** (model, task) tuples that pass fp16 eval on all 10 (EP, device) bu | StanfordAIMI/dinov2-base-xray-224 | image-feature-extraction | | ahotrod/electra_large_discriminator_squad2_512 | question-answering | | apple/mobilevit-small | image-classification | -| audeering/wav2vec2-large-robust-24-ft-age-gender | audio-classification | | cardiffnlp/twitter-roberta-base-sentiment-latest | text-classification | | dbmdz/bert-large-cased-finetuned-conll03-english | token-classification | | deepset/bert-large-uncased-whole-word-masking-squad2 | question-answering |