pytorch / pytorch/tutorials

💡 [REQUEST] - <title>Pruning tutorial: clarify how to achieve comparable performance to non-pruned?

Open
#3,308 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9.3k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
4

Description

🚀 Describe the improvement or the new tutorial

In the pruning tutorial https://pytorch.org/tutorials/intermediate/pruning_tutorial.html,
the method of pruning that is implemented appears to be completely random. "In this example, we will prune at random 30% of the connections..."

But isn't the goal of pruning produce a smaller network with nearly the same capabilities as the original?
I don't see anything in the tutorial about checking the performance of the new network, or how to intelligently prune the network in order to achieve the goal of pruning. The tutorial takes a randomly-initialized network, randomly prunes it, and then...

...it just suddenly ends...?

Is the idea that we're supposed to just keep iteratively trying random pruning until something finally works ok? That sounds unbearably undirected and inefficient. Did I miss something crucial while reading the tutorial?

Requesting: Clarification on how to achieve the "goal" of pruning: intelligently pruning the network to achieve comparable capabilities.
Just telling me I can define my own pruning function isn't enough, because...it's a tutorial, I don't know what such a function should entail.

Existing tutorials on this topic

https://pytorch.org/tutorials/intermediate/pruning_tutorial.html

Additional context

"In this example, we will prune at random 30% of the connections "

Why/how will that help achieve the goal of pruning? Won't it just randomly turn off parts of the network with no regard to its effect on performance? (This application seems more like Dropout than actual pruning.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the pruning tutorial at https://pytorch.org/tutorials/intermediate/pruning_tutorial.html, especially the section that randomly prunes 30% of connections. Compare the tutorial's current stopping point with the request for performance checks and guidance on intelligent pruning. Done means the tutorial clearly explains how pruning relates to comparable model capability and what readers should evaluate or do next.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.