# emerging-techniques-model-pruning

This skill walks through pruning language-model weights with Wanda, SparseGPT, and other methods. Use it to explore model compression without retraining.

- skill · `type=skill` · Claude Code · 67 installs
- Author: Orchestra Research
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/emerging-techniques-model-pruning
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/emerging-techniques-model-pruning

## What it 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.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill ai-research/emerging-techniques-model-pruning
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill emerging-techniques-model-pruning -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/emerging-techniques-model-pruning/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/emerging-techniques-model-pruning/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/emerging-techniques-model-pruning/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/emerging-techniques-model-pruning/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates emerging-techniques-model-pruning
```

2. **Manually: put the files in place**
- File: `.github/skills/emerging-techniques-model-pruning/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/emerging-techniques-model-pruning
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/emerging-techniques-model-pruning/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/emerging-techniques-model-pruning

## When to use it
- 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
- 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.

## Similar
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [writing-for-agents](https://affpapa.org/en/nevibecode/skills/writing-for-agents.md) — skill · 466719 installs
- [media-use](https://affpapa.org/en/nevibecode/skills/media-use.md) — skill · 1100000 installs
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [subagent-driven-development](https://affpapa.org/en/nevibecode/skills/subagent-driven-development.md) — skill · 237746 installs
- [orchestration](https://affpapa.org/en/nevibecode/skills/orchestration.md) — skill · 350300 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 495 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
