A Strategic Coordination Framework of Small LMs Matches Large LMs in Data Synthesis


title: "GX-XinGao/GRA: The Code and Script of "David's Slingshot: A Strategic Coordination Framework of Small LLMs Matches Large LLMs in Data Synthesis"" url: "https://github.com/GX-XinGao/GRA" author: "GX-XinGao"

https://arxiv.org/html/2504.12322

A Strategic Coordination Framework of Small LMs Matches Large LMs in Data Synthesis

We propose GRA, a multiple small LMs collaborative framework that aggregats specialized roles across small LMs can mimic the iterative refinement and quality control typically achieved by a single large LM, in which multiple small LMs assume distinct roles—Generator, Reviewer, and Adjudicator to simulate a peer-review-inspired data synthesis pipeline:

  1. Generator, which proposes candidate data samples.
  2. Reviewer, which evaluates quality and diversity through iterative critiques.
  3. Adjudicator, which resolves conflicts to finalize outputs.

Through experiments across multiple benchmarks, we demonstrate that GRA-produced data matches or exceeds the quality of single large LM outputs, e.g., Qwen-2.5-72B-Instruct. Our results challenge the necessity of monolithic large models for high-quality data synthesis, advocating instead for strategic coordination of smaller agents.

We release the all the GRA generated datasets and six fine-tuned model.

Dataset/Model HuggingFace🤗
GRA link
GRA-Refine link
Qwen-2.5-7B-GRA-Alpaca link
Qwen-2.5-7B-GRA-WizardLM link
Qwen-2.5-7B-GRA-Condor link
Llama-3.1-8B-GRA-Alpaca link
Llama-3.1-8B-GRA-WizardLM link
Llama-3.1-8B-GRA-Condor link

🎯 Quick Start

Install the dependencies:

conda create -n GRA python=3.10
conda activate GRA
git clone https://github.com/GX-XinGao/GRA.git
cd GRA
pip install -r requirements.txt

# Install LLaMA-Factory
cd ~/
git clone https://github.com/hiyouga/LLaMA-Factory.git
cd LLaMA-Factory
pip install -e ".[torch,metrics]"

# Install packages for evaluation
cd ~/
git clone  https://github.com/open-compass/opencompass opencompass
cd opencompass
pip install -e ".[vllm]"

📚 Data

Load the data from GRA, then convert each split to .json file and register the data information according to LLaMA-Factory.

🤖 Training

Our training codes depend on LLaMA-Factory.

# Specify the dataset to be trained
export DATASET= GRA-Alpaca
# The path of base model
export MODEL_PATH=pretrained_model_path
bash train/train.sh

📊 Evaluation

Our evaluation codes depend on opencompass. You need to first download the model from HuggingFace, or SFT the model on your own. Then run the following evaluation script:

export MODEL_NAME=your_sft_llama_model_path
bash llama_test.sh

export MODEL_NAME=your_sft_qwen_model_path
bash qwen_test.sh

🙏 Acknowledgements

Many thanks to

Citation

If you find our code, model, or data are useful, please kindly cite our paper:

@article{gao2025strategic,
  title={A Strategic Coordination Framework of Small LLMs Matches Large LLMs in Data Synthesis},
  author={Gao, Xin and Pei, Qizhi and Tang, Zinan and Li, Yu and Lin, Honglin and Wu, Jiang and Wu, Lijun and He, Conghui},
  journal={arXiv preprint arXiv:2504.12322},
  year={2025}
}
4 points · 0 comments · view on lemmy.world

0 Comments

No comments yet.