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!
conda env create igpruning python=3.10
git clone https://github.com/ictnlp/IG-Pruning.git
cd IG-Pruning
pip install -r requirements.txtA 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.shA 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.shTo evaluate the performace, we use lm-evaluation-harness.
bash scripts/main_result/eval_mask.shThis project is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
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 [email protected].