Skip to content

How to save the pruned model? #2

@NamburiSrinath

Description

@NamburiSrinath

Hi @MrGGLS,

Thanks for opensourcing your codebase.

I am wondering how I can save the pruned model checkpoint so I can load it in a different codebase. I am looking for something like the below image so it can be easily used by from_pretrained() of the other codebase.

Image

The ppls/xxxx.json has the list of modules that can be deleted I presume. So following that, is it possible to provide a script in the repo where one can load this json and actual model, remove the respective blocks and save the final model.

Follow-up question: As it's structured pruning, I believe the memory footprint and runtime should be better compared to base model. Let me know if my understanding is right?

Looking forward

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions