jebish7 commited on
Commit
46acd5a
ยท
verified ยท
1 Parent(s): 51fef0f

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +293 -0
README.md ADDED
@@ -0,0 +1,293 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - hi
6
+ tags:
7
+ - multilingual
8
+ - instruction-tuning
9
+ - phi4
10
+ - efficiency
11
+ - hindi
12
+ datasets:
13
+ - 1024m/PHI-4-Hindi-Instruct-Data
14
+ model-index:
15
+ - name: Phi-4-Hindi
16
+ results:
17
+ - task:
18
+ type: text-generation
19
+ name: Text Generation
20
+ dataset:
21
+ name: MMLU Pro (5-Shot)
22
+ type: mmlu_pro
23
+ config: MMLU Pro
24
+ split: test
25
+ args:
26
+ num_few_shot: 5
27
+ metrics:
28
+ - type: acc
29
+ value: 52.39
30
+ name: accuracy
31
+ source:
32
+ url: >-
33
+ https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/1024m/PHI-4-Hindi/results_2025-02-06T05-43-08.878637.json
34
+ name: Open LLM Leaderboard
35
+ - task:
36
+ type: text-generation
37
+ name: Text Generation
38
+ dataset:
39
+ name: GPQA (0-Shot)
40
+ type: gpqa
41
+ config: GPQA
42
+ split: test
43
+ args:
44
+ num_few_shot: 0
45
+ metrics:
46
+ - type: acc
47
+ value: 39.77
48
+ name: accuracy (normalized)
49
+ source:
50
+ url: >-
51
+ https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/1024m/PHI-4-Hindi/results_2025-02-06T05-43-08.878637.json
52
+ name: Open LLM Leaderboard
53
+ - task:
54
+ type: text-generation
55
+ name: Text Generation
56
+ dataset:
57
+ name: MuSR (0-Shot)
58
+ type: musr
59
+ config: MuSR
60
+ split: test
61
+ args:
62
+ num_few_shot: 0
63
+ metrics:
64
+ - type: acc
65
+ value: 49.07
66
+ name: accuracy (normalized)
67
+ source:
68
+ url: >-
69
+ https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/1024m/PHI-4-Hindi/results_2025-02-06T05-43-08.878637.json
70
+ name: Open LLM Leaderboard
71
+ - task:
72
+ type: text-generation
73
+ name: Text Generation
74
+ dataset:
75
+ name: Big Bench Hard (3-Shot)
76
+ type: bbh
77
+ config: Big Bench Hard
78
+ split: test
79
+ args:
80
+ num_few_shot: 3
81
+ metrics:
82
+ - type: acc
83
+ value: 66.97
84
+ name: accuracy (normalized)
85
+ source:
86
+ url: >-
87
+ https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/1024m/PHI-4-Hindi/results_2025-02-06T05-43-08.878637.json
88
+ name: Open LLM Leaderboard
89
+ - task:
90
+ type: text-generation
91
+ name: Text Generation
92
+ dataset:
93
+ name: Math HARD (4-Shot)
94
+ type: math_hard
95
+ config: Math Hard
96
+ split: test
97
+ args:
98
+ num_few_shot: 4
99
+ metrics:
100
+ - type: acc
101
+ value: 23.11
102
+ name: accuracy (exact match)
103
+ source:
104
+ url: >-
105
+ https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/1024m/PHI-4-Hindi/results_2025-02-06T05-43-08.878637.json
106
+ name: Open LLM Leaderboard
107
+ ---
108
+ # Phi-4-Hindi
109
+
110
+ Phi-4-Hindi is a 14.7B parameter pre-trained and instruction-tuned bilingual large language model for both Hindi and English,
111
+ trained on a mixed language dataset.
112
+
113
+ - ~1% better performance on English Tasks compared to the original (average benchmark scores)
114
+ - ~4% better performance on Hindi Tasks compared to the original (average benchmark scores)
115
+ - ~10% less emissions than the original (as reported on benchmark evaluations like open-llm-leaderboard)
116
+ - Less Biases due to ordering of choices while answering MCQs
117
+
118
+ ### Model Details:
119
+
120
+ - **Developed by:** [Traversaal.ai](https://huggingface.co/large-traversaal), [1-800-LLMs](https://huggingface.co/1-800-LLMs)
121
+ - **Language(s) (NLP):** Optimized for Hindi and English
122
+ - **License:** Apache 2.0
123
+ - **Paper :** TBA April 15
124
+
125
+ ## Intended Use
126
+
127
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
128
+ We release Phi-4-Hindi under the Apache 2.0 license, encouraging researchers, developers, and enterprises to experiment with and build upon the model, particularly for bilingual, multilingual and non-English applications.
129
+ At the time of release, the model demonstrated state-of-the-art performance across an extensive English and Hindi evaluation suite.
130
+
131
+ Some potential downstream applications are as follows:
132
+ - *Research*: This model serves as a valuable tool for researchers and developers working in NLP.
133
+ - *Commercial Use*: It can be utilized as a foundational model for fine-tuning to meet specific industry needs.
134
+ Possible applications include:
135
+ - AI-powered Chat Assistants
136
+ - Customer Support Service
137
+ - Educational tools for language learning
138
+
139
+ Target audiences who may benefit from our model:
140
+ - *Academics*: Researchers focused on Hindi and multilingual NLP advancements.
141
+ - *Businesses*: Companies catering to Hindi-speaking and bilingual users.
142
+ - *Developers*: Those integrating Hindi language capabilities into applications and services.
143
+ - *Educational Institutions*: Schools and universities developing AI-powered learning tools.
144
+
145
+ ### Prompt Formats
146
+
147
+ | Task | Input Format |
148
+ |--------------------------------|---------------------------------------------------------|
149
+ | Natural Language Inference | "`Text1 ### Text2 ### NLI ###`" |
150
+ | Multiple Choice Questions | "`Question ### A) a, B) b,... ### MCQ ###`" |
151
+ | Numeric Questions | "`Question ### NUMERIC ###`" |
152
+ | Boolean Questions | "`Question ### BOOLEAN ###`" |
153
+ | Questions seeking Long responses | "`Question ### LONG RESPONSE ###`" |
154
+ | Short responses (few words) | "`Input ### DIRECT RESPONSE ###`" |
155
+ | Coding | "`Input ### CODE ###`" |
156
+ | Text Summarization | "`Input ### SUMMARIZE ###`" |
157
+ | Paraphrasing/Rephrasing | "`Input ### PARAPHRASE ###`" |
158
+ | Translation to specified language | "`Input ### TRANSLATION [lang] ###`" |
159
+ | Text Simplification/ELI5 | "`Input ### SIMPLIFY ###`" |
160
+
161
+ The following prompt formats were used during training and are better suited for usage, however the model works well even without such formatting
162
+
163
+ ### Out-of-Scope Use
164
+
165
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
166
+
167
+ While Phi-4-Hindi is a powerful bilingual model designed for Hindi and English, it is crucial to acknowledge its limitations and the potential for misuse. The model must not be used in ways that violate any applicable laws or regulations. Below are specific scenarios where its use is restricted:
168
+
169
+ - *Harmful or Malicious Use*: The model should not be employed to create or distribute harmful, misleading, or inappropriate content, including but not limited to:
170
+ - Encouraging hate speech, violence, or discrimination
171
+ - Spreading misinformation or false narratives
172
+ - Facilitating or promoting illegal activities
173
+
174
+ - *Sensitive Data Handling*: The model is not designed to process or generate personal, confidential, or sensitive information.
175
+
176
+ - *Language Constraints*: While optimized for Hindi and English, the model should not be assumed to have the same proficiency in other languages.
177
+
178
+ - *High-Risk Decision-Making*: It should not be used for critical decision-making without human oversight, especially in medical, legal, financial, or safety-related contexts.
179
+
180
+ ## Bias, Risks, and Limitations
181
+
182
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
183
+
184
+ <!-- The model is trained on publicly available data which was in part curated by Inception. -->
185
+ While efforts have been made to minimize biases, it is likely that the model, as with all LLM models, will exhibit some bias.
186
+
187
+ The model is trained as an AI assistant for Hindi and English speakers. The model is limited to produce responses for queries in these two languages
188
+ and may not produce appropriate responses to other language queries.
189
+
190
+ By using this model, you acknowledge and accept that, as with any large language model, it may generate incorrect, misleading and/or offensive information or content.
191
+ The information is not intended as advice and should not be relied upon in any way, nor are we responsible for any of the content or consequences resulting from its use.
192
+ We are continuously working to develop models with greater capabilities, and as such, welcome any feedback on the model~~
193
+
194
+ ## Evaluation:
195
+ We evaluated our models on multiple well-known benchmarks to measure their effectiveness against other leading models, and the results are as follows:
196
+
197
+ | Model | ARC-C | ARC-E | BoolQ | CMCQ | MMLU | Average* | MMLU-Pro | GPQA | MuSR | BBH | MATH-Hard |
198
+ |---------------------------------|-------|-------|-------|-------|-------|----------|----------|------|-------|-------|-------|
199
+ | AryaBhatta-GemmaUltra-8.5B | 22.70 | 25.04 | 22.95 | 62.23 | 23.70 | 31.32 | 22.66 | 25.34| 42.72 | 41.12 | 2.95 |
200
+ | Airavata-7B | 25.09 | 30.47 | 25.31 | 62.17 | 33.20 | 35.25 | 16.35 | 27.43| 37.57 | 36.00 | 13.60 |
201
+ | sarvam-1-2B | 30.03 | 33.25 | 62.17 | 42.80 | 27.90 | 39.23 | - | - | - | - | - |
202
+ | Nemotron-4-Mini-Hindi-Instruct | 55.80 | 71.63 | 62.11 | 68.10 | 43.20 | 60.17 | 25.95 | 30.87| 41.53 | 40.11 | 2.04 |
203
+ | Llama-3-Nanda-10B-Chat | 65.36 | 80.64 | 82.29 | 67.60 | 50.61 | 69.30 | 31.57 | 30.12| 43.52 | 49.38 | 5.59 |
204
+ | Krutrim-2-12b-instruct | 67.32 | 81.10 | 84.74 | 76.30 | 56.10 | 73.11 | - | - | - | - | - |
205
+ | aya-expanse-8b | 74.06 | 87.08 | 86.45 | 83.30 | 56.89 | 77.56 | 30.04 | 30.29| 37.17 | 49.42 | 7.02 |
206
+ | aya-expanse-32B | 85.41 | **95.08** | **90.43** | 89.80 | 69.71 | 86.08 | 41.30 | 32.55| 38.62 | 56.29 | 13.37 |
207
+ | **Our Qwen Model (14b)** | 90.61 | 94.82 | 88.53 | **90.70** | 75.00 | 87.93 | **52.63** | 36.24 | 44.84 | 64.97 | **25.08** |
208
+ | **Our Phi Model (14b)** | **97.39** | 92.24 | 87.65 | 87.40 | **75.59** | **88.05** | 52.39 | **39.77** | **49.07** | **66.97** | 23.11 |
209
+
210
+ **Table 1: Metrics (.2f) of our models and other LLMs over several English benchmarks**
211
+
212
+ | Model | ARC-C | ARC-E | BoolQ | CMCQ | MMLU | Average |
213
+ |------------------------------------|-------|-------|-------|-------|-------|---------|
214
+ | AryaBhatta-GemmaUltra-8.5B | 22.70 | 25.08 | 22.95 | 62.17 | 23.80 | 31.34 |
215
+ | Airavata-7B | 22.87 | 25.13 | 23.28 | 62.17 | 33.20 | 33.33 |
216
+ | sarvam-1-2B | 32.76 | 35.06 | 62.16 | 47.10 | 24.22 | 40.26 |
217
+ | Llama-3-Nanda-10B-Chat | 45.99 | 60.56 | 71.96 | 54.70 | 36.35 | 53.91 |
218
+ | Nemotron-4-Mini-Hindi-4B-Instruct | 50.68 | 63.72 | 68.74 | 51.30 | 37.18 | 54.32 |
219
+ | Krutrim-2-12b-instruct | 56.83 | 70.66 | 78.86 | 64.10 | 46.51 | 63.39 |
220
+ | aya-expanse-8b | 57.42 | 72.90 | 80.42 | 69.00 | 43.39 | 64.63 |
221
+ | aya-expanse-32B | 73.29 | 85.48 | **87.73** | **79.70** | **56.96** | 76.63 |
222
+ | **Our Qwen Model (14b)** | 74.06 | 81.23 | 84.07 | 78.20 | 53.85 | 74.82 |
223
+ | **Our Phi Model (14b)** | **81.74** | **89.06** | 86.02 | 78.70 | 56.39 | **78.38** |
224
+
225
+ **Table 2: Metrics (.2f) of our models and other LLMs over several Hindi benchmarks**
226
+
227
+ | Benchmark | Lang | Qwen-2.5-14B-Instruct | Our Qwen | Change | Phi-4 | Our Phi | Change |
228
+ |----------------|------|----------------------|----------|--------|-------|---------|--------|
229
+ | ARC-Easy | En | 95.45 | 94.82 | ๐Ÿ”ป 0.63 | 97.31 | 97.39 | ๐Ÿ”ผ 0.08 |
230
+ | | Hi | 78.49 | 81.23 | ๐Ÿ”ผ 2.74 | 86.87 | 89.06 | ๐Ÿ”ผ 2.19 |
231
+ | ARC-Challenge | En | 90.87 | 90.61 | ๐Ÿ”ป 0.26 | 92.41 | 92.24 | ๐Ÿ”ป 0.17 |
232
+ | | Hi | 69.62 | 74.06 | ๐Ÿ”ผ 4.44 | 79.18 | 81.74 | ๐Ÿ”ผ 2.56 |
233
+ | BoolQ | En | 86.09 | 88.53 | ๐Ÿ”ผ 2.44 | 86.30 | 87.65 | ๐Ÿ”ผ 1.35 |
234
+ | | Hi | 78.89 | 84.07 | ๐Ÿ”ผ 5.18 | 82.72 | 86.02 | ๐Ÿ”ผ 3.30 |
235
+ | Context-MCQ | En | 91.20 | 90.70 | ๐Ÿ”ป 0.50 | 86.30 | 87.40 | ๐Ÿ”ผ 1.10 |
236
+ | | Hi | 77.40 | 78.20 | ๐Ÿ”ผ 0.80 | 75.70 | 78.70 | ๐Ÿ”ผ 3.00 |
237
+ | MMLU | En | 74.37 | 75.00 | ๐Ÿ”ผ 0.63 | 74.67 | 75.59 | ๐Ÿ”ผ 0.92 |
238
+ | | Hi | 52.16 | 53.85 | ๐Ÿ”ผ 1.69 | 53.24 | 56.39 | ๐Ÿ”ผ 3.15 |
239
+ | **Average** | En | **87.60** | **87.93**| ๐Ÿ”ผ 0.33 | **87.40** | **88.05** | ๐Ÿ”ผ 0.65 |
240
+ | | Hi | **71.31** | **74.82**| ๐Ÿ”ผ 3.51 | **75.54** | **78.38** | ๐Ÿ”ผ 2.84 |
241
+ | **Overall** | | **79.46** | **81.38**| ๐Ÿ”ผ 1.92 | **81.47** | **83.22** | ๐Ÿ”ผ 1.75 |
242
+
243
+ **Table 3: Performance of our models compared to originals over each benchmark : evals through log likelihoods**
244
+
245
+ | Benchmark | Lang | Qwen-2.5-14B-Instruct | Our Qwen | Change | Phi-4 | Our Phi | Change |
246
+ |----------------|------|----------------------|----------|---------|-------|---------|---------|
247
+ | MMLU-Pro | En | 49.04 | 52.63 | ๐Ÿ”ผ 3.59 | 53.78 | 52.39 | ๐Ÿ”ป 1.39 |
248
+ | MATH hard | En | 00.00 | 25.08 | N/A | 12.31 | 23.11 | ๐Ÿ”ผ 10.80 |
249
+ | GPQA | En | 32.21 | 36.24 | ๐Ÿ”ผ 4.03 | 33.72 | 39.77 | ๐Ÿ”ผ 6.05 |
250
+ | MuSR | En | 40.87 | 44.84 | ๐Ÿ”ผ 3.97 | 41.01 | 49.07 | ๐Ÿ”ผ 8.06 |
251
+ | BigBench-Hard | En | 63.74 | 64.97 | ๐Ÿ”ผ 1.23 | 68.60 | 66.97 | ๐Ÿ”ป 1.63 |
252
+ | **Average** | | **37.17** | **44.75**| ๐Ÿ”ผ 7.58 | **41.88** | **46.26** | ๐Ÿ”ผ 4.38 |
253
+
254
+ **Table 4: Performance of our models compared to originals over each benchmark : evals through eval-harness**
255
+
256
+ ### Recommendations
257
+
258
+ It is advisable for users to:
259
+ - Refrain from deploying the model in sensitive domains without human supervision.
260
+ - Cross-check factual information generated by the model for accuracy.
261
+ - Continuously assess the model to ensure compliance with ethical standards.
262
+ - Be mindful of potential biases and unintended outputs, especially in critical applications.
263
+
264
+ ### Emissions
265
+
266
+ We belive our usage of shorter and compressed instruction-reponse pairs in training resulted in the model responding in simplified manner while meeting the requirements/ arriving at the correct answers. Hence the better scores while reducing emissions.
267
+
268
+ Unlike distillation from reasoining or CoT models which produced unnecessarily long responses like "Next we proceed with...", "Ok lets do this...." during generation of step by step solutions of a math problem, we use only the step by step math part ignoring such fillers, for datasets with multiple step-by-step solutions which are correct, we chose the shortest one to train our models.
269
+
270
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/645c60dd7d655680b57ddbff/vgNk0bKthxNsxO0oAdaPD.png)
271
+
272
+ ### Model Responses vs Order of Choices in MCQs
273
+
274
+ As benchmarks like MMLU-Pro have upto 10 choices, while most training datasets consist of typically 4-5 choices, we modified the ordering and labelling of choices i.e re-ordering choices to create an imbalance opposing the original model's choice distribution, replacement of labels from A/B/C/D to a/b/c/d or 1/2/3/4 or w/x/y/z etc.. in 5% of the MCQ samples for better robustness
275
+ This resulted in less bias towards the earlier choices among MCQs as compared to the original phi-4. The below images are a distution of choices selected by the model while being evaluated over MMLU-pro
276
+
277
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/645c60dd7d655680b57ddbff/5DYCkLHpdk2jaTsALcwN8.png)
278
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/645c60dd7d655680b57ddbff/hhNNE4s8mALYsxdVf-UCq.png)
279
+
280
+ ### Team
281
+
282
+ - `Ram Mohan Rao Kadiyala`
283
+ - `Siddartha Pullakhandam`
284
+ - `Siddhant Gupta`
285
+ - `Drishti Sharma`
286
+ - `Jebish Purbey`
287
+ - `Kanwal Mehreen`
288
+ - `Muhammad Arham`
289
+ - `Hamza Farooq`
290
+
291
+ ### Correspondence
292
+
293
+ [![Gmail](https://img.shields.io/badge/Gmail-D14836?style=for-the-badge&logo=gmail&logoColor=white)](mailto:[email protected])