HectorHHZ/Sparse_Matrix_Tuning

Github repo for ICLR-2025 paper, Fine-tuning Large Language Models with Sparse Matrices

Python

26

26 commits

updated Feb 2, 2026

See the code

README

SMT: Fine-Tuning Large Language Models with Sparse Matrices

The implementation of SMT: Fine-Tuning Large Language Models with Sparse Matrices. This paper introduce a method for selecting sparse sub-matrices that aims to minimize the performance gap between PEFT vs. full fine-tuning (FT) while also reducing both fine-tuning computational costs and memory costs. We explored both gradient-based and activation-based parameter selection methods to identify the most significant sub-matrices for downstream tasks, updating only these blocks during fine-tuning. In our experiments, we demonstrated that SMT consistently surpasses other PEFT baselines (e.g., LoRA and DoRA) in fine-tuning popular large language models such as LLaMA across a broad spectrum of tasks, while reducing the GPU memory footprint by 67% compared to FT.

We implemented SMT in two frameworks: DeepSpeed and Hugging Face Trainer/PEFT. Instructions for setting up the environment, training, and evaluation can be found in the subfolders.

Latest News 🔥🔥

Latest Results on DeepSeek-R1-Distill Model

Obsrervation 1: Deepseek-R1-Distill-LLaMA8B model underperforms the base LLaMA-3-8B model on Commonsense Reasoning dataset without reasoning trace.

DeepSeek-R1-Distill-LLaMA8BBoolQPIQASIQAHellaSwagWinoGrandeARC-eARC-cOBQAAVG
base53.950.037.423.425.330.628.023.434.0
SMT(0.86%)70.666.477.862.484.660.953.272.668.6
Full FT.71.066.276.562.285.461.852.872.668.6
LLaMA3-8B ModelBoolQPIQASIQAHellaSwagWinoGrandeARC-eARC-cOBQAAVG
SMT(0.71%)75.788.481.496.288.292.783.288.686.8

Observation 2: Deepseek-R1-Distill-LLaMA8B model largely outperforms the base LLaMA-3-8B model on Math Reasoning dataset with reasoning trace.

DeepSeek-R1-DistillLLaMA8B ModelGSM8kSingleEqSVAMPMultiArithAddSubAQuAAVG
SMT(0.71%)60.892.570.695.387.331.273.0
LLaMA3-8B ModelGSM8kSingleEqSVAMPMultiArithAddSubAQuAAVG
SMT(0.71%)42.888.560.493.985.825.266.1

Datasets

For Commonsense Reasoning downstream evaluation datasets, we use the processed dataset splits provided by the LLM-Adapters repository: https://github.com/AGI-Edgerunners/LLM-Adapters/tree/main/dataset. We follow the same dataset organization and evaluation settings as described in the LLM-Adapters paper.

Citation

If you find this repository or our paper useful in your research, please consider citing:

@inproceedings{he2025smt,
  title={SMT: Fine-Tuning Large Language Models with Sparse Matrices},
  author={He, Haoze and Li, Juncheng B and Jiang, Xuan and Miller, Heather},
  booktitle={The Thirteenth International Conference on Learning Representations}
}

HectorHHZ/Sparse_Matrix_Tuning

Github repo for ICLR-2025 paper, Fine-tuning Large Language Models with Sparse Matrices

Python

26

26 commits

updated Feb 2, 2026

See the code

README

SMT: Fine-Tuning Large Language Models with Sparse Matrices

The implementation of SMT: Fine-Tuning Large Language Models with Sparse Matrices. This paper introduce a method for selecting sparse sub-matrices that aims to minimize the performance gap between PEFT vs. full fine-tuning (FT) while also reducing both fine-tuning computational costs and memory costs. We explored both gradient-based and activation-based parameter selection methods to identify the most significant sub-matrices for downstream tasks, updating only these blocks during fine-tuning. In our experiments, we demonstrated that SMT consistently surpasses other PEFT baselines (e.g., LoRA and DoRA) in fine-tuning popular large language models such as LLaMA across a broad spectrum of tasks, while reducing the GPU memory footprint by 67% compared to FT.

We implemented SMT in two frameworks: DeepSpeed and Hugging Face Trainer/PEFT. Instructions for setting up the environment, training, and evaluation can be found in the subfolders.

Latest News 🔥🔥

Latest Results on DeepSeek-R1-Distill Model

Obsrervation 1: Deepseek-R1-Distill-LLaMA8B model underperforms the base LLaMA-3-8B model on Commonsense Reasoning dataset without reasoning trace.

DeepSeek-R1-Distill-LLaMA8BBoolQPIQASIQAHellaSwagWinoGrandeARC-eARC-cOBQAAVG
base53.950.037.423.425.330.628.023.434.0
SMT(0.86%)70.666.477.862.484.660.953.272.668.6
Full FT.71.066.276.562.285.461.852.872.668.6
LLaMA3-8B ModelBoolQPIQASIQAHellaSwagWinoGrandeARC-eARC-cOBQAAVG
SMT(0.71%)75.788.481.496.288.292.783.288.686.8

Observation 2: Deepseek-R1-Distill-LLaMA8B model largely outperforms the base LLaMA-3-8B model on Math Reasoning dataset with reasoning trace.

DeepSeek-R1-DistillLLaMA8B ModelGSM8kSingleEqSVAMPMultiArithAddSubAQuAAVG
SMT(0.71%)60.892.570.695.387.331.273.0
LLaMA3-8B ModelGSM8kSingleEqSVAMPMultiArithAddSubAQuAAVG
SMT(0.71%)42.888.560.493.985.825.266.1

Datasets

For Commonsense Reasoning downstream evaluation datasets, we use the processed dataset splits provided by the LLM-Adapters repository: https://github.com/AGI-Edgerunners/LLM-Adapters/tree/main/dataset. We follow the same dataset organization and evaluation settings as described in the LLM-Adapters paper.

Citation

If you find this repository or our paper useful in your research, please consider citing:

@inproceedings{he2025smt,
  title={SMT: Fine-Tuning Large Language Models with Sparse Matrices},
  author={He, Haoze and Li, Juncheng B and Jiang, Xuan and Miller, Heather},
  booktitle={The Thirteenth International Conference on Learning Representations}
}