Skip to content

Conversation

@asmigosw
Copy link
Contributor

Deleting the model after export is complete and storing only necessary params required either at compile or generation.

# self.state_dict = self.model.state_dict()

# Loading model if weights are in meta state from state_dict
if any(name for name, param in self.model.named_parameters() if param.is_meta):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we do this check without the for loop, this will loop over all the model params, we can check only one right?
or add a attribute to a model. and check based on that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a variable and added an or condition in the latest code

Copy link
Contributor

@ochougul ochougul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me as first PR.
The re-loading part needs to be figured out, are you planning to do this in next PR?

Please clean the code, we are good to go.

@quic-rishinr quic-rishinr marked this pull request as ready for review August 18, 2025 10:35
Copy link
Contributor

@quic-hemagnih quic-hemagnih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, please run the CI. We can merge this now.

@quic-rishinr quic-rishinr requested a review from ochougul August 19, 2025 05:38
asmigosw and others added 5 commits August 19, 2025 09:03
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
… better to clean the model before applying onnx transform and code clean up

Signed-off-by: Rishin Raj <rishinr@qti.qualcomm.com>
Signed-off-by: Rishin Raj <rishinr@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Copy link
Contributor

@quic-hemagnih quic-hemagnih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@quic-hemagnih quic-hemagnih merged commit f214e43 into quic:main Aug 22, 2025
4 checks passed
ochougul pushed a commit that referenced this pull request Nov 3, 2025
Deleting the model after export is complete and storing only necessary
params required either at compile or generation.

---------

Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Rishin Raj <rishinr@qti.qualcomm.com>
Co-authored-by: Rishin Raj <rishinr@qti.qualcomm.com>
Signed-off-by: Onkar Chougule <ochougul@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants