Qwen-2.5-3B-QLORA / README.md
rohan-bansode's picture
Update README.md
05e9366 verified
|
Raw
History Blame Contribute Delete
1.97 kB
metadata
base_model: mlx-community/Qwen2.5-3B-Instruct-4bit
language:
  - en
license: apache-2.0
license_name: qwen-research
license_link: https://huggingface.co/Qwen/Qwen2.5-3B-Instruct/blob/main/LICENSE
pipeline_tag: text-generation
tags:
  - finance
  - financial-analysis
  - mlx
  - qlora
  - transformers
  - qwen
library_name: mlx
datasets:
  - FinanceMTEB/financial_phrasebank
  - ChanceFocus/flare-finqa
  - ChanceFocus/flare-convfinqa
  - ChanceFocus/flare-tatqa
  - ChanceFocus/flare-headlines
  - ChanceFocus/flare-ner
  - gbharti/finance-alpaca

Qwen 2.5 3B QLoRA — Financial Reasoning Model

A fine-tuned version of Qwen 2.5 3B specialized in financial calculations (EBIT, EBITDA, EBITDAR) and multi-step numerical reasoning over structured inputs.


Quick Start

Install

pip install mlx-lm

Run Inference

from mlx_lm import load, stream_generate

model, tokenizer = load("rohan-bansode/Qwen-2.5-3B-QLORA")

prompt = """
Analyze:
Revenue = 500k
Operating Expenses = 350k
Rent = 50k

Calculate EBITDAR and explain.
"""

stop_sequences = ["<|endoftext|>", "<|im_end|>", "Human:", "Assistant:"]

print("--- Financial Sandbox Output ---")

for response in stream_generate(model, tokenizer, prompt, max_tokens=512):
    if any(stop in response.text for stop in stop_sequences):
        break
    print(response.text, end="", flush=True)

Example Output

EBITDAR = 200k

Explanation:
EBITDAR = Revenue - Operating Expenses + Rent
= 500k - 350k + 50k = 200k

What this model is good at

  • Financial reasoning (EBIT, EBITDA, EBITDAR)
  • Multi-step numerical calculations
  • Structured financial Q&A

Limitations

  • Not reliable for real financial decisions
  • Can make calculation mistakes if prompt is unclear
  • Limited context (~1.5k tokens)

Improvements over base model

  • More consistent financial calculations
  • Better step-by-step reasoning for numerical tasks
  • Reduced hallucination in structured financial prompts