Instructions to use TheFinAI/Fin-o1-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheFinAI/Fin-o1-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheFinAI/Fin-o1-8B") 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("TheFinAI/Fin-o1-8B") model = AutoModelForCausalLM.from_pretrained("TheFinAI/Fin-o1-8B", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheFinAI/Fin-o1-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheFinAI/Fin-o1-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheFinAI/Fin-o1-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TheFinAI/Fin-o1-8B
- SGLang
How to use TheFinAI/Fin-o1-8B 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 "TheFinAI/Fin-o1-8B" \ --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": "TheFinAI/Fin-o1-8B", "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 "TheFinAI/Fin-o1-8B" \ --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": "TheFinAI/Fin-o1-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TheFinAI/Fin-o1-8B with Docker Model Runner:
docker model run hf.co/TheFinAI/Fin-o1-8B
Request access to Fin-o1-8B
Fin-o1-8B is released by The Fin AI for research. Access is granted automatically after you complete this short form.
This model is released for research purposes. It must not be used to provide personalized investment advice or to make automated financial decisions without human oversight. Use is also subject to the license of the base model (Qwen3, Apache 2.0).
Log in or Sign Up to review the conditions and access this model content.
Fin-o1-8B
📄 Paper · 🤗 Collection · 💻 Code · 🏆 Leaderboard · 🌐 The Fin AI
Fin-o1-8B is a financial reasoning model fine-tuned from Qwen3-8B with supervised fine-tuning on financial chain-of-thought data followed by GRPO reinforcement learning. It was introduced in Fino1: On the Transferability of Reasoning-Enhanced LLMs and Reinforcement Learning to Finance (arXiv:2502.08127).
Fin-o1 vs. Fino1. The two families come from the same paper but are different generations:
Fino1 (2025-02/03) Fin-o1 (2025-05) 8B Fino1-8B — Llama-3.1-8B-Instruct Fin-o1-8B — Qwen3-8B 14B Fino1-14B — Qwen2.5-14B-Instruct Fin-o1-14B — Qwen3-14B Training CoT SFT + RL SFT + GRPO For new work we recommend the Fin-o1 models.
Model Details
| Base model | Qwen/Qwen3-8B |
| Architecture | Qwen3ForCausalLM, 36 layers, hidden size 4096 |
| Precision | bfloat16 |
| Context length | 40,960 tokens (max_position_embeddings) |
| Training data | TheFinAI/FinCoT — reasoning paths derived from FinQA, TAT-QA, DocMath-Eval, Econ-Logic, BizBench-QA and DocFinQA |
| Training method | SFT, then GRPO with accuracy and format rewards |
| Language | English |
| License | Apache 2.0 (same as the base model) |
GRPO stage (from trainer_state.json / train_results.json in this repo)
| Steps / epochs | 500 steps, 2 epochs |
| Training samples | 1,525 |
| Per-device batch size | 2 |
| Peak learning rate | 3e-6 |
| Rewards | accuracy_reward, format_reward |
| Wall-clock | ≈ 2.2 h |
Quick Start
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "TheFinAI/Fin-o1-8B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
messages = [{
"role": "user",
"content": "A company's revenue grew from $120M to $150M while operating costs rose from $90M to $105M. "
"By how many percentage points did the operating margin change?",
}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
output = model.generate(**inputs, max_new_tokens=1024)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Evaluation
Fin-o1 and Fino1 are evaluated on FinQA, DocMath-Eval (simple / complex long), XBRL-Math and related financial reasoning tasks. See the paper and the Open FinLLM Reasoning Leaderboard for results.
Intended Use & Limitations
- Intended use: research on financial numerical reasoning, question answering over financial text and tables, and as a baseline for financial reasoning models.
- Not intended for: investment advice, trading decisions, or any automated financial decision without human review.
- The model can produce incorrect calculations or hallucinated figures, especially on long documents with multiple tables.
- Trained and evaluated on English data only.
Citation
@misc{qian2025fino1transferabilityreasoningenhancedllms,
title={Fino1: On the Transferability of Reasoning-Enhanced LLMs and Reinforcement Learning to Finance},
author={Lingfei Qian and Weipeng Zhou and Yan Wang and Xueqing Peng and Han Yi and Yilun Zhao and Jimin Huang and Qianqian Xie and Jian-yun Nie},
year={2025},
eprint={2502.08127},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2502.08127},
}
Contact
Questions and issues: open a discussion on this repository or on GitHub.
- Downloads last month
- 245
Model tree for TheFinAI/Fin-o1-8B
Base model
Qwen/Qwen3-8B-Base