Summary:
The provided builder.py script in the microsoft/Phi-4-multimodal-instruct-onnx repository does not successfully convert the model to a WebGPU-compatible ONNX format.
Link to Script:
onnx/builder.py
Steps to Reproduce:
- Clone the microsoft/Phi-4-multimodal-instruct-onnx repo.
- Run builder.py as instructed to generate a WebGPU-compatible ONNX model.
- Observe failure or incomplete conversion.
Expected Behavior:
The script should produce a valid ONNX model optimized for WebGPU execution.
Actual Behavior:
- Conversion fails or produces a model incompatible with WebGPU runtimes.
Impact:
- Blocks deployment to WebGPU environments (e.g., browser-based inference).
- Limits accessibility for client-side multimodal applications.
Suggested Fix:
- Audit builder.py for missing export parameters or unsupported ops.
- Add WebGPU-specific optimization flags or post-processing steps.
- Include validation script to test WebGPU compatibility post-export.