omarkamali commited on
Commit
b39859d
·
verified ·
1 Parent(s): d8f80d6

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -4,253 +4,86 @@ task_categories:
4
  - text-classification
5
  language:
6
  - multilingual
7
- - ar
8
- - en
9
- - fr
10
- - es
11
- - de
12
  tags:
13
  - language-identification
14
  - lid
15
  - benchmark
16
  - evaluation
17
- - arabic-dialects
18
- - multilingual
19
- pretty_name: LID Benchmark — Language Identification Evaluation Results
20
  size_categories:
21
- - 10K<n<100K
22
  configs:
23
- - config_name: results_per_language
24
- data_files:
25
- - split: train
26
- path: data/results_per_language/train.parquet
27
- - config_name: results_aggregate
28
- data_files:
29
- - split: train
30
- path: data/results_aggregate/train.parquet
31
  - config_name: results_summary
32
- data_files:
33
- - split: train
34
- path: data/results_summary/train.parquet
 
 
 
 
 
 
 
 
35
  ---
36
 
37
- # LID Benchmark — Language Identification Evaluation Results
38
-
39
- Structured evaluation results for **10 language identification models** across **8 benchmarks** covering **380 languages** — with per-language accuracy, aggregate metrics, and confusion analysis.
40
-
41
- Built as part of the [Gherbal](https://www.omneitylabs.com/models/gherbal) evaluation pipeline.
42
-
43
- The full [PDF report](https://www.omneitylabs.com/gherbal-v4/report.pdf) is also available.
44
-
45
- ## Quick Start
46
-
47
- ```python
48
- from datasets import load_dataset
49
-
50
- # Per-language results (26,540 rows)
51
- per_lang = load_dataset("omneity-labs/lid-benchmark", "results_per_language", split="train")
52
-
53
- # Aggregate metrics per model × benchmark × scope (400 rows)
54
- aggregate = load_dataset("omneity-labs/lid-benchmark", "results_aggregate", split="train")
55
-
56
- # Summary — one row per model × benchmark, full scope only (80 rows)
57
- summary = load_dataset("omneity-labs/lid-benchmark", "results_summary", split="train")
58
- ```
59
-
60
- ## Leaderboard (Full Scope)
61
-
62
- | Model | FLORES+ devtest | MADAR | Gherbal-Multi | ATLASIA-LID |
63
- |-------|:-:|:-:|:-:|:-:|
64
- | **GlotLID** | **0.9253** | 0.5648 | 0.7772 | 0.4977 |
65
- | OpenLID v2 | 0.8748 | 0.6262 | 0.7762 | 0.5735 |
66
- | OpenLID v3 (HPLT-LID) | 0.8556 | — | 0.6619 | — |
67
- | **Gherbal v4** | 0.8500 | **0.6298** | **0.8699** | **0.6909** |
68
- | OpenLID v1 | 0.8425 | 0.5587 | 0.8296 | 0.4845 |
69
- | NLLB-LID | 0.8331 | 0.1052 | 0.7522 | 0.3348 |
70
- | FastLID-176 | 0.4006 | 0.1352 | 0.6472 | 0.3899 |
71
- | Gherbal v3 | 0.3605 | 0.5745 | 0.8966 | 0.6561 |
72
- | Gherbal v2 | 0.1495 | 0.5811 | 0.7961 | 0.6561 |
73
- | Gherbal v1 | 0.1374 | 0.2771 | 0.8385 | 0.2718 |
74
-
75
- > **Note**: Full-scope FLORES+ accuracy penalizes models that support fewer languages (unsupported languages count as errors). Use `results_aggregate` with `scope=v4` (214 languages) for a fairer narrower comparison. Gherbal v4 achieves **0.9312** accuracy on FLORES+ devtest in the v4 scope.
76
-
77
- ## Dataset Configs
78
-
79
- ### `results_per_language` — Per-Language Breakdown
80
-
81
- 26,540 rows. One row per (model, benchmark, scope, language).
82
-
83
- | Column | Type | Description |
84
- |--------|------|-------------|
85
- | `model` | string | Model name (e.g. `gherbal-v4`, `glotlid`) |
86
- | `benchmark` | string | Benchmark name (e.g. `flores-devtest`) |
87
- | `scope` | string | Language scope: `full`, `v1`, `v2`, `v3`, or `v4` |
88
- | `language` | string | Language code in `iso639-3_Script` format (e.g. `arb_Arab`) |
89
- | `n_samples` | int | Number of test samples for this language |
90
- | `accuracy` | float | Classification accuracy (0–1) |
91
- | `top_confusion_1` | string | Most confused-with language |
92
- | `top_confusion_1_count` | int | Count of samples misclassified as this language |
93
- | `top_confusion_2` | string | 2nd most confused-with language |
94
- | `top_confusion_2_count` | int | — |
95
- | `top_confusion_3` | string | 3rd most confused-with language |
96
- | `top_confusion_3_count` | int | — |
97
- | `confusions_json` | string | Full confusion map as JSON (all misclassified targets and counts) |
98
 
99
- **Example find the hardest languages for a model:**
100
 
101
- ```python
102
- from datasets import load_dataset
103
- import pandas as pd
104
 
105
- ds = load_dataset("omneity-labs/lid-benchmark", "results_per_language", split="train")
106
- df = ds.to_pandas()
107
 
108
- # Worst-performing languages for Gherbal v4 on FLORES
109
- worst = (
110
- df[(df["model"] == "gherbal-v4") &
111
- (df["benchmark"] == "flores-devtest") &
112
- (df["scope"] == "full") &
113
- (df["n_samples"] >= 100)]
114
- .sort_values("accuracy")
115
- .head(10)
116
- [["language", "accuracy", "n_samples", "top_confusion_1"]]
117
- )
118
- print(worst)
119
- ```
120
 
121
- **Example — compare Arabic dialect accuracy across models:**
122
 
123
- ```python
124
- arabic_dialects = [
125
- "arz_Arab", "ary_Arab", "arq_Arab", "aeb_Arab",
126
- "apc_Arab", "acm_Arab", "ars_Arab", "afb_Arab",
127
- # Add more
128
- ]
129
-
130
- arabic_df = df[
131
- (df["language"].isin(arabic_dialects)) &
132
- (df["benchmark"] == "flores-devtest") &
133
- (df["scope"] == "full")
134
- ]
135
-
136
- pivot = arabic_df.pivot_table(
137
- index="language", columns="model", values="accuracy"
138
- )
139
- print(pivot.round(3))
140
- ```
141
-
142
- ### `results_aggregate` — Aggregate Metrics
143
-
144
- 400 rows. One row per (model, benchmark, scope).
145
-
146
- | Column | Type | Description |
147
- |--------|------|-------------|
148
- | `model` | string | Model name |
149
- | `benchmark` | string | Benchmark name |
150
- | `scope` | string | Language scope |
151
- | `accuracy` | float | Overall accuracy |
152
- | `f1_macro` | float | Macro-averaged F1 |
153
- | `f1_weighted` | float | Weighted F1 |
154
- | `precision_macro` | float | Macro-averaged precision |
155
- | `recall_macro` | float | Macro-averaged recall |
156
- | `n_samples` | int | Total evaluation samples |
157
- | `n_classes` | int | Number of unique languages |
158
-
159
- **Example — model comparison across scopes:**
160
-
161
- ```python
162
- ds = load_dataset("omneity-labs/lid-benchmark", "results_aggregate", split="train")
163
- df = ds.to_pandas()
164
-
165
- comparison = df[
166
- (df["benchmark"] == "flores-devtest") &
167
- (df["model"].isin(["gherbal-v4", "glotlid", "openlid-v2"]))
168
- ].pivot_table(index="scope", columns="model", values="accuracy")
169
- print(comparison.round(4))
170
- ```
171
-
172
- ### `results_summary` — Quick Summary
173
-
174
- 80 rows. One row per (model, benchmark) — full scope only. Best for quick leaderboard construction.
175
-
176
- | Column | Type | Description |
177
- |--------|------|-------------|
178
- | `model` | string | Model name |
179
- | `benchmark` | string | Benchmark name |
180
- | `accuracy` | float | Overall accuracy (full scope) |
181
- | `f1_macro` | float | Macro F1 (full scope) |
182
- | `f1_weighted` | float | Weighted F1 (full scope) |
183
- | `precision_macro` | float | Macro precision (full scope) |
184
- | `recall_macro` | float | Macro recall (full scope) |
185
- | `n_samples` | int | Total samples |
186
- | `n_classes` | int | Number of classes |
187
-
188
- ## Models Evaluated
189
-
190
- | Model | Type | Languages | Source |
191
- |-------|------|-----------|--------|
192
- | [Gherbal v4](https://www.omneitylabs.com/models/gherbal) | FastText | 214 | Omneity Labs |
193
- | Gherbal v3 | FastText | 106 | Omneity Labs |
194
- | Gherbal v2 | FastText | 46 | Omneity Labs |
195
- | Gherbal v1 | FastText | 36 | Omneity Labs |
196
- | [GlotLID v3](https://huggingface.co/cis-lmu/glotlid) | FastText | 2,102 | LMU Munich |
197
- | [NLLB-LID](https://huggingface.co/facebook/fasttext-language-identification) | FastText | 218 | Meta |
198
- | [OpenLID v1](https://huggingface.co/laurievb/OpenLID) | FastText | 201 | Laurie Burchell |
199
- | [OpenLID v2](https://huggingface.co/laurievb/OpenLID) | FastText | 201 | Laurie Burchell |
200
- | [OpenLID v3 (HPLT-LID)](https://huggingface.co/HPLT/hplt_lid_fl) | FastText | 201 | HPLT |
201
- | [FastLID-176](https://fasttext.cc/docs/en/language-identification.html) | FastText | 176 | Meta |
202
 
203
  ## Benchmarks
204
 
205
- | Benchmark | Samples | Languages | Description |
206
- |-----------|---------|-----------|-------------|
207
- | **FLORES+ devtest** | 222,640 | 214 | [openlanguagedata/flores_plus](https://huggingface.co/datasets/openlanguagedata/flores_plus) devtest split |
208
- | **FLORES+ dev** | 224,325 | 220 | [openlanguagedata/flores_plus](https://huggingface.co/datasets/openlanguagedata/flores_plus) dev split |
209
- | **MADAR** | 5,600 | 15 | [sawalni-ai/madar](https://huggingface.co/datasets/sawalni-ai/madar) — Arabic dialect corpus |
210
- | **Gherbal-Multi** | 185,000+ | 106+ | [sawalni-ai/gherbal-multi](https://huggingface.co/datasets/sawalni-ai/gherbal-multi) — multi-source test set |
211
- | **ATLASIA-LID** | 234,000+ | 24 | [atlasia/Arabic-LID-Leaderboard](https://huggingface.co/datasets/atlasia/Arabic-LID-Leaderboard) — Arabic country-level dialects |
212
- | **WiLI-2018** | | 235 | Wikipedia Language Identification |
213
- | **CommonLID** | | — | Common Crawl language ID |
214
- | **Bouquet** | | — | Cross-domain evaluation |
215
-
216
- ## Evaluation Scopes
217
-
218
- Results include multiple **scopes** to enable fair comparison between models with different language coverage:
219
 
220
- | Scope | Languages | Description |
221
- |-------|-----------|-------------|
222
- | `full` | All | All languages in the benchmark (penalizes models with fewer supported languages) |
223
- | `v1` | 36 | Intersection with Gherbal v1 language set |
224
- | `v2` | 46 | Intersection with Gherbal v2 language set |
225
- | `v3` | 106 | Intersection with Gherbal v3 language set |
226
- | `v4` | 214 | Intersection with Gherbal v4 language set |
227
 
228
- Using scoped evaluation ensures models are compared only on languages they were designed to handle. For example, Gherbal v3 supports 106 languages — its `v3` scope accuracy on FLORES+ is much higher than its `full` scope accuracy, because the full scope includes 108+ languages it was never trained on.
 
229
 
230
- ## Language Codes
231
 
232
- Languages use the `iso639-3_Script` format from FLORES+:
233
- - `arb_Arab` — Modern Standard Arabic (Arabic script)
234
- - `arz_Arab` — Egyptian Arabic
235
- - `ary_Arab` — Moroccan Arabic (Arabic script)
236
- - `ary_Latn` — Moroccan Arabic (Latin script)
237
- - `eng_Latn` — English
238
- - `fra_Latn` — French
239
-
240
- Full list of 380 languages available in the `results_per_language` config.
241
-
242
- ## CSV Downloads
243
-
244
- For convenience, CSV versions of all three configs are also included in the `csv/` directory.
245
 
246
  ## Citation
247
 
248
  If you use this benchmark data in your research, please reference:
249
 
250
- - **Omneity Labs LID Benchmark**: [https://huggingface.co/datasets/omneity-labs/lid-benchmark](https://huggingface.co/datasets/omneity-labs/lid-benchmarkk)
251
- - **Gherbal model**: [https://www.omneitylabs.com/models/gherbal](https://www.omneitylabs.com/models/gherbal)
252
- - **Evaluation benchmarks**: See individual benchmark datasets linked above.
 
 
 
 
 
253
 
254
  ## License
255
 
256
- The evaluation results in this dataset are released under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). The underlying benchmark datasets retain their original licenses.
 
4
  - text-classification
5
  language:
6
  - multilingual
 
 
 
 
 
7
  tags:
8
  - language-identification
9
  - lid
10
  - benchmark
11
  - evaluation
 
 
 
12
  size_categories:
13
+ - 10M<n<100M
14
  configs:
 
 
 
 
 
 
 
 
15
  - config_name: results_summary
16
+ data_files: results_summary/train.parquet
17
+ - config_name: results_aggregate
18
+ data_files: results_aggregate/train.parquet
19
+ - config_name: results_per_language
20
+ data_files: results_per_language/train.parquet
21
+ - config_name: results_speed
22
+ data_files: results_speed/train.parquet
23
+ - config_name: model_languages
24
+ data_files: model_languages/train.parquet
25
+ - config_name: results_individual
26
+ data_files: results_individual/train.parquet
27
  ---
28
 
29
+ # LID Benchmark
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
+ Comprehensive evaluation of **17 language identification models** across **8 diverse benchmarks**.
32
 
33
+ Built by [Omneity Labs](https://www.omneitylabs.com).
 
 
34
 
35
+ ## Subsets
 
36
 
37
+ | Config | Description | Rows |
38
+ |--------|-------------|------|
39
+ | `results_summary` | One row per model × benchmark × scope with aggregate metrics | ~136 |
40
+ | `results_aggregate` | Detailed aggregate metrics per model × benchmark × scope | ~816 |
41
+ | `results_per_language` | Per-language accuracy for every model × benchmark × scope | ~57k |
42
+ | `results_speed` | Inference speed (samples/sec) per model × benchmark | ~136 |
43
+ | `model_languages` | Supported language codes declared by each model | ~4.7k |
44
+ | `results_individual` | Every individual prediction (model × benchmark × sample) | ~28M |
 
 
 
 
45
 
46
+ ## Models
47
 
48
+ gherbal-v1, gherbal-v2, gherbal-v3, gherbal-v4, nllb-lid, openlid-v1, openlid-v2,
49
+ hplt-openlid-v3, fastlid-176, glotlid, franc, franc-all, franc-min, cld2, langdetect,
50
+ langid, py3langid
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
  ## Benchmarks
53
 
54
+ | Benchmark | Source |
55
+ |-----------|--------|
56
+ | flores-devtest | [openlanguagedata/flores_plus](https://huggingface.co/datasets/openlanguagedata/flores_plus) (devtest split) |
57
+ | flores-dev | [openlanguagedata/flores_plus](https://huggingface.co/datasets/openlanguagedata/flores_plus) (dev split) |
58
+ | madar | [Madar](https://camel.abudhabi.nyu.edu/madar-parallel-corpus) |
59
+ | gherbal-multi | [sawalni-ai/gherbal-multi](https://huggingface.co/datasets/sawalni-ai/gherbal-multi) |
60
+ | atlasia-lid | [atlasia/Arabic-LID-Leaderboard](https://huggingface.co/datasets/atlasia/Arabic-LID-Leaderboard) |
61
+ | wili-2018 | [wili_2018](https://huggingface.co/datasets/wili_2018) |
62
+ | commonlid | [commoncrawl/CommonLID](https://huggingface.co/datasets/commoncrawl/CommonLID) |
63
+ | bouquet | [facebook/bouquet](https://huggingface.co/datasets/facebook/bouquet) |
 
 
 
 
64
 
65
+ ## Methodology
 
 
 
 
 
 
66
 
67
+ All predictions are normalized to **ISO 639-3 + Script** (ISO 15924) codes using [babelcode](https://github.com/omneity-labs/babelcode).
68
+ Metrics: accuracy, macro-F1, weighted-F1, precision, recall — computed under multiple scopes (full, self, v1–v4).
69
 
70
+ ## Interactive App
71
 
72
+ Explore results interactively: [LID Benchmark Leaderboard](https://huggingface.co/spaces/omneity-labs/lid-benchmark)
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
  ## Citation
75
 
76
  If you use this benchmark data in your research, please reference:
77
 
78
+ - Omneity Labs LID Benchmark: https://huggingface.co/datasets/omneity-labs/lid-benchmark
79
+ - Gherbal model: https://www.omneitylabs.com/models/gherbal
80
+ - Evaluation benchmarks: See individual benchmark datasets linked above.
81
+
82
+ ## Author
83
+
84
+ - [Omar Kamali](https://omarkamali.com)
85
+ - [Omneity Labs](https://omneitylabs.com)
86
 
87
  ## License
88
 
89
+ The evaluation results in this dataset are released under Apache 2.0. The underlying benchmark datasets retain their original licenses.
model_languages/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6876caff413c758d056de7fd6108f5db849020d3f3318d56d9bc53ac11c5c06d
3
+ size 18754
results_aggregate/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3bf20ce860d68f7175f014b525107b5d7c58a6f6641483c69aaaf658e47b547d
3
+ size 37711
results_individual/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:662733ab641f56ec4a95f8808e32ff3c11a586745e764510e8e96ec1400cd0d1
3
+ size 531940611
results_per_language/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0258d7f2f8838317cac7f30e23a9decb7556e625b919b1be28357e5c26e1d6d8
3
+ size 825967
results_speed/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:572ddf5f06d8687fccfb3e0eed159501b5f1bb62e037d13f0101457a74b3c693
3
+ size 6416
results_summary/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f545437e1975df32822427e5c1876f33cc1ca21f048b54901cd1ff9ddda67a8b
3
+ size 15447