euiin/SMART

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.

12

stars

6

commits

Python

primary language

Jul 9, 2025

updated

README

SMART: Small Reasons, Large Hints

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.

πŸš€ Quickstart

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.

Available options (for Qwen):

OPTIONModel PairSearch TypeScore Method
0Qwen2.5-7BBest-of-NPRM
1Qwen2.5-7BBeam SearchPRM
2Qwen2.5-7BBeam SearchConfidence
3Qwen2.5-1.5BBest-of-NPRM
4Qwen2.5-7B + SMARTBest-of-NPRM
5Qwen2.5-7B + SMARTBeam SearchPRM

πŸ“ Project structure

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

πŸ“Š Reproducing Results

SMART is evaluated on MATH500. Details on settings, scoring, and results are in our paper. SMART supports:

  • Best-of-N & Beam Search
  • Scoring with PRM or token-level confidence(TLC)

πŸ“¦ Installation

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

πŸ“š Citation

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}
}

Contributors

kimyuji

4 commits

euiin

2 commits

euiin/SMART

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.

12

stars

6

commits

Python

primary language

Jul 9, 2025

updated

README

SMART: Small Reasons, Large Hints

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.

πŸš€ Quickstart

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.

Available options (for Qwen):

OPTIONModel PairSearch TypeScore Method
0Qwen2.5-7BBest-of-NPRM
1Qwen2.5-7BBeam SearchPRM
2Qwen2.5-7BBeam SearchConfidence
3Qwen2.5-1.5BBest-of-NPRM
4Qwen2.5-7B + SMARTBest-of-NPRM
5Qwen2.5-7B + SMARTBeam SearchPRM

πŸ“ Project structure

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

πŸ“Š Reproducing Results

SMART is evaluated on MATH500. Details on settings, scoring, and results are in our paper. SMART supports:

  • Best-of-N & Beam Search
  • Scoring with PRM or token-level confidence(TLC)

πŸ“¦ Installation

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

πŸ“š Citation

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}
}

Contributors

kimyuji

4 commits

euiin

2 commits

Languages

Python

96.6%

ANTLR

1.9%

Shell

1.5%