UCSC-VLAA/STAR-1
Viewer • Updated • 1k • 345 • 12
How to use UCSC-VLAA/STAR1-R1-Distill-1.5B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="UCSC-VLAA/STAR1-R1-Distill-1.5B")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("UCSC-VLAA/STAR1-R1-Distill-1.5B")
model = AutoModelForCausalLM.from_pretrained("UCSC-VLAA/STAR1-R1-Distill-1.5B")
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]:]))How to use UCSC-VLAA/STAR1-R1-Distill-1.5B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "UCSC-VLAA/STAR1-R1-Distill-1.5B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "UCSC-VLAA/STAR1-R1-Distill-1.5B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/UCSC-VLAA/STAR1-R1-Distill-1.5B
How to use UCSC-VLAA/STAR1-R1-Distill-1.5B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "UCSC-VLAA/STAR1-R1-Distill-1.5B" \
--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": "UCSC-VLAA/STAR1-R1-Distill-1.5B",
"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 "UCSC-VLAA/STAR1-R1-Distill-1.5B" \
--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": "UCSC-VLAA/STAR1-R1-Distill-1.5B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use UCSC-VLAA/STAR1-R1-Distill-1.5B with Docker Model Runner:
docker model run hf.co/UCSC-VLAA/STAR1-R1-Distill-1.5B
📃 Paper |🤗 STAR-1 Data | 🤗 STAR-1 Model | 📚 Project Page
STAR-1 is a high-quality safety dataset designed to enhance safety alignment in large reasoning models (LRMs) like DeepSeek-R1.
We open-sourced our STAR1-R1-Distill-1.5B model here, which is fine-tuned on STAR-1 dataset.
| Dataset | Num. of Sample | URL |
|---|---|---|
| STAR-1 | 1K | 🤗 UCSC-VLAA/STAR-1 |
| STAR 41K | 41K | 🤗 UCSC-VLAA/STAR-41K |
| STAR-benign-915 | 915 | 🤗 UCSC-VLAA/STAR-benign-915 |
| Model | Type | URL |
|---|---|---|
STAR1-R1-Distill-1.5B |
R1-Distill-Qwen-1.5B trained on STAR-1 | 🤗 UCSC-VLAA/STAR1-R1-Distill-1.5B |
STAR1-R1-Distill-7B |
R1-Distill-Qwen-7B trained on STAR-1 | 🤗 UCSC-VLAA/STAR1-R1-Distill-7B |
STAR1-R1-Distill-8B |
R1-Distill-Llama-8B trained on STAR-1 | 🤗 UCSC-VLAA/STAR1-R1-Distill-8B |
STAR1-R1-Distill-14B |
R1-Distill-Qwen-14B trained on STAR-1 | 🤗 UCSC-VLAA/STAR1-R1-Distill-14B |
STAR1-R1-Distill-32B |
R1-Distill-Qwen-32B trained on STAR-1 | 🤗 UCSC-VLAA/STAR1-R1-Distill-32B |
See our github repo.
This work is partially supported by a gift from Open Philanthropy. We thank the NAIRR Pilot Program and the Microsoft Accelerate Foundation Models Research Program for supporting our computing needs.
@article{wang2025star1saferalignmentreasoning,
title={STAR-1: Safer Alignment of Reasoning LLMs with 1K Data},
author={Zijun Wang and Haoqin Tu and Yuhan Wang and Juncheng Wu and Jieru Mei and Brian R. Bartoldson and Bhavya Kailkhura and Cihang Xie},
year={2025},
journal = {arXiv preprint arXiv:2504.01903}
}
Base model
deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B