Financial Risk Clause Extractor (Phi-3-mini, QLoRA)

Extracts structured risk factors from corporate disclosure prose.

Input: a passage of filing-style text. Output: JSON listing each distinct risk with a category from a closed twelve-item taxonomy, its trigger, its potential impact, and a severity.

Taxonomy

market_risk, credit_risk, liquidity_risk, operational_risk, regulatory_risk, cybersecurity_risk, supply_chain_risk, concentration_risk, geopolitical_risk, technology_risk, litigation_risk, environmental_risk

Training

Base microsoft/Phi-3-mini-4k-instruct
Method QLoRA, 4-bit NF4 with double quantisation
LoRA r=16, alpha=32, dropout 0.05
Target modules qkv_proj, o_proj, gate_up_proj, down_proj
Data 120 synthetic examples, 96 train / 12 val / 12 test
Epochs 2, selected on validation loss
Hardware single Colab T4, 9 minutes

Validation loss decreased from 0.6284 to 0.6098 across two epochs. A 3-epoch run was tried first and showed validation loss rising at epoch 3 while training loss kept falling, so 2 was chosen on that evidence.

Training data was generated synthetically by a teacher model. Passages are invented, not real filings, and no real company is named.

Intended use

Built for a technical assessment. Not investment advice, and not validated for production use on real regulatory filings.

Repository

Full pipeline, dataset generation, diversity analysis and evaluation: https://github.com/Dinojan9901/CDAZZDEV-MLE-DINOJAN

Downloads last month
-
Safetensors
Model size
4B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Dino21/financial-risk-extractor-phi3-qlora

Adapter
(865)
this model