recipe(wav2vec2-deepfake-audio): add CPU audio classification configs#1194
Draft
fuliucansheng wants to merge 1 commit into
Draft
Conversation
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 CPU recipe coverage for
Gustking/wav2vec2-large-xlsr-deepfake-audio-classification, a Wav2Vec2 audio classifier for real/fake speech detection. This is an L0 recipe-only contribution: currentmainalready resolves the model through Optimum's Wav2Vec2 audio-classification path, and this PR records verified CPU fp32/fp16 coverage with checked-in recipes.Model metadata
What the model does:
Gustking/wav2vec2-large-xlsr-deepfake-audio-classificationclassifies audio waveforms intorealandfakelabels. WinML exports it asaudio-classificationwithWav2Vec2ForSequenceClassification.Primary user stories:
Supported tasks:
audio-classificationModel architecture:
Source/confidence: pinned checkpoint config resolves
model_type: wav2vec2,architectures: [Wav2Vec2ForSequenceClassification], hidden size 1024, 24 layers, 16 attention heads, 2 labels, andWav2Vec2FeatureExtractor.Validation and support evidence
Baseline
Baseline was run from current
origin/mainatace130f20e36df44ebf7de6cf0356235c8ee79fdwithwinml, version 0.2.0.winml inspectAutoModelForAudioClassification, exporterWav2Vec2OnnxConfig, WinML classWinMLModelForGenericTask; inputinput_values [1,16000] float32; outputlogits.wav2vec2: vendor ONNX tasks includeaudio-classification; WinML adds no extra task override.Wav2Vec2ForSequenceClassificationwith 409 modules and 315.7M parameters; export tagged 1144/1144 nodes; final artifact emitted.winml eval --schema --task audio-classificationreports the task is not supported by the eval registry, so no task metric is available through the CLI today.Baseline
winml config -p fp32 --ep cpu --device cpuandwinml config -p fp16 --ep cpu --device cpuare the sources for the checked-in recipes.Goal
Effort: L0. Goal ceiling: L2. Outcome: L0 recipe-only.
Success means the checked-in CPU fp32/fp16 recipes build structurally valid ONNX artifacts, run
winml perfon CPU, and match the PyTorch reference numerically with the same waveform input. L3 is explicitly blocked by the missingaudio-classificationeval task.Outcome
Highest verified goal: L2 PASS on CPU for both fp32 and fp16. Coverage is full for the targeted EP set (
cpu/cpu/fp32,cpu/cpu/fp16); no accelerator tuples are claimed.Shipped recipes:
examples/recipes/Gustking_wav2vec2-large-xlsr-deepfake-audio-classification/cpu/cpu/audio-classification_fp32_config.jsonexamples/recipes/Gustking_wav2vec2-large-xlsr-deepfake-audio-classification/cpu/cpu/audio-classification_fp16_config.jsonMethodology friction observed: none. Model finding: large Wav2Vec2 sequence classifiers export cleanly through existing
audio-classification; task-metric eval remains CLI-blocked until WinML adds audio-classification evaluation support.Per-EP/device/precision results
input_values [1,16000] float32, outputlogits [1,2], 897 nodes, FLOAT initializers, and 1204.3 MB external data colocated withmodel.onnx.--precision fp16; fp16 stage complete in 13.1s; optimized model is loadable with 899 nodes, FLOAT16 initializers, and 602.2 MB external data.1.6391277313232422e-06.0.0008488893508911133.winml eval --schema --task audio-classificationreports unsupported task; supported task list does not includeaudio-classification.Delta
Both recipes are generated from current
winml configoutput with explicit CPU targeting. The fp32 recipe preservesquant: null; the fp16 recipe preserves the generated fp16 quantization block and model metadata. No source code or tests are changed, andexamples/recipes/README.mdis untouched.Reducibility: recipe-only is appropriate because auto-config already resolves task, loader, exporter, and WinML inference class correctly; this PR is a per-checkpoint verified CPU coverage declaration rather than a class-wide code fix.
Analyze summary
Static rule analysis completed with partial-success exit semantics: QNN/OpenVINO rows were complete, while VitisAI has no rule data and is all-unknown. This is compatibility analysis, not runtime execution.
Component-level summary
Div,Erf,Add,Mul; OpenVINO NPU fully supported; VitisAI: no rule data.Div,Erf,Add,Mul; OpenVINO NPU fully supported; VitisAI: no rule data.Op-level summary
Reproduce commands