Text Generation
Transformers
Safetensors
qwen3
finance
quantitative-trading
alpha-factor
reinforcement-learning
grpo
qlib
conversational
text-generation-inference
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)# 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=40) 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
Update README.md: absolute language links, combined results figure
Browse files
README.md
CHANGED
|
@@ -15,7 +15,7 @@ tags:
|
|
| 15 |
# Alpha-R1: Alpha Screening with LLM Reasoning via Reinforcement Learning
|
| 16 |
|
| 17 |
<p align="center">
|
| 18 |
-
<a href="README_en.md">English</a> | <a href="README.md">中文</a>
|
| 19 |
</p>
|
| 20 |
|
| 21 |
**Alpha-R1** 是一个面向量化 Alpha 筛选的推理增强型 LLM:基于 Qwen3-8B,通过 GRPO 强化学习([verl](https://github.com/volcengine/verl))以市场反馈奖励训练。它阅读 Alpha101 因子的**语义化描述**——每个因子如何起作用、何时有效、何时失效——并针对当前市场环境筛选出最值得激活的因子组合。
|
|
@@ -88,8 +88,7 @@ GitHub 仓库的 `src/alpha_r1/parsing/` 提供了配套的校验与解析脚本
|
|
| 88 |
12 个月样本外测试(2025-01-01 ~ 2025-12-31,论文 Table 1):
|
| 89 |
|
| 90 |
<p align="center">
|
| 91 |
-
<img src="assets/
|
| 92 |
-
<img src="assets/main_result_csi300.png" alt="Backtest NAV comparison on the CSI 300 asset pool" style="width: 49%;">
|
| 93 |
</p>
|
| 94 |
|
| 95 |
<table>
|
|
|
|
| 15 |
# Alpha-R1: Alpha Screening with LLM Reasoning via Reinforcement Learning
|
| 16 |
|
| 17 |
<p align="center">
|
| 18 |
+
<a href="https://huggingface.co/FinStep/Alpha-R1/blob/main/README_en.md">English</a> | <a href="https://huggingface.co/FinStep/Alpha-R1/blob/main/README.md">中文</a>
|
| 19 |
</p>
|
| 20 |
|
| 21 |
**Alpha-R1** 是一个面向量化 Alpha 筛选的推理增强型 LLM:基于 Qwen3-8B,通过 GRPO 强化学习([verl](https://github.com/volcengine/verl))以市场反馈奖励训练。它阅读 Alpha101 因子的**语义化描述**——每个因子如何起作用、何时有效、何时失效——并针对当前市场环境筛选出最值得激活的因子组合。
|
|
|
|
| 88 |
12 个月样本外测试(2025-01-01 ~ 2025-12-31,论文 Table 1):
|
| 89 |
|
| 90 |
<p align="center">
|
| 91 |
+
<img src="assets/main_results.png" alt="Backtest NAV comparison on S&P 500 (left) and CSI 300 (right)" style="width: 100%;">
|
|
|
|
| 92 |
</p>
|
| 93 |
|
| 94 |
<table>
|