Mamba-370M, 50% semi-structured sparsity: SparseGPT + per-row constraint (our variant)

state-spaces/mamba-370m-hf, pruned one-shot (no retraining) to 50% sparsity with SparseGPT with our per-row constraint. This is NOT the published SparseGPT method: it is the official fasterprune with one change to the mask, so that inside each 128-column block every row prunes the same number of its lowest w^2 / [H^-1]_jj^2 entries (SparseGPT's own N:M rule with M = the block). Every row ends up with the same number of nonzeros, the same constraint as EHWS. This is a baseline for the EHWS models in this account. Every linear layer inside the blocks (in_proj, x_proj, out_proj) is pruned; dt_proj is kept dense (about 2% of each block's linear weights), as are conv1d, A_log and D. Embeddings and lm_head stay dense.

Load it with AutoModelForCausalLM.from_pretrained(...) (plain transformers).

Method

  • Calibration: the official loader, 128 C4 sequences of 2,048 tokens, seed 0.
  • Blocks are pruned in order; each block is calibrated on the outputs of the already-pruned blocks before it, as in the official drivers. The layer walk is new code (the official drivers only know OPT / LLaMA); the pruning math is the official code.
  • Weights pruned in bfloat16. Pruning took 3.0 minutes on one A100 40GB.

Results

Perplexity uses ELSA's evaluation protocol (its WikiText-2 / C4 test sets and formula), in bf16 because Mamba overflows in fp16.

WikiText-2 C4
This model 19.87 24.59

Zero-shot accuracy (lm-evaluation-harness):

Task This model
arc_challenge 0.2201
arc_easy 0.5055
boolq 0.6211
hellaswag 0.3384
openbookqa 0.1800
rte 0.5271
winogrande 0.5367
average 0.4184

Sparsity of the pruned layers, measured on these weights: 0.4901. Every row of every pruned layer keeps the same number of weights; a handful of kept weights happen to be exactly zero, so measured nonzero counts differ by at most a few per row (densest row / mean row: worst layer 1.00024x).

Downloads last month
25
Safetensors
Model size
0.4B params
Tensor type
F32
ยท
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for ikimyaii/Mamba-370M-semi-structured-SparseGPT-50pct

Finetuned
(28)
this model