Instructions to use shengjia-toronto/ssft-32B-N6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shengjia-toronto/ssft-32B-N6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shengjia-toronto/ssft-32B-N6") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("shengjia-toronto/ssft-32B-N6") model = AutoModelForCausalLM.from_pretrained("shengjia-toronto/ssft-32B-N6") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use shengjia-toronto/ssft-32B-N6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shengjia-toronto/ssft-32B-N6" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shengjia-toronto/ssft-32B-N6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/shengjia-toronto/ssft-32B-N6
- SGLang
How to use shengjia-toronto/ssft-32B-N6 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "shengjia-toronto/ssft-32B-N6" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shengjia-toronto/ssft-32B-N6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "shengjia-toronto/ssft-32B-N6" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shengjia-toronto/ssft-32B-N6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use shengjia-toronto/ssft-32B-N6 with Docker Model Runner:
docker model run hf.co/shengjia-toronto/ssft-32B-N6
Training LLMs to Reason in Parallel with Global Forking Tokens (SSFT)
💡 Updates | 🧠 Set Supervised Fine-Tuning | 🧾 Release List | ⚙️ Instructions |
Updates
[Contact] If you have questions or are interested in collaborating, feel free to reach out to me at sheng.jia@mail.utoronto.ca. I’ll be actively updating this repository with code, documentation, and new checkpoints.
[2025-12-08] Released checkpoints
[2025-11-05] Released checkpoints
[2025-11-05] Released our evaluation code built on LightEval
→ssft/eval/·scripts/eval_all.sh[2025-10-01] arXiv preprint released: “Training LLMs to Reason in Parallel with Global Forking Tokens” → https://arxiv.org/abs/2510.05132
Set Supervised Fine-Tuning
Results
Note: When evaluating SSFT-32B (🤗 HF link), use <think1> for Pass@1, and use the set <think1>...<think6> (parallel generations) for Cons@k. Our custom LightEval code inserts these tags automatically. If you’re using other frameworks and don’t want to manage <think i> prompting, try our GRPO fine-tuned model (🤗 HF link), which uses RL to only optimize global forking tokens for selecting the optimal tag per question (very efficient with 1k data from DAPO-17k). SSFT-GRPO models can sample the optimal think tag for your questions, so you can just run them directly.
Pass@1: Average performance of individual generations (under <think1>)
| Model | AIME 2024 | AIME 2025 | MATH-500 | GPQA-D | Average |
|---|---|---|---|---|---|
| SSFT-32B | 64.06 | 58.13 | 90.02 | 60.39 | 68.15 |
Average of Native Cons@6: Average performance of majority voting with 6 parallel generations
| Model | AIME 2024 | AIME 2025 | MATH-500 | GPQA-D | Average |
|---|---|---|---|---|---|
| SSFT-32B | 75.45 | 73.94 | 96.47 | 63.05 | 77.23 |
Cons@32: Majority voting performance with large number of parallel generations
| Model | AIME 2024 | AIME 2025 | MATH-500 | GPQA-D | Average |
|---|---|---|---|---|---|
| SSFT-32B | 83.33 | 86.67 | 96.80 | 61.62 | 82.11 |
Release List
- Checkpoint: ssft-32B HF repo
- Code for evaluating ssft-32B
- Evaluation script with tensor parallel so >100GB VRAM per worker is not required
- Code for training ssft-32B
- Code for additional RFT ssft-32B -> grpo-ssft-32B
- More detailed instructions on both training and evaluation
- Checkpoint: grpo-test-ssft-32B
- Checkpoint: gfpo-ssft-32B-bs256-step10
- Checkpoint: grpo-ssft-32B
Instructions
Note (Compute & runtime): We used a single AWS EC2 instance p6-b200.48xlarge (8× B200 GPUs) to conduct both SSFT-32B training and evaluation. Training took ~6 hours end-to-end, and evaluation for each task took roughly 1.5–2 hours.
Environment
git clone https://github.com/Sheng-J/SSFT.git
cd SSFT
uv venv ssft_env --python 3.11 && source ssft_env/bin/activate && uv pip install --upgrade pip
uv pip install torch==2.7.0 --index-url https://download.pytorch.org/whl/cu128
uv pip install -r requirements.txt
uv pip install -e ./transformers
uv pip install -e ./lighteval
Evaluating SSFT-32B on AIME25/24, MATH-500, GPQA-D (Cons@6 Cons@32 Pass@1)
. ssft_eval.sh
Citation
If you find this work useful, please cite:
@article{jia2025training,
title={Training Large Language Models To Reason In Parallel With Global Forking Tokens},
author={Jia, Sheng and Wang, Xiao and Kasiviswanathan, Shiva Prasad},
journal={arXiv preprint arXiv:2510.05132},
year={2025}
}
- Downloads last month
- 5