File size: 8,332 Bytes
c76f7af 32732a5 c76f7af 4fd81df c76f7af 32732a5 c76f7af 32732a5 c76f7af |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
---
library_name: transformers
model_name: phinance-multi-uz-4
tags:
- generated_from_trainer
- trl
- sft
- finance
licence: license
datasets:
- behbudiy/alpaca-cleaned-uz
- yakhyo/uz-news
- yakhyo/uz-wiki
- Josephgflowers/Finance_Curriculum_Edu_English
- Josephgflowers/Finance-Curriculum-Edu-Uzbek
language:
- en
- uz
- ar
base_model:
- microsoft/Phi-4-mini-instruct
license: mit
---
# Phinance-Phi-4-mini-instruct-finance-uzbek-multilingual-v1: Uzbek Finance Instruction LLM
---
\

## 🚀 Model Highlights
* **Major upgrade over [phi-4-mini-instruct](https://huggingface.co/microsoft/phi-4-mini-instruct):**
Achieves *dramatically better* reasoning, accuracy, and Uzbek language ability—especially for financial Q\&A, reasoning, entity extraction, tabular math, and functional NLP tasks.
* **Instruction-tuned for finance in multiple languages with a focus on Uzbek and English**
Excels at Q\&A, reasoning, table and JSON parsing, translation, summarization, and more.
* **Robust out-of-the-box performance:**
Tested examples below use a general finance expert system prompt, but *many tasks will perform even better with specialized system prompts* (e.g., NER, parsing, etc.).
---
## 🏦 Example Capabilities
> *All outputs below were generated with a general system prompt. For even higher accuracy on structured/NLP tasks, use a specialized system message for the target task.*
### Q\&A (Uzbek)
**Savol:** Diversifikatsiya nima va u sarmoyador uchun nima uchun muhim?
**Javob:** Diversifikatsiya – bu sarmoyadorning investitsiya portfelini bir nechta turli aktivlarga tarqatish amaliyotidir. Bu sarmoyadorning xavfini kamaytirish va daromadlarini oshirish uchun investitsiyalarni turli xil investitsiya vositalariga tarqatishni o‘z ichiga oladi.
---
### Tabular Math & Reasoning
**Prompt:**
Siz bankdan 10 million so‘m miqdorida kredit olmoqchisiz. Kredit muddati 2 yil, yillik foiz stavkasi 18%. Siz har oy bir xil miqdorda to‘lov qilasiz. Har oylik to‘lov miqdorini qanday hisoblash mumkin?
**Model:**
Avvalo, kreditning umumiy summasi va foiz stavkasini aniqlang...
A = 10 000 000 × 0.015 × (1 + 0.015)^24 / ((1 + 0.015)^24 - 1)
Natijada, har oy to‘lov miqdori taxminan 470 000 so‘m bo‘ladi.
---
### Functional Tasks (Entity Extraction, JSON, Summarization, Data Cleaning)
**Prompt:**
Quyidagi matndan barcha nomlangan entitetlarni ajratib, har birini tasniflang: \[Kompaniya, Moliyaviy mahsulot, Qonun, Shaxs, Joy, Sana, Miqdor]\nMatn: 10-iyul kuni O‘zbekiston Banki yangi “Yashil ipoteka” dasturini ishga tushirdi, bu Markaziy bankning 2024-03-sonli Qoidalariga muvofiq.
**Model:**
1. Kompaniya: O‘zbekiston Banki
2. Moliyaviy mahsulot: Yashil ipoteka dasturi
3. Qonun: Markaziy bankning 2024-03-sonli Qoidalari
4. Sana: 10-iyul
---
**Prompt:**
Quyidagi moliyaviy hisobot xulosasini quyidagi maydonlarga ega JSON formatiga o‘tkazing: "kompaniya", "chorak", "daromad", "xarajatlar", "sof foyda".
**Matn:** 2024-yil 2-chorakda “Silk Road Telecom” jami daromadi 32 mln dollar, xarajatlari 27 mln dollar va sof foydasi 5 mln dollar bo‘ldi.
**Model:**
```json
{
"kompaniya": "Silk Road Telecom",
"chorak": "2024-yil 2-chorak",
"daromad": 32000000,
"xarajatlar": 27000000,
"sof foyda": 5000000
}
```
---
**Prompt:**
Quyidagi kompaniya nomlari ro‘yxatini tozalang va standart ko‘rinishga keltiring, dublikatlarni olib tashlang va har birini to‘g‘ri harf bilan yozing:\nalfa bank, Alfa Bank, ALFA bank, delta insurance, Delta Insurance, DELTA INSURANCE
**Model:**
* Alfa Bank
* Delta Insurance
---
### Bilingual & Instruction Following
**Prompt:**
Bankda depozit ochishning asosiy afzalliklari nimalardan iborat? Iltimos, avval javobni o‘zbek tilida yozing, so‘ngra ingliz tiliga tarjima qiling.
**Model:**
O‘zbek tilida: ...
Ingliz tilida: ...
---
# Real-World Example: Bilingual Financial Q\&A
**Prompt:**
Bankda depozit ochishning asosiy afzalliklari nimalardan iborat? Iltimos, avval javobni o‘zbek tilida yozing, so‘ngra ingliz tiliga tarjima qiling.
---
**Model Output:**
### O‘zbek tilida:
1. **Xavfsizlik**: Depozitlar bank tomonidan himoyalangan bo‘lib, pulingiz xavfsiz saqlanadi.
2. **Foizlar**: Banklar depozitlarga foiz to‘laydilar, bu sizga pulingizni uzoq muddat saqlashda qo‘shimcha daromad olishingizga yordam beradi.
3. **Likvidlik**: Depozitlar odatda bankka kirish mumkin bo‘lgan puldir, shuning uchun siz kerak bo‘lganda pulingizni tezda olish imkoniyatiga ega bo‘lasiz.
4. **Rejalashtirish imkoniyati**: Depozitlar sizga moliyaviy maqsadlaringizni rejalashtirish va moliyaviy barqarorlikni ta'minlashda yordam beradi.
5. **Kredit olish imkoniyati**: Ba'zi banklar depozitlar orqali kreditlar olish imkoniyatini taklif qiladi, bu sizga moliyaviy ehtiyojlaringizni qondirishda yordam beradi.
### Ingliz tilida:
1. **Security**: Deposits are protected by the bank, ensuring that your money is safe.
2. **Interest**: Banks pay interest on your deposits, helping you earn additional income while keeping your money safe for a longer period.
3. **Liquidity**: Deposits are usually cash that can be accessed easily, allowing you to retrieve your money whenever you need it.
4. **Planning**: Deposits help you plan your financial goals and maintain financial stability.
5. **Credit Access**: Some banks offer the ability to obtain credit through deposits, helping you meet your financial needs.
---
## 🏋️ Training Details
* **Base Model:** [microsoft/phi-4-mini-instruct](https://huggingface.co/microsoft/phi-4-mini-instruct)
* **LoRA/PEFT fine-tuning:** Efficient adaptation for resource-constrained hardware
* **Datasets used:**
* [Finance-Instruct-500k](https://huggingface.co/datasets/Josephgflowers/Finance-Instruct-500k) (English/Chinese/other)
* Uzbek news, Wikipedia, and finance filtered corpora
* Multi-language and translation QA datasets (Uzbek focus)
* Functional datasets: entity extraction, JSON parsing, summarization, tabular math
* yakhyo/uz-news
* yakhyo/uz-wiki
* behbudiy/alpaca-cleaned-uz
* Josephgflowers/Finance_Curriculum_Edu_English
* Josephgflowers/Finance-Curriculum-Edu-Uzbek
* **Sequence length:** 4096 tokens
* **Batching:** 4 grad accumulation, per-device batch 1
* **Learning rate:** 2e-4
---
## ✅ Intended Use Cases
* Financial Q\&A and knowledge base in Uzbek and English
* Financial modeling, calculations, and reasoning in Uzbek
* Automated financial document analysis (entity extraction, parsing, summarization)
* Bilingual education, content creation, and translation for Uzbek finance
---
## ⚠️ Limitations & Warnings
* Not a substitute for licensed financial/legal advice
* Tabular/math accuracy may still lag specialized English LLMs for highly complex cases
* Not suitable for real-time financial trading or compliance decisions
* May occasionally hallucinate facts or calculations—always check outputs for critical use!
---
## 📈 Benchmarks / Example Comparisons
**Dramatic performance improvement over base phi-4-mini-instruct:**
* *Base model* produces garbled, repetitive, or nonsensical Uzbek on financial and reasoning tasks
* *Phinance-Phi-4-mini-instruct-finance-uzbek-multilingual-v1* generates concise, accurate, professional Uzbek
---
## 👤 Author & Attribution
Created by [Josephgflowers](https://huggingface.co/Josephgflowers)
Special thanks to the open-source LLM and Uzbek NLP community
---
## 📝 How to Cite
```
@misc{Phinance-Phi-4-mini-instruct-finance-uzbek-multilingual-v1,
author = {Joseph Flowers},
title = {Phinance-Phi-4-mini-instruct-finance-uzbek-multilingual-v1: Instruction-Tuned LLM for Uzbek Finance and Bilingual NLP},
year = {2024},
howpublished = {\url{https://huggingface.co/Josephgflowers/Phinance-Phi-4-mini-instruct-finance-uzbek-multilingual-v1}}
}
```
---
## 📬 Contact & Contributions
Open to feedback, dataset suggestions, or collaboration—open an issue or discussion on the [Hugging Face model page](https://huggingface.co/Josephgflowers/Phinance-Phi-4-mini-instruct-finance-uzbek-multilingual-v1) or message [Josephgflowers](https://huggingface.co/Josephgflowers).
---
*Model card last updated: 2024-07-29.* |