Skip to main content
skill

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.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill ai-research/emerging-techniques-model-pruning
Open on GitHub

What 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-pruning

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill emerging-techniques-model-pruning -a claude-code

3Manually: put the files in place

~/.claude/skills/emerging-techniques-model-pruning/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/emerging-techniques-model-pruning/

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.

Similar skills

All skills for AI and ML →

From the same set495

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor