-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for ONNX subgraphs in Burn for conditional inference computation #724
Comments
Thanks for creating and open-sourcing Burn! I think there is a lot of demand for running Silero VAD inside Rust, there's several projects using Whisper that want to add a VAD. Looking forward to this feature! |
There is a new improved version of Silero VAD (v5) https://github.com/snakers4/silero-vad/blob/master/src/silero_vad/data/silero_vad.onnx - which might adjust priorities in terms of feature support - if the model architecture has changed in any meaningful way (I am yet to test burn & v5). |
Yeah, If still appears to be a blocker:
|
Description
Introduce the capability to support ONNX subgraphs within the Burn framework, particularly for handling conditional inference computations. This feature aims to enable Burn to fully support modern complex ONNX models that rely on subgraphs for conditional computations.
Motivation
Complete ONNX Compatibility: Many advanced models like Version 4 of the Silero VAD make use of subgraphs for various tasks. Lack of support for ONNX subgraphs would mean incomplete compatibility between Burn and ONNX.
Conditional Inference: Subgraphs are particularly useful for models that require conditional computation during inference, allowing for more dynamic and efficient operations.
Model Integrity and Flexibility: Providing support for ONNX subgraphs ensures that Burn can accommodate more complex model architectures without requiring modifications to the original ONNX model.
Elevate Burn's Capabilities: Incorporating subgraph support would make Burn a more versatile and robust framework, increasing its appeal to a broader audience.
Proposed Implementation Steps
Backend Steps
Subgraph Detection: Parse the ONNX file to identify and isolate subgraphs.
Subgraph-to-Module Conversion: Convert these subgraphs into Burn-compatible modules, maintaining their conditional inference capabilities.
Integration and Testing: Integrate the converted modules into Burn and conduct thorough tests to ensure they work as expected.
Code Changes
Some refactoring of the existing implementation will be required.
However, this feature should be achievable without major architectural changes.
Additional Features
Documentation: Offer detailed documentation and examples that show how to work with ONNX subgraphs within Burn.
Error Handling and Warnings: Implement robust error handling to notify users of any potential issues during the import and conversion process.
Logging: Provide logging mechanisms for debugging and monitoring the performance of subgraph handling.
The text was updated successfully, but these errors were encountered: