Add audio-classification fp16 recipe for audeering/wav2vec2-large-robust-24-ft-age-gender#1094
Open
ssss141414 wants to merge 3 commits into
Open
Add audio-classification fp16 recipe for audeering/wav2vec2-large-robust-24-ft-age-gender#1094ssss141414 wants to merge 3 commits into
ssss141414 wants to merge 3 commits into
Conversation
…ust-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.
…or all-10-bucket README)
Contributor
|
if without config, could perf run it directly? |
Contributor
Author
As PR's description, it will failed on build stage without config. And the following command will not be run (perf/ eval)... |
Contributor
same as another pr |
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.
Add audio-classification fp16 recipe:
audeering/wav2vec2-large-robust-24-ft-age-gender1. Model & task
audeering/wav2vec2-large-robust-24-ft-age-gender@ audio-classification, fp16.2. What this PR adds
examples/recipes/audeering_wav2vec2-large-robust-24-ft-age-gender/audio-classification_fp16_config.json(new recipe)examples/recipes/README.md(index row + total bump)Recipe-only. No source code changed (Effort-L0★).
3. Why it's needed (the engineering delta)
This is a custom
trust_remote_codemodel —config.jsonarchitectures=["Model"](anAgeGenderModel: a wav2vec2 backbone with age-regression + gender-classification heads), not a standardWav2Vec2ForSequenceClassification.Because of the custom head,
winml buildauto-config mis-resolves the task totext-classification, and the build fails:This recipe pins
task=audio-classification(generated viawinml config -t audio-classification --trust-remote-code), which makes the model build.winml buildhas no--taskflag, so a checked-in recipe is the only way to override the mis-resolved task.4. Real-engineering gate (
_meta-038)winml config -t audio-classificationautoconf): IDENTICAL.text-classification).Passing Gate-2-fails-without-recipe ⇒ genuine delta, not catalog padding.
5. Build validation (CPU)
fp16 artifact confirmed genuinely fp16: 428 FLOAT16 initializers, 0 FLOAT32.
6. Structural (L0)
IR 8, opset 17. IN
input_values [1,16000]float32 (1 s @ 16 kHz, value_range [-1,1]). OUTlogits [1,3]float32.7. Perf (L1, CPU / CPUExecutionProvider)
mean 133.95 ms, P50 132.06 ms, P90 140.35 ms, throughput 7.47 samples/sec (20 iters). Model-load +1227 MB RAM, inference +43.7 MB.
8. Scope / honest limits
AgeGenderModel.forwardreturns an age+gender tuple, not a singlelogitstensor; the exported audio-classification head is a 3-logit output. A parity harness would need a custom adapter — deferred.9. Note on the exported head
The exported graph produces
logits[1,3], i.e. the winml audio-classification export path, not the model's native {age scalar, gender 2-way} multi-head. Downstream consumers should expect a 3-logit classification output.10. Requirements
--trust-remote-codeis required at both config and build time (custom modeling code).11. Testing done
Two builds (fp32 + fp16, both exit 0), fp16 initializer dtype audit,
winml perfon CPU. Reproducible from the checked-in recipe viawinml build -c <recipe> -m audeering/wav2vec2-large-robust-24-ft-age-gender --trust-remote-code.12. Follow-ups (out of scope here)
winml buildhas no--task; the only task override is a pre-generated recipe.