princeton-nlp / LLM-Shearing

[ICLR 2024] Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruning
https://arxiv.org/abs/2310.06694
MIT License
533 stars 39 forks source link

model.prune_params() NotImplementedError: Could not run 'aten::nonzero' #43

Open YanxiZSQ opened 8 months ago

YanxiZSQ commented 8 months ago

I used post_pruning_processing.py to process the trained model. When executing model.prune_params(), an error occurred. The error is as follows: image

xiamengzhou commented 8 months ago

Hi! Could you provide the full error, e.g., which line of the code triggered this error?

YanxiZSQ commented 7 months ago

image

YanxiZSQ commented 7 months ago

I run the code: python3 -m llmshearing.utils.post_pruning_processing prune_and_save_model model_file