emerging-techniques-model-pruning — Claude Code skill: what it does
This skill walks through pruning language-model weights with Wanda, SparseGPT, and other methods. Use it to explore model compression without retraining.
npx claude-code-templates@latest --skill ai-research/emerging-techniques-model-pruningWhat emerging-techniques-model-pruning does
The skill covers weight pruning, from magnitude-based removal to Wanda, which uses activation statistics, and SparseGPT, which uses second-order information. It also includes structured pruning and N:M patterns that retain a set number of weights within each group.
Code examples show how to gather activation data, apply pruning masks, and save a model. The examples name torch and transformers as dependencies, and use calibration data with Wanda and SparseGPT. There is a practical trade-off: unstructured sparsity does not provide hardware speedups, while regular N:M patterns are intended for accelerator support.
What it helps with
- compress language-model weights without retraining
- rank weights using activation data
- apply an N:M pattern to model layers
- save a pruned model
Example prompts for the agent
- Show me how to prune this language model with Wanda and save the result.
- Compare magnitude pruning with SparseGPT for my model.
- Add an N:M structured-pruning example to this code.
How to install emerging-techniques-model-pruning
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/emerging-techniques-model-pruning2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill emerging-techniques-model-pruning -a claude-code3Manually: put the files in place
~/.claude/skills/emerging-techniques-model-pruning/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/emerging-techniques-model-pruning/
Manually: put the files in place
.agents/skills/emerging-techniques-model-pruning/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/emerging-techniques-model-pruning/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates emerging-techniques-model-pruning2Manually: put the files in place
.github/skills/emerging-techniques-model-pruning/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/emerging-techniques-model-pruningManually: put the files in place
.devin/skills/emerging-techniques-model-pruning/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about emerging-techniques-model-pruning
How do I install emerging-techniques-model-pruning in Claude Code?
Run npx claude-code-templates@latest --skill ai-research/emerging-techniques-model-pruning. Alternatively, add it with npx skills add davila7/claude-code-templates --skill emerging-techniques-model-pruning -a claude-code.
What does emerging-techniques-model-pruning do?
It explains ways to prune language-model weights, including Wanda, SparseGPT, and N:M patterns. The examples cover calibration, mask application, and saving the resulting model.
Which dependencies do the examples use?
The examples use torch and transformers. Wanda and SparseGPT also use calibration data.