Codebase for the paper:
Guiding Reasoning in Small Language Models with LLM Assistance
Yujin Kim*, Euiin Yi*, Minu Kim, Se-Young Yun $\dagger$, Taehyeon Kim $\dagger$
* equal contribution $\dagger$ equal advising
arXiv:2504.09923
SMART introduces a novel test-time framework where Small Language Models (SLMs) reason step-by-step, and Large Language Models (LLMs) provide guidance only when necessary. This selective LLM intervention enables lightweight models to achieve up to 98.9% of LLM accuracy while reducing LLM token usage by up to 90%, making it practical for collaborative settings like on-device + API deployments.
To run a SMART experiment, use:
bash run_qwen.sh <OPTION_NUMBER>
# or
bash run_llama.sh <OPTION_NUMBER>
Note: Multiple runs might be needed to reproduce performance.
| OPTION | Model Pair | Search Type | Score Method |
|---|---|---|---|
| 0 | Qwen2.5-7B | Best-of-N | PRM |
| 1 | Qwen2.5-7B | Beam Search | PRM |
| 2 | Qwen2.5-7B | Beam Search | Confidence |
| 3 | Qwen2.5-1.5B | Best-of-N | PRM |
| 4 | Qwen2.5-7B + SMART | Best-of-N | PRM |
| 5 | Qwen2.5-7B + SMART | Beam Search | PRM |
SMART/
βββ recipes/ # YAML configs for each model
β βββ Llama-3.1-8B-Instruct/
β βββ Llama-3.2-1B-Instruct/
β βββ Qwen2.5-1.5B-Instruct/
β βββ Qwen2.5-7B-Instruct/
β βββ launch_array.slurm
βββ scripts/ # Test-time compute logic
βββ src/ # Core implementation
βββ run_qwen.sh # Shell launcher for Qwen variants
βββ run_llama.sh # Shell launcher for Llama variants
βββ README.md
SMART is evaluated on MATH500. Details on settings, scoring, and results are in our paper. SMART supports:
conda create -n smart python=3.11 && conda activate smart
pip install -e '.[dev]' # install SMART in editable mode
huggingface-cli login
sudo apt-get install git-lfs
If you find this repository useful, please cite:
@article{kim2025guiding,
title={Guiding Reasoning in Small Language Models with LLM Assistance},
author={Kim, Yujin and Yi, Euiin and Kim, Minu and Yun, Se-Young and Kim, Taehyeon},
journal={arXiv preprint arXiv:2504.09923},
year={2025}
}
Python
96.6%
ANTLR
1.9%
Shell
1.5%
Codebase for the paper:
Guiding Reasoning in Small Language Models with LLM Assistance
Yujin Kim*, Euiin Yi*, Minu Kim, Se-Young Yun $\dagger$, Taehyeon Kim $\dagger$
* equal contribution $\dagger$ equal advising
arXiv:2504.09923
SMART introduces a novel test-time framework where Small Language Models (SLMs) reason step-by-step, and Large Language Models (LLMs) provide guidance only when necessary. This selective LLM intervention enables lightweight models to achieve up to 98.9% of LLM accuracy while reducing LLM token usage by up to 90%, making it practical for collaborative settings like on-device + API deployments.
To run a SMART experiment, use:
bash run_qwen.sh <OPTION_NUMBER>
# or
bash run_llama.sh <OPTION_NUMBER>
Note: Multiple runs might be needed to reproduce performance.
| OPTION | Model Pair | Search Type | Score Method |
|---|---|---|---|
| 0 | Qwen2.5-7B | Best-of-N | PRM |
| 1 | Qwen2.5-7B | Beam Search | PRM |
| 2 | Qwen2.5-7B | Beam Search | Confidence |
| 3 | Qwen2.5-1.5B | Best-of-N | PRM |
| 4 | Qwen2.5-7B + SMART | Best-of-N | PRM |
| 5 | Qwen2.5-7B + SMART | Beam Search | PRM |
SMART/
βββ recipes/ # YAML configs for each model
β βββ Llama-3.1-8B-Instruct/
β βββ Llama-3.2-1B-Instruct/
β βββ Qwen2.5-1.5B-Instruct/
β βββ Qwen2.5-7B-Instruct/
β βββ launch_array.slurm
βββ scripts/ # Test-time compute logic
βββ src/ # Core implementation
βββ run_qwen.sh # Shell launcher for Qwen variants
βββ run_llama.sh # Shell launcher for Llama variants
βββ README.md
SMART is evaluated on MATH500. Details on settings, scoring, and results are in our paper. SMART supports:
conda create -n smart python=3.11 && conda activate smart
pip install -e '.[dev]' # install SMART in editable mode
huggingface-cli login
sudo apt-get install git-lfs
If you find this repository useful, please cite:
@article{kim2025guiding,
title={Guiding Reasoning in Small Language Models with LLM Assistance},
author={Kim, Yujin and Yi, Euiin and Kim, Minu and Yun, Se-Young and Kim, Taehyeon},
journal={arXiv preprint arXiv:2504.09923},
year={2025}
}
Python
96.6%
ANTLR
1.9%
Shell
1.5%