DeepSeek-Math-7B-Long-CoT-SFT
DeepSeek-Math-7B-Base fine-tuned on 90K think-style math solutions
- What it is. deepseek-math-7b-base after three epochs of full-parameter fine-tuning on 90,000 math solutions written as
<think> … </think>followed by a boxed answer. A cross-family counterpart to the Qwen3 math SFT checkpoints (Qwen3-4B-SFT-Math, Qwen3-8B-SFT). - Training data. A hybrid of two sources, because the base model has a 4,096-token context: 30,371 long reasoning traces from OpenR1-Math-220k that fit in 3,900 tokens, and 59,829 AMC/AIME solutions from NuminaMath-CoT wrapped in the same
<think>format. - Status. A research checkpoint. No evaluation is reported on this card.
Usage
The repository ships the chat template used in training (User: … / Assistant: <think> … </think> answer):
from transformers import AutoModelForCausalLM, AutoTokenizer
name = "96kevinli29/DeepSeek-Math-7B-Long-CoT-SFT"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, torch_dtype="auto", device_map="auto")
text = tok.apply_chat_template([{"role": "user", "content": "What is the remainder when 2^100 is divided by 7? Put the final answer in \\boxed{}."}],
tokenize=False, add_generation_prompt=True)
inputs = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=3000, do_sample=True, temperature=0.7)
print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Prompt and response together must fit in 4,096 tokens.
Training code: base-model-sft-verl · verl, FSDP, full-parameter SFT on MeluXina (LuxProvide).
Limitations
- 4,096-token context; two thirds of the training solutions are short conventional solutions wrapped as reasoning, not long traces.
- Math-only SFT with no RL stage. Use is subject to the DeepSeek model license of the base model.
Citation
@misc{deepseek-math-7b-sft-hybrid-ep3-2026,
title = {{DeepSeek-Math-7B-Long-CoT-SFT}: think-style math SFT of {DeepSeek-Math-7B-Base}},
author = {Li, Hongyang and Li, Xiao and Wu, Caesar and Danoy, Gr{\'e}goire and Bouvry, Pascal and {Sea-Fill Community}},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/96kevinli29/DeepSeek-Math-7B-Long-CoT-SFT}},
note = {Maintained by Sea-Fill Community.}
}
Built and released by the authors together with the Sea-Fill Community, which maintains this release.