BytedTsinghua-SIA/DAPO-Math-17k
Viewer • Updated • 1.79M • 17.2k • 193
How to use DtYXs/SCAPO-Qwen3-1.7B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="DtYXs/SCAPO-Qwen3-1.7B")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("DtYXs/SCAPO-Qwen3-1.7B")
model = AutoModelForCausalLM.from_pretrained("DtYXs/SCAPO-Qwen3-1.7B", device_map="auto")
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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use DtYXs/SCAPO-Qwen3-1.7B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "DtYXs/SCAPO-Qwen3-1.7B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "DtYXs/SCAPO-Qwen3-1.7B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/DtYXs/SCAPO-Qwen3-1.7B
How to use DtYXs/SCAPO-Qwen3-1.7B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "DtYXs/SCAPO-Qwen3-1.7B" \
--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": "DtYXs/SCAPO-Qwen3-1.7B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "DtYXs/SCAPO-Qwen3-1.7B" \
--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": "DtYXs/SCAPO-Qwen3-1.7B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use DtYXs/SCAPO-Qwen3-1.7B with Docker Model Runner:
docker model run hf.co/DtYXs/SCAPO-Qwen3-1.7B
SCAPO-Qwen3-1.7B is a full-parameter RL fine-tune of Qwen3-1.7B-Base using Semifactual Credit-Augmented Policy Optimization (SCAPO) on DAPO-Math-17K. SCAPO uses answer-preserving prompt perturbations to refine token-level credit assignment during training.
Full results and evaluation details are available in the paper and code repository.
| Method | AIME 24–26 | AMC 23–25 | HMMT 25–26 | ID Avg. | OOD Avg. |
|---|---|---|---|---|---|
| Base | 3.61 | 23.33 | 0.69 | 12.45 | 9.31 |
| GRPO | 7.71 | 32.97 | 1.98 | 17.86 | 13.70 |
| SCAPO | 11.88 | 41.39 | 4.96 | 23.08 | 17.22 |
Use the checkpoint's chat template with the R1-style instruction shown below.
from transformers import pipeline
model = pipeline(
"text-generation",
model="DtYXs/SCAPO-Qwen3-1.7B",
torch_dtype="auto",
device_map="auto",
)
messages = [{
"role": "user",
"content": "What is the remainder when 7^100 is divided by 13?\n\n"
"Please reason step by step, and put your final answer within \\boxed{}.",
}]
output = model(
messages,
max_new_tokens=16384,
do_sample=True,
temperature=0.7,
top_p=0.9,
top_k=0,
)
print(output[0]["generated_text"][-1]["content"])
@misc{pan2026semifactualcreditaugmentedpolicyoptimization,
title = {Semifactual Credit-Augmented Policy Optimization},
author = {Junshu Pan and Zhizhang Fu and Shulin Huang and Yiran Ding and Zifan Cheng and Wenqi Shao and Qiaosheng Zhang and Yue Zhang},
year = {2026},
eprint = {2609.40360},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2609.40360}
}