AI-MO/NuminaMath-CoT
Viewer • Updated • 860k • 60.2k • 577
How to use AITRADER/Amsi-fin-o1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="AITRADER/Amsi-fin-o1") # Load model directly
from transformers import AutoProcessor, AutoModelForImageTextToText
processor = AutoProcessor.from_pretrained("AITRADER/Amsi-fin-o1")
model = AutoModelForImageTextToText.from_pretrained("AITRADER/Amsi-fin-o1")How to use AITRADER/Amsi-fin-o1 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "AITRADER/Amsi-fin-o1"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "AITRADER/Amsi-fin-o1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/AITRADER/Amsi-fin-o1
How to use AITRADER/Amsi-fin-o1 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "AITRADER/Amsi-fin-o1" \
--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": "AITRADER/Amsi-fin-o1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "AITRADER/Amsi-fin-o1" \
--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": "AITRADER/Amsi-fin-o1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use AITRADER/Amsi-fin-o1 with Docker Model Runner:
docker model run hf.co/AITRADER/Amsi-fin-o1
A fine-tuned Qwen3-VL 4B model specialized for financial document understanding, chart analysis, and chain-of-thought reasoning.
Amsi-fin-o1 is a vision-language model fine-tuned for financial applications. It combines:
huihui-ai/Huihui-Qwen3-VL-4B-Thinking-abliteratedThe model was trained in 4 progressive stages:
| Stage | Focus | Steps | Learning Rate | Datasets |
|---|---|---|---|---|
| B1 | Financial Text | 1,200 | 8e-6 | FinTrain (70%), FinTrain-Math (15%), OCR (10%), ChartQA (5%) |
| B2 | Visual OCR | 1,500 | 8e-6 | MultiFinBen-OCR (50%), SecureFinAI-OCR (20%), ChartQA (20%), NuminaMath (10%) |
| B3 | Chain-of-Thought | 2,000 | 6e-6 | CoTA (50%), Program-CoTA (50%) |
| B4 | Mixed Fine-tuning | 1,200 | 6e-6 | All datasets combined |
bf16: true
full_finetune: true
per_device_train_batch_size: 1
gradient_accumulation_steps: 8
max_seq_length: 2048
target_context_length: 131072
rope_scaling_type: dynamic
rope_scaling_factor: 64.0
warmup_ratio: 0.03
weight_decay: 0.01
from transformers import AutoProcessor, AutoModelForVision2Seq
import torch
model_id = "AITRADER/Amsi-fin-o1"
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForVision2Seq.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
# For text-only queries
messages = [
{"role": "user", "content": "Analyze the following financial statement..."}
]
# For image + text queries
from PIL import Image
image = Image.open("financial_chart.png")
messages = [
{"role": "user", "content": [
{"type": "image", "image": image},
{"type": "text", "text": "What trends do you see in this chart?"}
]}
]
inputs = processor.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0], skip_special_tokens=True)
print(response)
Apache 2.0
@misc{amsi-fin-o1,
author = {AITRADER},
title = {Amsi-fin-o1: Financial Thinking Vision-Language Model},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/AITRADER/Amsi-fin-o1}
}
Base model
Qwen/Qwen3-VL-4B-Thinking