Skip to content

builder.py Fails to Convert Phi-4-multimodal-instruct to ONNX WebGPU Model #1820

@adolfdaniel

Description

@adolfdaniel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions