HGRN-1.3B · SparseGPT 80% sparse · fine-tuned
The one-shot SparseGPT 80% checkpoint hgrn-1.3B-sparsegpt-80pct after mask-fixed fine-tuning. Gradients at pruned positions are zeroed, and pruned weights are re-zeroed after every step, so the model keeps about 80% sparsity. It is one of the post-pruning recovery baselines compared against CWS.
Training details
| Init | hgrn-1.3B-sparsegpt-80pct |
| Loss | cross-entropy on next-token labels |
| Data | C4, streaming |
| Steps / LR / batch | 20,000 / 2e-05 / 16 |
| Mask | fixed (pruned weights stay zero) |
Run settings are in finetune_meta.json.
Evaluation
| Metric | This model | Dense |
|---|---|---|
| WikiText-2 PPL ↓ | 1,066 | 11.8 |
| ARC-Easy (acc_norm) | 0.279 | 0.510 |
| ARC-Challenge (acc_norm) | 0.263 | 0.275 |
| HellaSwag (acc_norm) | 0.257 | 0.480 |
| PIQA (acc_norm) | 0.504 | 0.712 |
| WinoGrande (acc) | 0.480 | 0.528 |
| LAMBADA-OpenAI (acc) | 0.000 | 0.383 |
| Average (6 tasks) | 0.297 | 0.481 |
PPL uses non-overlapping 2048-token WikiText-2 windows (results/ppl_hgrn_80pct_recovery.json). Recovery lowers it from 6,956 (one-shot, same protocol) to 1,066, but task accuracy stays near chance. The training script logged a final PPL of 1,049.6 under its own evaluation setup. 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_sparsegpt_80pct_ft.json.
For comparison, CWS 80% reaches 1,086 after the same fine-tuning and 693 after the same distillation (see hgrn-1.3B-cws-80pct-ft-c4).
Method
SparseGPT (Frantar & Alistarh, 2023, arXiv:2301.00774) scores each weight by its OBS saliency W[i,j]² / [H⁻¹]_jj and applies column-ordered Optimal Brain Surgeon corrections to the remaining weights in blocks of 128 columns. Hessian H = (2/N) XᵀX from calibration activations, damping 0.01.
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-sparsegpt-80pct-ft"
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.
Related repositories
- Sparse-LLMs-on-Loihi: pruning scripts, baselines and raw results for this checkpoint.
- CWS: reference implementation of the CWS method these baselines are compared against.
- Weight-Sparsity-Using-Real-Loss and EHWS: follow-up work that optimises the real next-token loss instead of layer-wise reconstruction.