PALS: Percentile-Aware Layerwise Sparsity for LLM Pruning
The paper proposes PALS, a one-shot pruning method that dynamically adjusts sparsity ratios across transformer layers based on activation magnitudes, achieving significant perplexity improvements over uniform pruning on LLaMA-2-7B while demonstrating that gradient-based allocation is ineffective for discrete weight removal.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a giant, incredibly smart library (a Large Language Model) with billions of books (parameters). To make this library fit into a small backpack so you can carry it around on your phone, you need to throw away half the books. This is called "pruning."
The problem is, not all books are equally important. Some are just filler, while others contain the most critical maps and keys to understanding the world.
The Old Way: The "One-Size-Fits-All" Approach
Previous methods (like Wanda and SparseGPT) were like a strict librarian who says: "We need to cut 50% of the books. So, we will throw away exactly half the books from every single shelf, no matter what."
The authors of this paper argue this is silly. Some shelves (layers) are packed with vital, unique information, while others are full of repetitive notes. If you cut 50% from the vital shelves, the library stops making sense. If you cut 50% from the repetitive shelves, nobody notices.
The New Way: PALS (The "Smart Librarian")
The authors propose a new method called PALS (Percentile-Aware Layerwise Sparsity). Instead of cutting the same amount from every shelf, PALS acts like a smart librarian who looks at the shelves first.
How it works:
- The "Outlier" Check: The librarian looks at the books on each shelf and asks, "Are there any books here that are wildly different or extremely loud?" In technical terms, they look for activation outliers—moments when a specific part of the model gets very "excited" or active.
- The Rule:
- If a shelf has these "loud" or "excited" moments, it means that shelf is doing critical work. Don't cut much here. Keep more books.
- If a shelf is quiet and uniform, it's probably doing repetitive work. Cut more here. Throw away more books.
- The Safety Net: To make sure they don't get too crazy, the librarian has a rule: "You can only change the cutting amount by a tiny bit (plus or minus 5%)." This prevents them from accidentally emptying a vital shelf or leaving a useless shelf completely full.
The Big Surprise: The "Gradient" Trap
Before settling on the "loudness" of the books, the researchers tried a different idea. They thought, "Maybe we should look at the gradients."
In the world of AI, "gradients" are like a map showing which way to tweak a book to make it slightly better. Usually, this is a very smart way to decide what to keep.
But here is the shocker: When they used gradients to decide what to cut, the library fell apart. The results were worse than if they had just thrown books away randomly.
Why? The authors guess that gradients are like a map for taking tiny, tiny steps. But pruning is like taking a giant, massive step (removing 50% of the books at once). A map that works for tiny steps doesn't tell you what happens when you remove half the terrain. It's like knowing which way a hill slopes doesn't tell you what happens if you bulldoze half the mountain.
The Results
- On older models (LLaMA-2): The "Smart Librarian" (PALS) did a fantastic job. The library became half the size but still understood language almost as well as the full version. It was much smarter than the "One-Size-Fits-All" method.
- On newer models (Mistral, LLaMA-3): The "Smart Librarian" didn't really help. The authors think this is because these newer models are so well-trained that every shelf is already equally important. There's no "redundant" shelf to cut more from, so the smart strategy can't find an advantage.
The Bottom Line
PALS is a simple, cheap trick to make AI models smaller without losing their smarts. It works by listening to which parts of the model are "shouting" (high activity) and protecting them, while trimming the quiet parts.
It also teaches us a valuable lesson: Just because a method (like gradients) works for small tweaks doesn't mean it works for big cuts. Sometimes, the simplest signal (looking at how active a part is right now) is better than the most complex math.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.