HGRN-1.3B · CWS 80% sparse · iterative prune + distill
HGRN-1.3B pruned to 80% gradually: 30% → 50% → 65% → 80%. Each stage re-prunes the surviving weights with block CWS on the current, already-adapted weights, then runs mask-fixed distillation against the frozen dense model before the next stage. The mask can adapt to the weights, unlike pruning once from the dense model (scripts/iterative_prune_distill.py).
Training details
| Start | ikimyaii/hgrn-1.3B-dense-baseline |
| Pruning | block CWS (B = 128) at each stage |
| Distillation | dense teacher, 0.1 × CE + 0.9 × KL × T², T = 2.0, C4 streaming, LR 2e-5 |
| Schedule | 20k + 20k + 20k + 50k steps |
| Final sparsity | 79.69% |
Evaluation
| Stage | Target | Achieved | PPL after prune | PPL after distill | Distill steps |
|---|---|---|---|---|---|
| 1 | 30.00% | 29.69% | 14.9 | 15.1 | 20,000 |
| 2 | 50.00% | 50.00% | 19.5 | 18.9 | 20,000 |
| 3 | 65.00% | 64.84% | 37.1 | 34.1 | 20,000 |
| 4 | 80.00% | 79.69% | 672.2 | 258.3 | 50,000 |
Stage PPLs are from iterative_log.json (training script's own evaluation).
| Metric | This model | Dense |
|---|---|---|
| WikiText-2 PPL ↓ | 250 | 11.8 |
| ARC-Easy (acc_norm) | 0.285 | 0.510 |
| ARC-Challenge (acc_norm) | 0.253 | 0.275 |
| HellaSwag (acc_norm) | 0.261 | 0.480 |
| PIQA (acc_norm) | 0.521 | 0.712 |
| WinoGrande (acc) | 0.510 | 0.528 |
| Average (5 tasks) | 0.366 | 0.501 |
PPL uses 2048-token WikiText-2 windows (Sparse-LLMs-on-Loihi README, CWS ablation table). Zero-shot tasks use lm-evaluation-harness. ARC-e, ARC-c, HellaSwag and PIQA report acc_norm; WinoGrande and LAMBADA report acc. The dense baseline is ikimyaii/hgrn-1.3B-dense-baseline, a copy of fla-hub/hgrn-1.3B-100B. Raw results: results/benchmark_hgrn_iterative_80pct.json.
PPL 250 is the lowest of any uniform-sparsity 80% HGRN model in the project. One-shot CWS followed by distillation reaches 647–693, and LoRA recovery 604–737. Only non-uniform layer-wise sparsity + distillation is lower (218). Task accuracy is still near chance.
About CWS
CWS (Correlation-aware Weight Sparsity) is a post-training, one-shot pruning method that extends SparseGPT's Optimal Brain Surgeon (OBS) weight correction with a full-Hessian selection criterion.
Per-weight saliency scores (magnitude, Wanda, RIA, SparseGPT's diagonal score)
look at each weight in isolation. They miss cancellation groups: correlated
input channels whose opposite-sign weights partly cancel in the layer output,
so removing them together costs less than their individual scores predict.
For each output row, CWS greedily picks the weight with the smallest marginal
cost δ(j | S) = r_j² / d_j, where r_j and d_j come from the evolving
inverse-Hessian factor (one rank-1 Schur-complement downdate per pick). It then
applies exact OBS corrections to the surviving weights. With H = (2/N) XᵀX,
the first pick is exactly SparseGPT's choice; later picks account for the
cross-weight interactions that a diagonal score ignores.
Two selection scopes appear in this collection:
-
Block CWS (default): greedy selection is confined to 128-column blocks, and corrections are applied block by block. This is stable on wide layers.
-
Global CWS (ablation): the whole row is one block (block size → ∞). It captures cross-block cancellation, but it is more prone to numerical drift on large layers.
-
Method and reference implementation: CWS
-
Experiments, baselines and raw results for these checkpoints: Sparse-LLMs-on-Loihi
-
Follow-up work that swaps CWS's layer-wise reconstruction objective for the real next-token loss: Weight-Sparsity-Using-Real-Loss
Usage
The model uses the HGRN architecture from flash-linear-attention (FLA).
pip install flash-linear-attention transformers torch
import torch
import fla # registers HGRN with transformers
from fla.models.hgrn import HGRNConfig, HGRNForCausalLM
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
AutoConfig.register("hgrn", HGRNConfig, exist_ok=True)
AutoModelForCausalLM.register(HGRNConfig, HGRNForCausalLM, exist_ok=True)
model_id = "ikimyaii/hgrn-1.3B-80pct-iterative"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16).cuda()
# Pruned weights are stored as explicit zeros in a dense tensor.
lin = model.model.layers[0].mlp.down_proj
print(f"sparsity: {(lin.weight == 0).float().mean():.3f}")
The checkpoint is stored densely, with zeros in the pruned positions, so it runs as-is on GPUs and CPUs. Speedups require a sparse kernel or hardware that skips zero weights. On Intel Loihi and other event-driven neuromorphic hardware, a zero weight generates no synaptic event, so the sparsity directly reduces active computation.
Limitations
- These are research checkpoints for studying pruning. They are not instruction-tuned or safety-tuned, and they inherit the base model's biases.
- Weights are stored densely, with zeros at the pruned positions. Sparsity alone gives no speedup without a sparse kernel or event-driven hardware.
- At 70–80% sparsity this model does not produce usable text. Zero-shot accuracy is near chance.
Citation
The CWS paper is under anonymous review; please cite the code repository for now.
@misc{cws2026,
title = {Semi-Structured Correlation-aware Weight Sparsity (CWS) for Efficient LLM Inference},
year = {2026},
note = {Under review. Code: https://github.com/KimiaGholami/CWS}
}
@inproceedings{frantar2023sparsegpt,
title = {SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot},
author = {Frantar, Elias and Alistarh, Dan},
booktitle = {International Conference on Machine Learning},
year = {2023}
}