coslinedev/Qwen2.5-3B-FinCode-Reasoning-Full
coslinedev/Qwen2.5-3B-FinCode-Reasoning-Full is an experimental 3 billion parameter language model, fine-tuned from Qwen/Qwen2.5-3B-Instruct by coslinedev. Engineered using Unsloth, this model specializes in generating executable Python code for quantitative financial modeling, accounting boundary checks, and algorithmic calculations. It is designed to delegate exact arithmetic logic to an external Python execution sandbox, bypassing direct LLM numerical hallucinations.
Loading preview...
Overview
coslinedev/Qwen2.5-3B-FinCode-Reasoning-Full is a specialized 3 billion parameter language model, fine-tuned from Qwen/Qwen2.5-3B-Instruct by coslinedev. This model is specifically engineered to generate executable Python code for complex financial tasks, including quantitative financial modeling, accounting boundary checks, and algorithmic calculations. It leverages an external Python execution sandbox to handle precise arithmetic, effectively mitigating common LLM "hallucinations" in numerical reasoning.
Key Capabilities
- Financial Code Generation: Generates clean, executable Python code for financial engineering problems (e.g., Double Declining Balance depreciation, Black-Scholes pricing, WACC calculations).
- Boundary Constraint Handling: Fine-tuned to enforce strict business logic and boundary conditions within the generated code.
- Hardware-Friendly: With a 3B parameter footprint, it requires approximately 6-8 GB VRAM in float16, making it suitable for deployment on accessible hardware like Google Colab T4 GPUs.
- Hallucination Mitigation: Delegates exact arithmetic to an isolated Python execution sandbox, ensuring mathematical correctness.
Performance Highlights
Preliminary benchmarks on 100 synthetic quantitative financial tasks show a 98.0% Code Pass Rate (Pass@1) and 99.5% Valid Syntax Rate, significantly outperforming the base Qwen2.5-3B-Instruct model (82.0% Pass@1, 85.0% Valid Syntax Rate) when evaluated through a Python execution sandbox.
Good for
- Developers and financial engineers needing to automate the generation of Python code for financial models.
- Research initiatives exploring domain-specific Supervised Fine-Tuning (SFT) for local LLMs.
- Applications requiring robust, executable code for financial calculations where numerical accuracy is paramount.