Update README.md
Browse files
README.md
CHANGED
|
@@ -3,56 +3,31 @@ base_model: microsoft/Phi-3-mini-4k-instruct
|
|
| 3 |
library_name: transformers
|
| 4 |
model_name: adapter
|
| 5 |
tags:
|
| 6 |
-
-
|
|
|
|
| 7 |
- sft
|
| 8 |
- trl
|
| 9 |
-
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Model Card
|
| 13 |
|
| 14 |
-
This model is a fine-tuned version of [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct).
|
| 15 |
-
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
```python
|
| 20 |
from transformers import pipeline
|
| 21 |
|
| 22 |
-
question = "
|
| 23 |
-
generator = pipeline("text-generation", model="
|
| 24 |
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
print(output["generated_text"])
|
| 26 |
-
```
|
| 27 |
-
|
| 28 |
-
## Training procedure
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
This model was trained with SFT.
|
| 34 |
-
|
| 35 |
-
### Framework versions
|
| 36 |
-
|
| 37 |
-
- TRL: 0.19.1
|
| 38 |
-
- Transformers: 4.53.1
|
| 39 |
-
- Pytorch: 2.6.0+cu124
|
| 40 |
-
- Datasets: 4.0.0
|
| 41 |
-
- Tokenizers: 0.21.2
|
| 42 |
-
|
| 43 |
-
## Citations
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
Cite TRL as:
|
| 48 |
-
|
| 49 |
-
```bibtex
|
| 50 |
-
@misc{vonwerra2022trl,
|
| 51 |
-
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
-
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
| 53 |
-
year = 2020,
|
| 54 |
-
journal = {GitHub repository},
|
| 55 |
-
publisher = {GitHub},
|
| 56 |
-
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
-
}
|
| 58 |
-
```
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
model_name: adapter
|
| 5 |
tags:
|
| 6 |
+
- financial-qa
|
| 7 |
+
- phi3-mini
|
| 8 |
- sft
|
| 9 |
- trl
|
| 10 |
+
- annual-reports
|
| 11 |
+
license: apache-2.0
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Model Card: phi3-mini-finance-nlp
|
| 15 |
|
| 16 |
+
This model is a fine-tuned version of [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) on financial document Q&A — trained on custom datasets consisting of Indian company annual reports and disclosures. It is tailored to handle **long-form financial questions** such as corporate strategy, CSR responsibilities, market capitalization insights, and board governance.
|
|
|
|
| 17 |
|
| 18 |
+
## 🔍 Use Case
|
| 19 |
+
|
| 20 |
+
This model can:
|
| 21 |
+
- Extract insights from annual reports.
|
| 22 |
+
- Answer questions on topics like CSR, supply chain, revenue breakdown, and director messages.
|
| 23 |
+
- Assist in financial document summarization and intelligent retrieval for policy/analysis.
|
| 24 |
+
|
| 25 |
+
## 🚀 Quick Start
|
| 26 |
|
| 27 |
```python
|
| 28 |
from transformers import pipeline
|
| 29 |
|
| 30 |
+
question = "What is the company's approach to CSR in the 2023 annual report?"
|
| 31 |
+
generator = pipeline("text-generation", model="sweatSmile/phi3-mini-finance-nlp", device="cuda")
|
| 32 |
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 33 |
print(output["generated_text"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|