s1: Simple test-time scaling
Updates:
This repository provides an overview of all resources for the paper "s1: Simple test-time scaling".
eval/: Evaluation scriptsdata/: Synthetic data creation scripts & cotrain/: Training scriptsInstall the vllm library and run:
……Install the transformers & torch libraries and run:
…To run training, you can find our script at train/sft.py which you can invoke via one of the train/sft*sh scripts which in turn you can launch via train/launch.sh if you are on a SLURM cluster (requires editing the file for your cluster setup).
To train s1-32B/s1.1-32B, we recommend 16 H100 GPUs i.e. 2 nodes with 8 each. For s1.1, we set the block size to 20000 to avoid OOM (https://github.com/simplescaling/s1/blob/0ad4b3de32507b4aa0d4be28f336276ee99b2315/train/sft.sh#L17); Check the wandb logs here.
Quick start:
git clone https://github.com/simplescaling/s1.git
cd s1
pip3 install -r requirements.txt
bash train/sft.shNote: If you encounter an out-of-memory (OOM) issue with 8 GPUs, consider enabling gradient checkpointing by adding the following line to your script: --gradient_checkpointing=True.
We cloned lm-evaluation-harness at commit 4cec66e4e468d15789473d6d63c3a61a751fa524 and modified it. Setup:
cd eval/lm-evaluation-harness
pip install -e .[math,vllm]All commands are in eval/commands.sh. For AIME24 we always pick the aime24_nofigures result, which uses a dataset that only contains the AIME24 figures if they are important for the task.
If you want to compute statistics (avg thinking tokens etc) for an evaluation run you can use
python eval/compute_sample_stats.py path_to_samples_file.jsonl
All our evaluation result files are at: https://hf.co/datasets/simplescaling/results
To run REBASE: commands are in eval/rebase/run.sh
Note that for the evaluations in the Discussion section with REBASE we used https://huggingface.co/simplescaling/step-conditional-control-old trained on an older version of our dataset https://huggingface.co/datasets/simplescaling/s1K-step-conditional-control-old and run on an older version of our evaluation using https://huggingface.co/datasets/Maxwell-Jia/AIME_2024.
To recreate s1K follow the steps below. In various files you will have to rename the organizations simplescaling and qfq with an organization that you own. Note that s1K-1.1 is a better dataset generated with r1 traces instead of Gemini traces.
data/collect_data.py followed by data/fix_gpqa.py & data/add_aime.py to collect the questions; Make sure to change the hub path in the respective files to one of your own.python data/gemini.py. This step will use https://hf.co/datasets/qfq/train which should be roughly equivalent to the dataet you have produced in 1.python data/bulk_inference.py that can be launched with data/bulk_inference.sh.python data/featurization.py.data/filter.ipynb.data/grading.ipynb.All figures and some tables are created via this colab equivalent to visuals/visuals.ipynb. Some are subsequently edited via the visuals/s1.fig file, which you can load in Figma. The output figures are in visuals/ in pdf or png format.
ValueError: Token id XXXXX is out of vocabularyif max_input_id > tokenizer.max_token_id: in vllm/engine/llm_engine.py)@misc{muennighoff2025s1simpletesttimescaling,
title={s1: Simple test-time scaling},
author={Niklas Muennighoff and Zitong Yang and Weijia Shi and Xiang Lisa Li and Li Fei-Fei and Hannaneh Hajishirzi and Luke Zettlemoyer and Percy Liang and Emmanuel Candès and Tatsunori Hashimoto},
year={2025},
eprint={2501.19393},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2501.19393},
}แนะนำ 11 สล็อต pg เว็บตรง แตกหนัก 2026 อันดับ 1 เชื่อถือได้ 999%
Inconsistent AIME scores when porting evaluation to newer vLLM versions
Cannot find simplescaling/s1-7B available / renamed / removed?
Performance on Qwen2.5-7B-Instruct
DeepSeek-R1 trace generation details
I tried to finetune qwen3-1.7B on implescaling/s1K-1.1_tokenized datasets , by using this repository code , cannot figure out why do I got worse inferrence result ?
does the budget forcing works?
final answer extraction from the solution for aime24 dataset
Thanks for your work, can I use "Qwen/Qwen2.5-32B-Instruct" instead of gpt-4o-mini for evaluation? If yes, what codes need to be changed?
Issue Reproducing s1.1-32B Training Loss (Observed vs. WandB)