| license: other | |
| license_name: qwen | |
| license_link: https://huggingface.co/Qwen/Qwen3-VL-4B/blob/main/LICENSE | |
| tags: | |
| - qwen3_vl | |
| - image-to-text | |
| - vision-language-model | |
| - finance | |
| - OCR | |
| - chart-understanding | |
| - financial-analysis | |
| # Amsi-fin: Financial Vision-Language Model | |
| Fine-tuned Qwen3-VL-4B for financial document understanding, chart analysis, and financial reasoning. | |
| ## Quick Start | |
| ### MLX (Apple Silicon) | |
| ```python | |
| from mlx_vlm import load, generate | |
| # IMPORTANT: Use fix_mistral_regex=True | |
| model, processor = load('AITRADER/Amsi-fin', fix_mistral_regex=True) | |
| # Vision task | |
| output = generate( | |
| model, processor, | |
| image='chart.png', | |
| prompt='<|vision_start|><|image_pad|><|vision_end|>Analyze this chart.', | |
| max_tokens=500 | |
| ) | |
| # Text-only | |
| output = generate( | |
| model, processor, | |
| prompt='Calculate debt-to-equity ratio if debt=120M, equity=80M.', | |
| max_tokens=200 | |
| ) | |
| ``` | |
| ### Transformers (CUDA/CPU) | |
| ```python | |
| from transformers import AutoProcessor, AutoModelForVision2Seq | |
| import torch | |
| processor = AutoProcessor.from_pretrained('AITRADER/Amsi-fin', trust_remote_code=True) | |
| model = AutoModelForVision2Seq.from_pretrained( | |
| 'AITRADER/Amsi-fin', | |
| torch_dtype=torch.bfloat16, | |
| trust_remote_code=True | |
| ) | |
| ``` | |
| ## Capabilities | |
| - Financial Document OCR | |
| - Chart/Graph Understanding | |
| - Financial Reasoning & Calculations | |
| - Table Extraction | |
| ## Training Data | |
| - FinTrain (Salesforce) | |
| - MultiFinBen-EnglishOCR | |
| - ChartQA | |
| - FinCoT | |