model-pruning

Prune large language models with Wanda or SparseGPT-style methods.

Updated May 4, 2026
One-click install
npx skills add https://github.com/Supporter09/Face_Anti_Spoofing_Biometric --skill model-pruning-supporter09
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-pruning
Source: https://github.com/Supporter09/Face_Anti_Spoofing_Biometric/tree/main/.claude/skills/model-pruning
Command: npx skills add https://github.com/Supporter09/Face_Anti_Spoofing_Biometric --skill model-pruning-supporter09

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you shrink large language models while preserving quality, making them cheaper to store, faster to serve, and more practical on constrained hardware.

Core Features & Use Cases

  • One-shot pruning: Apply Wanda or SparseGPT-style compression without retraining.
  • Hardware-friendly sparsity: Use structured and N:M patterns to target accelerator-friendly inference speedups.
  • Model evaluation: Compare pruned and original models to measure accuracy loss, memory savings, and deployment readiness.
  • Use Case: A team needs to deploy a chat model on limited GPU memory, so they prune it to 50% sparsity, validate the quality drop, and export the compressed checkpoint for serving.

Quick Start

Use the model-pruning skill to compress the selected language model with the recommended pruning method, validate the sparsity level, and save the pruned checkpoint for deployment.

Frequently Asked Questions about model-pruning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prune LLM weights for faster inference without retraining?

You can prune LLM weights without retraining by applying one-shot unstructured pruning methods like Wanda or SparseGPT. This approach uses activation-aware importance scoring to compress the model, reducing memory footprint and accelerating inference while preserving quality.

What's the best way to achieve hardware-friendly sparsity for LLM compression?

The best way to achieve hardware-friendly sparsity is using structured pruning and N:M sparsity patterns. These methods target accelerator-friendly inference speedups during LLM compression, ensuring the pruned model delivers actual hardware performance gains rather than just theoretical memory reductions.

How does Wanda compare to SparseGPT for one-shot model pruning?

Both Wanda and SparseGPT enable one-shot LLM pruning without retraining, using activation-aware importance scoring to determine which weights to remove. They differ in their specific scoring mechanisms and calibration approaches for measuring accuracy-speed tradeoffs during compression.

Can I evaluate accuracy loss after pruning a chat model to 50% sparsity?

Yes, you can evaluate accuracy loss by comparing the pruned and original models. The workflow validates the sparsity level, measures the quality drop, assesses memory savings, and determines deployment readiness before exporting the compressed checkpoint for serving.

What are the limitations of N:M sparsity for LLM deployment?

N:M sparsity requires compatible hardware accelerators to realize inference speedups; unsupported hardware yields no performance gain. Additionally, aggressive sparsity levels may degrade model accuracy, requiring careful evaluation of accuracy-speed tradeoffs during calibration and compression.

When do I need activation-aware importance scoring for model pruning?

Activation-aware importance scoring is needed when performing one-shot unstructured or structured pruning to identify which weights to safely remove. It ensures the LLM compression process preserves model quality by evaluating weight significance based on actual activation patterns.