Text Generation
Transformers
English
Chinese
finance
reinforcement-learning
reasoning
qwen3
alpha-screening
quantitative-finance
Instructions to use AFatRat/Alpha-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AFatRat/Alpha-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AFatRat/Alpha-R1")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AFatRat/Alpha-R1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AFatRat/Alpha-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AFatRat/Alpha-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AFatRat/Alpha-R1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AFatRat/Alpha-R1
- SGLang
How to use AFatRat/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 "AFatRat/Alpha-R1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AFatRat/Alpha-R1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "AFatRat/Alpha-R1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AFatRat/Alpha-R1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen3-8B
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
- zh
|
| 9 |
+
tags:
|
| 10 |
+
- finance
|
| 11 |
+
- reinforcement-learning
|
| 12 |
+
- reasoning
|
| 13 |
+
- qwen3
|
| 14 |
+
- stock-selection
|
| 15 |
+
- quantitative-finance
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# Alpha-R1
|
| 19 |
+
|
| 20 |
+
<p align="center">
|
| 21 |
+
<img src="https://huggingface.co/front/assets/huggingface_logo.svg" width="120">
|
| 22 |
+
</p>
|
| 23 |
+
|
| 24 |
+
**Alpha-R1** is a reasoning-enhanced Large Language Model for quantitative stock selection, trained with Reinforcement Learning (RL) on top of **Qwen3-8B**.
|
| 25 |
+
|
| 26 |
+
It is the official implementation accompanying the paper:
|
| 27 |
+
|
| 28 |
+
> [Alpha-R1: Alpha Screening with LLM Reasoning via Reinforcement Learning](https://arxiv.org/abs/2512.23515)
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
# Overview
|
| 33 |
+
|
| 34 |
+
Alpha-R1 is designed for **Alpha Screening** rather than general-purpose conversation.
|
| 35 |
+
|
| 36 |
+
Unlike conventional LLMs, Alpha-R1 learns to reason over
|
| 37 |
+
|
| 38 |
+
- Financial factor descriptions
|
| 39 |
+
- Historical price trends
|
| 40 |
+
- Market news
|
| 41 |
+
- Portfolio constraints
|
| 42 |
+
|
| 43 |
+
to produce interpretable alpha-selection decisions.
|
| 44 |
+
|
| 45 |
+
The model is optimized using reinforcement learning with trading performance as the optimization objective, enabling stronger reasoning ability for quantitative investment tasks.
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
# Highlights
|
| 50 |
+
|
| 51 |
+
- 🧠 Reinforcement-learning aligned financial reasoning
|
| 52 |
+
- 📈 Multi-modal market understanding (news + quantitative factors + price)
|
| 53 |
+
- 📊 Strong generalization across different asset pools
|
| 54 |
+
- 💰 Optimized for alpha generation instead of language modeling
|
| 55 |
+
|
| 56 |
+
According to the paper, Alpha-R1 achieves:
|
| 57 |
+
|
| 58 |
+
| Dataset | Annual Return | Sharpe | Max Drawdown |
|
| 59 |
+
|----------|--------------|---------|--------------|
|
| 60 |
+
| CSI300 | 27.59% | 1.62 | 6.76% |
|
| 61 |
+
| CSI1000 | 78.18% | 4.03 | 9.25% |
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
# Model Details
|
| 66 |
+
|
| 67 |
+
| Item | Value |
|
| 68 |
+
|------|------|
|
| 69 |
+
| Base Model | Qwen3-8B |
|
| 70 |
+
| Model Type | Causal Language Model |
|
| 71 |
+
| Training | Reinforcement Learning Fine-tuning |
|
| 72 |
+
| Domain | Quantitative Finance |
|
| 73 |
+
| Language | English |
|
| 74 |
+
| Intended Task | Stock Selection & Financial Reasoning |
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
# Training
|
| 79 |
+
|
| 80 |
+
Alpha-R1 is initialized from **Qwen3-8B** and further optimized using reinforcement learning.
|
| 81 |
+
|
| 82 |
+
The training objective encourages the model to generate reasoning trajectories that maximize downstream portfolio performance instead of only predicting next tokens.
|
| 83 |
+
|
| 84 |
+
The model is trained using:
|
| 85 |
+
|
| 86 |
+
- Financial factor descriptions
|
| 87 |
+
- Historical price information
|
| 88 |
+
- Market news
|
| 89 |
+
- Trading rewards derived from portfolio returns
|
| 90 |
+
|
| 91 |
+
More details can be found in the accompanying paper.
|
| 92 |
+
|
| 93 |
+
---
|
| 94 |
+
|
| 95 |
+
## Training Data
|
| 96 |
+
|
| 97 |
+
Alpha-R1 was trained using a proprietary financial reasoning dataset constructed from market information, factor semantic descriptions, and financial news. Due to data licensing and copyright restrictions, the training dataset is not publicly released.
|
| 98 |
+
|
| 99 |
+
---
|
| 100 |
+
|
| 101 |
+
# Intended Use
|
| 102 |
+
|
| 103 |
+
Alpha-R1 is intended for research on
|
| 104 |
+
|
| 105 |
+
- Financial reasoning
|
| 106 |
+
- Quantitative investment
|
| 107 |
+
- Alpha mining
|
| 108 |
+
- LLM-based decision making
|
| 109 |
+
- Reinforcement learning for finance
|
| 110 |
+
|
| 111 |
+
Example prompts include:
|
| 112 |
+
|
| 113 |
+
- Rank candidate stocks.
|
| 114 |
+
- Explain factor exposure.
|
| 115 |
+
- Analyze market news.
|
| 116 |
+
- Compare investment opportunities.
|
| 117 |
+
- Generate reasoning for stock selection.
|
| 118 |
+
|
| 119 |
+
---
|
| 120 |
+
|
| 121 |
+
# Limitations
|
| 122 |
+
|
| 123 |
+
- This model is **not** a financial advisor.
|
| 124 |
+
- Outputs should **not** be regarded as investment advice.
|
| 125 |
+
- Performance reported in the paper is obtained under a specific backtesting protocol and does not guarantee future returns.
|
| 126 |
+
- Users should perform their own validation before any real-world deployment.
|
| 127 |
+
|
| 128 |
+
---
|
| 129 |
+
|
| 130 |
+
# Citation
|
| 131 |
+
|
| 132 |
+
If you find Alpha-R1 useful, please cite:
|
| 133 |
+
|
| 134 |
+
```bibtex
|
| 135 |
+
@article{alphar1,
|
| 136 |
+
title={Alpha-R1: Alpha Screening with LLM Reasoning via Reinforcement Learning},
|
| 137 |
+
author={Anonymous},
|
| 138 |
+
year={2025}
|
| 139 |
+
}
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
---
|
| 143 |
+
|
| 144 |
+
# License
|
| 145 |
+
|
| 146 |
+
This model is released under the Apache-2.0 License.
|
| 147 |
+
|
| 148 |
+
Please also comply with the license of the base model (**Qwen3-8B**) when using this model.
|
| 149 |
+
|
| 150 |
+
---
|
| 151 |
+
|
| 152 |
+
# Acknowledgements
|
| 153 |
+
|
| 154 |
+
Alpha-R1 is built upon the excellent **Qwen3-8B** model developed by Alibaba.
|
| 155 |
+
|
| 156 |
+
We thank the open-source community for making this work possible.
|