IG-Pruning: Input-Guided Block Pruning for Large Language Models
November 9, 2025 · View on GitHub
Source code for paper "IG-Pruning: Input-Guided Block Pruning for Large Language Models".
If you find this project useful, feel free to ⭐️ it and give it a citation!
Quick Start
conda env create igpruning python=3.10
git clone https://github.com/ictnlp/IG-Pruning.git
cd IG-Pruning
pip install -r requirements.txt
Mask Candidate Discovery
A semantic clustering-based mask discovery stage that identifies diverse, high-quality mask candidates while capturing global information through rapidly converging trainable masks.
bash scripts/main_result/sample_cluster.sh
Dynamic Routing at Inference
A lightweight inference-time routing mechanism that requires no additional training of the base model parameters, enabling efficient dynamic adaptation to varying inputs.
bash scripts/main_result/sample_cluster.sh
Evaluation
To evaluate the performace, we use lm-evaluation-harness.
bash scripts/main_result/eval_mask.sh
Licence
This project is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
Citation
If this repository is useful for you, please cite as:
@article{qiao2025ig,
title={IG-Pruning: Input-Guided Block Pruning for Large Language Models},
author={Qiao, Kangyu and Zhang, Shaolei and Feng, Yang},
journal={arXiv preprint arXiv:2511.02213},
year={2025}
}
If you have any questions, feel free to contact qiaokangyu24s@ict.ac.cn.