
Model Pruning
This gives you practical implementations of Wanda and SparseGPT for compressing LLMs without retraining. You get one-shot pruning that can hit 50% sparsity with under 1% accuracy loss, plus N:M structured patterns that actually map to NVIDIA's sparse tensor cores for real 2x speedups on A100s. The Wanda code is straightforward: multiply weight magnitudes by activation statistics, threshold, mask, done. What's useful here is seeing the tradeoff between unstructured pruning (better quality, no speedup) and semi-structured 2:4 patterns (hardware friendly, minimal accuracy hit). If you're deploying large models on constrained hardware or trying to cut serving costs, this walks through the techniques that actually work in production without the usual fine-tuning overhead.
- skills.sh installs
- 1K
- GitHub stars
- 14.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add orchestra-research/ai-research-skills --skill model-pruning --agent claude-codeInstalls into .claude/skills of the current project.
Files
Model Pruning: Compressing LLMs
When to Use This Skill
Use Model Pruning when you need to:
- Reduce model size by 40-60% with <1% accuracy loss
- Accelerate inference using hardware-friendly sparsity (2-4× speedup)
- Deploy on constrained hardware (mobile, edge devices)
- Compress without retraining using one-shot methods
- Enable efficient serving with reduced memory footprint
Key Techniques: Wanda (weights × activations), SparseGPT (second-order), structured pruning, N:M sparsity
Papers: Wanda ICLR 2024 (arXiv 2306.11695), SparseGPT (arXiv 2301.00774)
Installation
# Wanda implementation
git clone https://github.com/locuslab/wanda
cd wanda
pip install -r requirements.txt
# Optional: SparseGPT
git clone https://github.com/IST-DASLab/sparsegpt
cd sparsegpt
pip install -e .
# Dependencies
pip install torch transformers accelerate
Quick Start
Wanda Pruning (One-Shot, No Retraining)
Source: ICLR 2024 (arXiv 2306.11695)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
Sponsors
Details
- Repository
- github.com/orchestra-research/ai-research-skills
- Categories
- AI & Agent Building, Data Science & ML
- First seen
- Jun 3, 2026
More from orchestra-research/ai-research-skills
All 95- Sparse Autoencoder Training1K
- Implementing Llms Litgpt1K
- Llamaguard1K
- Miles Rl Training1K
- Torchforge Rl Training1K
- Nemo Guardrails1K
- Pinecone1K
- Nnsight Remote Interpretability1K
- Rwkv Architecture1K
- Skypilot Multi Cloud Orchestration1K
- Autogpt Agents1K
- Blip 2 Vision Language1K
- Constitutional Ai1K
- Langsmith Observability1K
- Nemo Evaluator Sdk1K
- Llava1K
- Phoenix Observability1K
- Lambda Labs Gpu Cloud1K
- Ml Training Recipes996
- Presenting Conference Talks993
- Systems Paper Writing990
- Experiment Tracking Swanlab961
- Fine Tuning Openvla Oft926
- Fine Tuning Serving Openpi925