Text Generation
PEFT
Safetensors
Transformers
English
grpo
lora
sft
trl
unsloth
conversational
Eval Results (legacy)
Instructions to use marco-molinari/FinLM-Reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use marco-molinari/FinLM-Reasoning with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-31b-it-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "marco-molinari/FinLM-Reasoning") - Transformers
How to use marco-molinari/FinLM-Reasoning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="marco-molinari/FinLM-Reasoning") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("marco-molinari/FinLM-Reasoning", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use marco-molinari/FinLM-Reasoning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marco-molinari/FinLM-Reasoning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marco-molinari/FinLM-Reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marco-molinari/FinLM-Reasoning
- SGLang
How to use marco-molinari/FinLM-Reasoning 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 "marco-molinari/FinLM-Reasoning" \ --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": "marco-molinari/FinLM-Reasoning", "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 "marco-molinari/FinLM-Reasoning" \ --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": "marco-molinari/FinLM-Reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use marco-molinari/FinLM-Reasoning with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for marco-molinari/FinLM-Reasoning to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for marco-molinari/FinLM-Reasoning to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for marco-molinari/FinLM-Reasoning to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="marco-molinari/FinLM-Reasoning", max_seq_length=2048, ) - Docker Model Runner
How to use marco-molinari/FinLM-Reasoning with Docker Model Runner:
docker model run hf.co/marco-molinari/FinLM-Reasoning
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,202 +10,98 @@ tags:
|
|
| 10 |
- transformers
|
| 11 |
- trl
|
| 12 |
- unsloth
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
-
|
| 18 |
|
|
|
|
| 19 |
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
##
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
|
|
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 31 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 32 |
-
- **Model type:** [More Information Needed]
|
| 33 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 34 |
-
- **License:** [More Information Needed]
|
| 35 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 36 |
|
| 37 |
-
##
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
-
|
| 42 |
-
- **Paper [optional]:** [More Information Needed]
|
| 43 |
-
- **Demo [optional]:** [More Information Needed]
|
| 44 |
|
| 45 |
-
##
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
##
|
| 50 |
|
| 51 |
-
|
| 52 |
|
| 53 |
-
|
| 54 |
|
| 55 |
-
##
|
|
|
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
### Out-of-Scope Use
|
| 62 |
-
|
| 63 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 64 |
-
|
| 65 |
-
[More Information Needed]
|
| 66 |
-
|
| 67 |
-
## Bias, Risks, and Limitations
|
| 68 |
-
|
| 69 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 70 |
-
|
| 71 |
-
[More Information Needed]
|
| 72 |
-
|
| 73 |
-
### Recommendations
|
| 74 |
-
|
| 75 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 76 |
-
|
| 77 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 78 |
-
|
| 79 |
-
## How to Get Started with the Model
|
| 80 |
-
|
| 81 |
-
Use the code below to get started with the model.
|
| 82 |
-
|
| 83 |
-
[More Information Needed]
|
| 84 |
-
|
| 85 |
-
## Training Details
|
| 86 |
-
|
| 87 |
-
### Training Data
|
| 88 |
-
|
| 89 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 90 |
-
|
| 91 |
-
[More Information Needed]
|
| 92 |
-
|
| 93 |
-
### Training Procedure
|
| 94 |
-
|
| 95 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 96 |
-
|
| 97 |
-
#### Preprocessing [optional]
|
| 98 |
-
|
| 99 |
-
[More Information Needed]
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
#### Training Hyperparameters
|
| 103 |
-
|
| 104 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 105 |
-
|
| 106 |
-
#### Speeds, Sizes, Times [optional]
|
| 107 |
-
|
| 108 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 109 |
-
|
| 110 |
-
[More Information Needed]
|
| 111 |
-
|
| 112 |
-
## Evaluation
|
| 113 |
-
|
| 114 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 115 |
-
|
| 116 |
-
### Testing Data, Factors & Metrics
|
| 117 |
-
|
| 118 |
-
#### Testing Data
|
| 119 |
-
|
| 120 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 121 |
-
|
| 122 |
-
[More Information Needed]
|
| 123 |
-
|
| 124 |
-
#### Factors
|
| 125 |
-
|
| 126 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 127 |
-
|
| 128 |
-
[More Information Needed]
|
| 129 |
-
|
| 130 |
-
#### Metrics
|
| 131 |
-
|
| 132 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 133 |
-
|
| 134 |
-
[More Information Needed]
|
| 135 |
-
|
| 136 |
-
### Results
|
| 137 |
-
|
| 138 |
-
[More Information Needed]
|
| 139 |
-
|
| 140 |
-
#### Summary
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
## Model Examination [optional]
|
| 145 |
-
|
| 146 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 147 |
-
|
| 148 |
-
[More Information Needed]
|
| 149 |
-
|
| 150 |
-
## Environmental Impact
|
| 151 |
-
|
| 152 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 153 |
-
|
| 154 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 155 |
-
|
| 156 |
-
- **Hardware Type:** [More Information Needed]
|
| 157 |
-
- **Hours used:** [More Information Needed]
|
| 158 |
-
- **Cloud Provider:** [More Information Needed]
|
| 159 |
-
- **Compute Region:** [More Information Needed]
|
| 160 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 161 |
-
|
| 162 |
-
## Technical Specifications [optional]
|
| 163 |
-
|
| 164 |
-
### Model Architecture and Objective
|
| 165 |
-
|
| 166 |
-
[More Information Needed]
|
| 167 |
-
|
| 168 |
-
### Compute Infrastructure
|
| 169 |
-
|
| 170 |
-
[More Information Needed]
|
| 171 |
-
|
| 172 |
-
#### Hardware
|
| 173 |
-
|
| 174 |
-
[More Information Needed]
|
| 175 |
-
|
| 176 |
-
#### Software
|
| 177 |
-
|
| 178 |
-
[More Information Needed]
|
| 179 |
-
|
| 180 |
-
## Citation [optional]
|
| 181 |
-
|
| 182 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 183 |
-
|
| 184 |
-
**BibTeX:**
|
| 185 |
-
|
| 186 |
-
[More Information Needed]
|
| 187 |
-
|
| 188 |
-
**APA:**
|
| 189 |
-
|
| 190 |
-
[More Information Needed]
|
| 191 |
-
|
| 192 |
-
## Glossary [optional]
|
| 193 |
-
|
| 194 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 195 |
-
|
| 196 |
-
[More Information Needed]
|
| 197 |
-
|
| 198 |
-
## More Information [optional]
|
| 199 |
-
|
| 200 |
-
[More Information Needed]
|
| 201 |
-
|
| 202 |
-
## Model Card Authors [optional]
|
| 203 |
-
|
| 204 |
-
[More Information Needed]
|
| 205 |
-
|
| 206 |
-
## Model Card Contact
|
| 207 |
-
|
| 208 |
-
[More Information Needed]
|
| 209 |
-
### Framework versions
|
| 210 |
-
|
| 211 |
-
- PEFT 0.18.1
|
|
|
|
| 10 |
- transformers
|
| 11 |
- trl
|
| 12 |
- unsloth
|
| 13 |
+
license: cc-by-4.0
|
| 14 |
+
datasets:
|
| 15 |
+
- mmmikolajczak/st312-data
|
| 16 |
+
language:
|
| 17 |
+
- en
|
| 18 |
+
model-index:
|
| 19 |
+
- name: FinLM-Reasoning
|
| 20 |
+
results:
|
| 21 |
+
- task:
|
| 22 |
+
type: text-generation
|
| 23 |
+
name: Financial numerical reasoning
|
| 24 |
+
dataset:
|
| 25 |
+
name: FinTest
|
| 26 |
+
type: fintest
|
| 27 |
+
metrics:
|
| 28 |
+
- name: All tasks
|
| 29 |
+
type: aggregate_score
|
| 30 |
+
value: 48.55
|
| 31 |
+
- name: Held-out tasks
|
| 32 |
+
type: held_out_aggregate_score
|
| 33 |
+
value: 54.95
|
| 34 |
+
- name: Numerical reasoning
|
| 35 |
+
type: numerical_reasoning_aggregate_score
|
| 36 |
+
value: 78.00
|
| 37 |
---
|
| 38 |
|
| 39 |
+
# FinLM-Reasoning
|
| 40 |
|
| 41 |
+
**FinLM-Reasoning is an open financial reasoning model built to bring frontier-level numerical finance performance to teams that need accuracy, transparency, and low inference cost.**
|
| 42 |
|
| 43 |
+
Financial workflows are moving from keyword search and brittle pipelines to AI agents that can read filings, reason over tables, perform multi-step calculations, and answer domain-specific financial questions. FinLM-Reasoning is designed for that future: a finance-specialized reasoning model optimized for numerical QA, table reasoning, and calculation-heavy financial workflows.
|
| 44 |
|
| 45 |
+
## Models
|
| 46 |
|
| 47 |
+
| Model | Link | Best for |
|
| 48 |
+
|---|---|---|
|
| 49 |
+
| FinLM-31B | https://huggingface.co/marco-molinari/FinLM-31B | General financial NLP, financial QA, filing analysis, summarization, classification, and broad finance workflows |
|
| 50 |
+
| FinLM-Reasoning | https://huggingface.co/marco-molinari/FinLM-Reasoning | Numerical financial reasoning, table QA, multi-step calculations, FinQA, ConvFinQA, and TAT-QA-style tasks |
|
| 51 |
|
| 52 |
+
## Why FinLM-Reasoning
|
| 53 |
|
| 54 |
+
- **Frontier-level financial reasoning:** FinLM-Reasoning reaches the top score on the FinTest numerical reasoning aggregate among evaluated models.
|
| 55 |
+
- **Built for calculation-heavy finance tasks:** Optimized for numerical QA, table reasoning, financial statement analysis, and multi-step financial calculations.
|
| 56 |
+
- **GRPO-optimized checkpoint:** FinLM-Reasoning is trained from FinLM-31B and further optimized for numerical financial reasoning with GRPO.
|
| 57 |
+
- **Open and practical:** Designed to offer strong reasoning performance at materially lower inference cost than large closed-source frontier systems.
|
| 58 |
+
- **Multimodal-ready foundation:** Built from a multimodal base model and validated on extractive QA over rendered SEC filings.
|
| 59 |
|
| 60 |
+
## Headline results
|
| 61 |
|
| 62 |
+
| Model | All FinTest tasks | Held-out tasks | Financial reasoning |
|
| 63 |
+
|---|---:|---:|---:|
|
| 64 |
+
| FinLM-31B | 52.79 | 65.94 | 65.00 |
|
| 65 |
+
| FinLM-Reasoning | 48.55 | 54.95 | 78.00 |
|
| 66 |
+
| Gemma-4-31B base | 43.79 | 46.44 | 41.33 |
|
| 67 |
+
| GPT-5.5 | 52.31 | 54.24 | 66.78 |
|
| 68 |
+
| Gemini 3 Flash | 53.91 | 60.63 | 56.18 |
|
| 69 |
+
| Claude Opus 4.7 | 55.97 | 59.91 | 72.80 |
|
| 70 |
|
| 71 |
+
Scores are percentages. Numerical reasoning aggregates FinQA, TAT-QA, and ConvFinQA.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
+
## When to use which model
|
| 74 |
|
| 75 |
+
Use **FinLM-31B** when you need the strongest general financial model across a wide range of tasks.
|
| 76 |
|
| 77 |
+
Use **FinLM-Reasoning** when your workload is calculation-heavy, such as financial table QA, multi-step numerical questions, or reasoning over earnings reports.
|
|
|
|
|
|
|
| 78 |
|
| 79 |
+
## Example use cases
|
| 80 |
|
| 81 |
+
- Financial table QA
|
| 82 |
+
- Multi-step financial calculations
|
| 83 |
+
- Numerical reasoning over earnings reports
|
| 84 |
+
- Filing and earnings-call analysis
|
| 85 |
+
- Financial question answering
|
| 86 |
+
- KPI and metric extraction
|
| 87 |
+
- Analyst workflow automation
|
| 88 |
+
- Financial research assistants
|
| 89 |
+
- Risk and compliance research workflows
|
| 90 |
+
- Benchmarking financial AI systems
|
| 91 |
|
| 92 |
+
## Responsible use
|
| 93 |
|
| 94 |
+
FinLM models are research and development tools. They should not be used as the sole basis for investment decisions, credit decisions, lending decisions, insurance decisions, legal conclusions, regulatory filings, fraud accusations, or consumer financial advice.
|
| 95 |
|
| 96 |
+
For production use, we recommend human review, audit logs, domain-specific evaluation, bias testing, and validation against authoritative financial sources.
|
| 97 |
|
| 98 |
+
## Citation
|
| 99 |
+
```
|
| 100 |
|
| 101 |
+
@misc{finlm_suite_2026,
|
| 102 |
+
title = {The FinLM Suite: Pushing the Limits of Open Source Financial Language Modeling},
|
| 103 |
+
author = {Marco Molinari, Mateusz Mikolajczak, Luca Imeneo, Alvise Sembenico, Deasy Darlene Tunas, Saharsha Navani},
|
| 104 |
+
year = {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