CoolFace
Modelpublic

Josephgflowers/Phinance-Phi-4-mini-instruct-finance-v0.4-with-reasoning-gguf

sourceHugging Facemitupdated 11mo agoView on Hugging Face
0likes155downloads
Model Card

image/png

Phinance-Phi-4-mini-instruct-finance-v0.4-with-reasoning

Overview

Phinance-Phi-4-mini-instruct-finance-v0.4-with-reasoning is a compact, fine-tuned model built on top of microsoft/Phi-4-mini-instruct with a strong emphasis on structured financial reasoning and instruction-following. This release blends financial QA, reasoning chains, and RAG-ready formatting into a lightweight agent optimized for advanced finance applications.

This model is particularly good at producing structured outputs like JSON, following instruction patterns, and chaining logical steps when prompted with tags like <thinking> or <think>. This model also outperforms the base models on multi language capabilities.


πŸ”„ Latest Training Run: Finance Curriculum Reasoning Expansion

After v0.4, the model was further fine-tuned on newly released multilingual finance reasoning datasets, explicitly targeting real-world coverage gaps in non-English finance QA:

This training phase addressed:

  • β€”Conceptual reasoning and QA coherence across 60+ languages
  • β€”Robustness to diverse phrasing, financial domains, and real-world curriculum topics
  • β€”Further reduction of hallucinations and improved answer structure, especially for small and mid-sized LMs in non-English settings

Model Workflow & Training Strategy

1. Initial Fine-Tune

2. Back Merge

  • β€”Model was merged back with Phi-4-mini-instruct to retain broad instruction capability.

3. Reasoning Augmentation

  • β€”Generated question-answer sets from Finance-Instruct-500k using reasoning system prompts
  • β€”Filtered for format quality and signal-to-noise ratio
  • β€”Trained again on: generated reasoning dataset, LIMO, Fin01

4. Final Merge

  • β€”Merged with Phi-4-mini-reasoning to strengthen chain-of-thought behavior

5. Reason Pass

  • β€”Trained on:
  • β€”Filtered reasoning subset of self-generated 500k QA set
  • β€”Cortex-1 Market Analysis
  • β€”LIMO
  • β€”Fin01

6. Finance Curriculum Reasoning Expansion (NEW)


Key Capabilities

  • β€”Financial Reasoning: Great at multi-step reasoning across investment strategies, reports, and economic topics
  • β€”Instruction Following: Precise response formatting with few-shot or system messages
  • β€”Multi-Turn Dialogues: Maintains context across long conversations
  • β€”Structured Output: NER, parsing, and tagging tasks return valid JSON by default
  • β€”RAG-Compatible: Handles prepended external context in the user field
  • β€”Tag-Aware: Supports <thinking> tags to guide reasoning chains
  • β€”Multilingual Finance QA: Expanded coverage in 60+ languages for curriculum-based financial topics

Usage Tips

  • β€”Use system messages like:

You are a financial assistant that explains your reasoning step by step. Use <thinking>...</thinking> to wrap your reasoning.
  • β€”Expect JSON-style outputs for tasks like:
  • β€”Entity extraction
  • β€”Address parsing
  • β€”XBRL tagging

Example

json
{
"system": "You are a financial reasoning assistant. Use <thinking> to show your steps.",
"user": "<context>ABC Inc reported a quarterly revenue increase of 12% while cutting debt by 8%</context>\nWhat does this indicate about the company’s short-term stability?",
"assistant": "<thinking>This revenue increase suggests improved sales or pricing power. Debt reduction enhances cash flow and reduces risk. Together, they signal improved short-term financial health.</thinking> It indicates strong short-term stability."
}

Model Details

  • β€”Base: Phi-4-mini-instruct
  • β€”Architecture: \~3.8B params (mini)
  • β€”Version: v0.4 + Multilingual Curriculum Reasoning Expansion
  • β€”License: MIT
  • β€”Framework: Hugging Face Transformers

Citation

bibtex
@model{josephgflowers2025phinancephi4,
  title={Phinance-Phi-4-mini-instruct-finance-v0.4-with-reasoning},
  author={Joseph G. Flowers},
  year={2025},
  url={https://huggingface.co/Josephgflowers/Phinance-Phi-4-mini-instruct-finance-v0.4-with-reasoning}
}