인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
생산성 및 협업 · SKILL.md

structured_sparsity_patterns

structured_sparsity_patterns

Build deterministic N:M semi-structured pruning masks from Wanda or other importance scores.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

name: structured_sparsity_patterns description: Build deterministic N:M semi-structured pruning masks from Wanda or other importance scores.

Structured Sparsity Patterns

Use this skill when a Wanda recovery or implementation needs 2:4, 4:8, or other N:M pruning masks. It operates on score matrices after activation-aware scoring has already been computed.

Inputs

  • Score matrix shaped outputs by inputs.
  • prune_n: number of entries to prune in each group.
  • prune_m: group width along the input-channel dimension.

Outputs

  • Boolean mask with exactly prune_n true values per complete group in each row.
  • Metadata describing complete groups, ignored tail width, and achieved sparsity.

Workflow

  1. Validate 0 < prune_n <= prune_m.
  2. Split each row into consecutive groups of width prune_m.
  3. In each complete group, mark the prune_n lowest scores for pruning with deterministic tie-breaking by column index.
  4. Leave incomplete tail groups unpruned unless the caller pads them explicitly.

Validation

Tests assert exact group counts and unpruned tail behavior.

Limitations

The skill only creates masks. Applying them and checking model quality belongs to an evaluation skill.

저장한 Skills