-
Notifications
You must be signed in to change notification settings - Fork 353
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
Pytorch config extraction #1323
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1323 +/- ##
==========================================
+ Coverage 84.41% 84.49% +0.08%
==========================================
Files 549 571 +22
Lines 61952 63818 +1866
==========================================
+ Hits 52295 53923 +1628
- Misses 9657 9895 +238 ☔ View full report in Codecov by Sentry. |
Floating number bug has been fixed by Candle team: huggingface/candle#1729 We can come back and fix the test after the fix is released. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just a minor comment.
This PR enhances PyTorch module to allow to extract model configuration. For example, Whisper model contains its model configuration as part of
.pt
file. Instead of using python, one can use the deserializer in burn-import to populate a struct with extracted values.BTW, this is a common pattern in other exported files. For example, Safetensors and gguf file formats contain metadata (information about the model) that is critical in reconstructing a model.
This is how it would look with Burn:
Pull Request Template
Checklist
run-checks all
script has been executed.Changes
Enhanced pytorch module to support for config extraction.
Testing