Instructions to use FinStep/Alpha-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FinStep/Alpha-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FinStep/Alpha-R1") 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("FinStep/Alpha-R1") model = AutoModelForCausalLM.from_pretrained("FinStep/Alpha-R1", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FinStep/Alpha-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FinStep/Alpha-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FinStep/Alpha-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FinStep/Alpha-R1
- SGLang
How to use FinStep/Alpha-R1 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 "FinStep/Alpha-R1" \ --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": "FinStep/Alpha-R1", "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 "FinStep/Alpha-R1" \ --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": "FinStep/Alpha-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FinStep/Alpha-R1 with Docker Model Runner:
docker model run hf.co/FinStep/Alpha-R1
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 "FinStep/Alpha-R1" \
--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": "FinStep/Alpha-R1",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'Alpha-R1: Alpha Screening with LLM Reasoning via Reinforcement Learning
Alpha-R1 ๆฏไธไธช้ขๅ้ๅ Alpha ็ญ้็ๆจ็ๅขๅผบๅ LLM๏ผๅบไบ Qwen3-8B๏ผ้่ฟ GRPO ๅผบๅๅญฆไน ๏ผverl๏ผไปฅๅธๅบๅ้ฆๅฅๅฑ่ฎญ็ปใๅฎ้ ่ฏป Alpha101 ๅ ๅญ็่ฏญไนๅๆ่ฟฐโโๆฏไธชๅ ๅญๅฆไฝ่ตทไฝ็จใไฝๆถๆๆใไฝๆถๅคฑๆโโๅนถ้ๅฏนๅฝๅๅธๅบ็ฏๅข็ญ้ๅบๆๅผๅพๆฟๆดป็ๅ ๅญ็ปๅใ
- ๐ Paper: arXiv:2512.23515
- ๐ป Code: FinStep-AI/Alpha-R1๏ผๆจ็็ฎก็บฟ / qlib ๅๆต / ่ฎญ็ป้ ็ฝฎ๏ผ
- ๐ License: MIT
ๆจกๅๆฆ่ง (Model Overview)
| ้กน็ฎ | ๅ ๅฎน |
|---|---|
| Base model | Qwen/Qwen3-8B |
| ่ฎญ็ปๆนๆณ | GRPO๏ผverl๏ผ๏ผๅธๅบๅ้ฆๅฅๅฑ |
| ่พๅ ฅ | ๅณ็ญไธไธๆ prompt๏ผๆผๆฅ็ๅ ๅญ่ฏญไนๆ่ฟฐ ฮฑ_des |
| ่พๅบ | <alpha_list> ไธญๅๅบ็้ไธญๅ ๅญ |
| ๅ้ๅ ๅญๆฑ | 82 ไธช Alpha101 ๅ ๅญ๏ผ่ฎบๆ็ญ้ๅ๏ผ |
| ๆจ่่งฃ็ | temperature=0๏ผgreedy๏ผ๏ผtop_p=0.7๏ผmax_new_tokens=4096 |
ๅฟซ้ๅผๅง (Quick Start)
transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "FinStep/Alpha-R1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
prompt = "<decision context: concatenated factor descriptions>" # see the GitHub repo for the prompt builder
inputs = tokenizer.apply_chat_template(
[{"role": "user", "content": prompt}],
add_generation_prompt=True, return_tensors="pt",
).to(model.device)
# paper setting: temperature=0 (greedy), top_p=0.7
out = model.generate(inputs, max_new_tokens=4096, do_sample=False)
print(tokenizer.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
vLLM
from vllm import LLM, SamplingParams
llm = LLM(model="FinStep/Alpha-R1")
params = SamplingParams(temperature=0.0, top_p=0.7, max_tokens=4096)
outputs = llm.chat([[{"role": "user", "content": prompt}]], params)
ๅฎๆด็็ซฏๅฐ็ซฏ็ฎก็บฟ๏ผๅ ๅญๆ่ฟฐ็ๆ โ Alpha-R1 ๆจ็ โ ่พๅบ่งฃๆ โ qlib ็ญ็ฅๅๆต๏ผ่ง GitHub ไปๅบใ
่พๅบๅฅ็บฆ (Output Contract)
ๆจกๅๅจ <alpha_list>...</alpha_list> ไธญ่พๅบ้ไธญ็ๅ ๅญ id๏ผไพๅฆ๏ผ
<alpha_list>alpha001, alpha021, alpha053</alpha_list>
GitHub ไปๅบ็ src/alpha_r1/parsing/ ๆไพไบ้
ๅฅ็ๆ ก้ชไธ่งฃๆ่ๆฌใ
่กจ็ฐ (Performance)
12 ไธชๆๆ ทๆฌๅคๆต่ฏ๏ผ2025-01-01 ~ 2025-12-31๏ผ่ฎบๆ Table 1๏ผ๏ผ
| ็ฑปๅ | ๆนๆณ | S&P 500 | CSI 300 | ||||
|---|---|---|---|---|---|---|---|
| AR (%) | SR | MDD (%) | AR (%) | SR | MDD (%) | ||
| Non-LLM | Buy & Hold | 19.34 | 0.80 | 18.75 | 22.16 | 1.31 | 10.49 |
| PCA | 7.98 | 0.27 | 17.30 | 2.93 | 0.17 | 14.46 | |
| XGBoost | 3.49 | 0.03 | 18.45 | 8.99 | 0.50 | 16.26 | |
| LightGBM | -5.42 | -0.43 | 20.93 | 18.44 | 1.05 | 14.92 | |
| A2C | 10.82 | 0.40 | 17.70 | 22.96 | 1.20 | 14.86 | |
| PPO | 7.68 | 0.25 | 14.97 | 14.96 | 0.81 | 12.95 | |
| DDPG | 2.53 | -0.02 | 15.04 | 1.97 | 0.12 | 16.54 | |
| TD3 | 5.54 | 0.14 | 16.58 | 8.66 | 0.52 | 10.26 | |
| SAC | 37.60 | 1.44 | 15.18 | 9.77 | 0.56 | 11.68 | |
| LLM | Gemini 2.5 Pro | 14.23 | 0.55 | 17.01 | 16.29 | 0.90 | 14.01 |
| Claude 3.7 Sonnet | 10.92 | 0.40 | 18.88 | 10.13 | 0.57 | 14.49 | |
| DeepSeekโR1 | 21.94 | 0.93 | 14.36 | 14.66 | 0.81 | 14.60 | |
| Qwen3โ8B | 12.85 | 0.47 | 19.52 | 15.44 | 0.79 | 14.38 | |
| AlphaโR1 (Ours) | 47.87 | 1.62 | 16.91 | 40.57 | 2.23 | 6.58 | |
ๅๅคๆณๅ๏ผๆ ้้่ฎญ๏ผ่ฎบๆ Table 2๏ผ๏ผRussell 2000 ไธ 80.54% AR๏ผSR 2.46๏ผ๏ผCSI 1000 ไธ 73.52% AR๏ผSR 2.80๏ผใAR = ๅนดๅๆถ็๏ผSR = ่ถ ้ขๅคๆฎๆฏ็๏ผMDD = ๆๅคงๅๆคใ
่ฎญ็ป (Training)
ๅบไบ Qwen3-8B๏ผไฝฟ็จ verl ่ฟ่ก GRPO ่ฎญ็ป๏ผๅฅๅฑไธบๅธๅบๅ้ฆๅฅๅฑ๏ผR_final = R_adjusted - P_structural๏ผ่ฎบๆ ยง3.4๏ผใ่ฎญ็ป้
็ฝฎไธๅ่ๅฅๅฑๅฎ็ฐ่ง GitHub ไปๅบ็ training/ ็ฎๅฝใ
ๅฑ้ๆง (Limitations)
- ๆฌๆจกๅ้ขๅๅญฆๆฏ็ ็ฉถๅบๆฏ๏ผ่พๅบไธๆๆไปปไฝๆ่ตๅปบ่ฎฎใ
- ๅ ๅญ็ญ้ไพ่ตไธๆธธ็ๆ่ฟฐ็ๆไธๅๆต็ฎก็บฟ๏ผ่ง GitHub ไปๅบ๏ผ๏ผๆจกๅๆฌ่บซไธ็ดๆฅไบงๅบๅฏไบคๆไฟกๅทใ
ๅผ็จ (Citation)
@article{jiang2025alphar1,
title={Alpha-R1: Alpha Screening with LLM Reasoning via Reinforcement Learning},
author={Jiang, Zuoyou and Zhao, Li and Sun, Rui and Sun, Ruohan and Li, Zhongjian and Li, Jing and Jiang, Daxin and Bai, Zuo and Hua, Cheng},
journal={arXiv preprint arXiv:2512.23515},
year={2025}
}
License
ๆฌ้กน็ฎๅบไบ MIT License ๅๅธใ
- Downloads last month
- 216
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "FinStep/Alpha-R1" \ --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": "FinStep/Alpha-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'