Datasets:
QCRI
/

Modalities:
Text
Formats:
json
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
File size: 15,687 Bytes
3b57c69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0f6f067
 
0329862
0f6f067
 
0329862
0f6f067
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3b57c69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f40b862
 
 
 
 
3b57c69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
---
license: cc-by-nc-sa-4.0
task_categories:
  - text-classification
language:
  - ar
tags:
  - Social Media
  - News Media
  - Sentiment
  - Stance
  - Emotion
pretty_name: 'LlamaLens: Specialized Multilingual LLM for Analyzing News and Social Media Content -- English'
size_categories:
  - 10K<n<100K
dataset_info:
- config_name: QProp
  splits:
    - name: train
      num_examples: 35986
    - name: dev
      num_examples: 5125
    - name: test
      num_examples: 10159
- config_name: Cyberbullying
  splits:
    - name: train
      num_examples: 32551
    - name: dev
      num_examples: 4751
    - name: test
      num_examples: 9473
- config_name: clef2024-checkthat-lab
  splits:
    - name: train
      num_examples: 825
    - name: dev
      num_examples: 219
    - name: test
      num_examples: 484
- config_name: SemEval23T3-subtask1
  splits:
    - name: train
      num_examples: 302
    - name: dev
      num_examples: 130
    - name: test
      num_examples: 83
- config_name: offensive_language_dataset
  splits:
    - name: train
      num_examples: 29216
    - name: dev
      num_examples: 3653
    - name: test
      num_examples: 3653
- config_name: xlsum
  splits:
    - name: train
      num_examples: 306493
    - name: dev
      num_examples: 11535
    - name: test
      num_examples: 11535
- config_name: claim-detection
  splits:
    - name: train
      num_examples: 23224
    - name: dev
      num_examples: 5815
    - name: test
      num_examples: 7267
- config_name: emotion
  splits:
    - name: train
      num_examples: 280551
    - name: dev
      num_examples: 41429
    - name: test
      num_examples: 82454
- config_name: Politifact
  splits:
    - name: train
      num_examples: 14799
    - name: dev
      num_examples: 2116
    - name: test
      num_examples: 4230
- config_name: News_dataset
  splits:
    - name: train
      num_examples: 28147
    - name: dev
      num_examples: 4376
    - name: test
      num_examples: 8616
- config_name: hate-offensive-speech
  splits:
    - name: train
      num_examples: 48944
    - name: dev
      num_examples: 2802
    - name: test
      num_examples: 2799
- config_name: CNN_News_Articles_2011-2022
  splits:
    - name: train
      num_examples: 32193
    - name: dev
      num_examples: 9663
    - name: test
      num_examples: 5682
- config_name: CT24_checkworthy
  splits:
    - name: train
      num_examples: 22403
    - name: dev
      num_examples: 318
    - name: test
      num_examples: 1031
- config_name: News_Category_Dataset
  splits:
    - name: train
      num_examples: 145748
    - name: dev
      num_examples: 20899
    - name: test
      num_examples: 41740
- config_name: NewsMTSC-dataset
  splits:
    - name: train
      num_examples: 7739
    - name: dev
      num_examples: 320
    - name: test
      num_examples: 747
- config_name: Offensive_Hateful_Dataset_New
  splits:
    - name: train
      num_examples: 42000
    - name: dev
      num_examples: 5254
    - name: test
      num_examples: 5252
- config_name: News-Headlines-Dataset-For-Sarcasm-Detection
  splits:
    - name: train
      num_examples: 19965
    - name: dev
      num_examples: 2858
    - name: test
      num_examples: 5719
configs:
- config_name: QProp
  data_files:
    - split: test
      path: QProp/test.json
    - split: dev
      path: QProp/dev.json
    - split: train
      path: QProp/train.json
- config_name: Cyberbullying
  data_files:
    - split: test
      path: Cyberbullying/test.json
    - split: dev
      path: Cyberbullying/dev.json
    - split: train
      path: Cyberbullying/train.json
- config_name: clef2024-checkthat-lab
  data_files:
    - split: test
      path: clef2024-checkthat-lab/test.json
    - split: dev
      path: clef2024-checkthat-lab/dev.json
    - split: train
      path: clef2024-checkthat-lab/train.json
- config_name: SemEval23T3-subtask1
  data_files:
    - split: test
      path: SemEval23T3-subtask1/test.json
    - split: dev
      path: SemEval23T3-subtask1/dev.json
    - split: train
      path: SemEval23T3-subtask1/train.json
- config_name: offensive_language_dataset
  data_files:
    - split: test
      path: offensive_language_dataset/test.json
    - split: dev
      path: offensive_language_dataset/dev.json
    - split: train
      path: offensive_language_dataset/train.json
- config_name: xlsum
  data_files:
    - split: test
      path: xlsum/test.json
    - split: dev
      path: xlsum/dev.json
    - split: train
      path: xlsum/train.json
- config_name: claim-detection
  data_files:
    - split: test
      path: claim-detection/test.json
    - split: dev
      path: claim-detection/dev.json
    - split: train
      path: claim-detection/train.json
- config_name: emotion
  data_files:
    - split: test
      path: emotion/test.json
    - split: dev
      path: emotion/dev.json
    - split: train
      path: emotion/train.json
- config_name: Politifact
  data_files:
    - split: test
      path: Politifact/test.json
    - split: dev
      path: Politifact/dev.json
    - split: train
      path: Politifact/train.json
- config_name: News_dataset
  data_files:
    - split: test
      path: News_dataset/test.json
    - split: dev
      path: News_dataset/dev.json
    - split: train
      path: News_dataset/train.json
- config_name: hate-offensive-speech
  data_files:
    - split: test
      path: hate-offensive-speech/test.json
    - split: dev
      path: hate-offensive-speech/dev.json
    - split: train
      path: hate-offensive-speech/train.json
- config_name: CNN_News_Articles_2011-2022
  data_files:
    - split: test
      path: CNN_News_Articles_2011-2022/test.json
    - split: dev
      path: CNN_News_Articles_2011-2022/dev.json
    - split: train
      path: CNN_News_Articles_2011-2022/train.json
- config_name: CT24_checkworthy
  data_files:
    - split: test
      path: CT24_checkworthy/test.json
    - split: dev
      path: CT24_checkworthy/dev.json
    - split: train
      path: CT24_checkworthy/train.json
- config_name: News_Category_Dataset
  data_files:
    - split: test
      path: News_Category_Dataset/test.json
    - split: dev
      path: News_Category_Dataset/dev.json
    - split: train
      path: News_Category_Dataset/train.json
- config_name: NewsMTSC-dataset
  data_files:
    - split: test
      path: NewsMTSC-dataset/test.json
    - split: dev
      path: NewsMTSC-dataset/dev.json
    - split: train
      path: NewsMTSC-dataset/train.json
- config_name: Offensive_Hateful_Dataset_New
  data_files:
    - split: test
      path: Offensive_Hateful_Dataset_New/test.json
    - split: dev
      path: Offensive_Hateful_Dataset_New/dev.json
    - split: train
      path: Offensive_Hateful_Dataset_New/train.json
- config_name: News-Headlines-Dataset-For-Sarcasm-Detection
  data_files:
    - split: test
      path: News-Headlines-Dataset-For-Sarcasm-Detection/test.json
    - split: dev
      path: News-Headlines-Dataset-For-Sarcasm-Detection/dev.json
    - split: train
      path: News-Headlines-Dataset-For-Sarcasm-Detection/train.json
---

# LlamaLens: Specialized Multilingual LLM Dataset

## Overview
LlamaLens is a specialized multilingual LLM designed for analyzing news and social media content. It focuses on 19 NLP tasks, leveraging 52 datasets across Arabic, English, and Hindi.


<p align="center"> <img src="./capablities_tasks_datasets.png" style="width: 40%;" id="title-icon"> </p>

## LlamaLens
This repo includes scripts needed to run our full pipeline, including data preprocessing and sampling, instruction dataset creation, model fine-tuning, inference and evaluation.

### Features
- Multilingual support (Arabic, English, Hindi)
- 19 NLP tasks with 52 datasets
- Optimized for news and social media content analysis

## 📂 Dataset Overview

### English Datasets

| **Task**                  | **Dataset**                  | **# Labels** | **# Train** | **# Test** | **# Dev** |
|---------------------------|------------------------------|--------------|-------------|------------|-----------|
| Checkworthiness           | CT24_T1                      | 2            | 22,403      | 1,031      | 318       |
| Claim                    | claim-detection              | 2            | 23,224      | 7,267      | 5,815     |
| Cyberbullying             | Cyberbullying                | 6            | 32,551      | 9,473      | 4,751     |
| Emotion                  | emotion                     | 6            | 280,551     | 82,454     | 41,429    |
| Factuality               | News_dataset                | 2            | 28,147      | 8,616      | 4,376     |
| Factuality               | Politifact                  | 6            | 14,799      | 4,230      | 2,116     |
| News Genre Categorization | CNN_News_Articles_2011-2022 | 6            | 32,193      | 5,682      | 9,663     |
| News Genre Categorization | News_Category_Dataset       | 42           | 145,748     | 41,740     | 20,899    |
| News Genre Categorization | SemEval23T3-subtask1        | 3            | 302         | 83         | 130       |
| Summarization            | xlsum                       | --           | 306,493     | 11,535     | 11,535    |
| Offensive Language       | Offensive_Hateful_Dataset_New | 2           | 42,000      | 5,252      | 5,254     |
| Offensive Language       | offensive_language_dataset   | 2            | 29,216      | 3,653      | 3,653     |
| Offensive/Hate-Speech    | hate-offensive-speech        | 3            | 48,944      | 2,799      | 2,802     |
| Propaganda               | QProp                        | 2            | 35,986      | 10,159     | 5,125     |
| Sarcasm                  | News-Headlines-Dataset-For-Sarcasm-Detection | 2 | 19,965 | 5,719 | 2,858 |
| Sentiment                | NewsMTSC-dataset            | 3            | 7,739       | 747        | 320       |
| Subjectivity             | clef2024-checkthat-lab       | 2            | 825         | 484        | 219       |


## Results

Below, we present the performance of **LlamaLens** in **English** compared to existing SOTA (if available) and the Llama-Instruct baseline, The “Δ” (Delta) column here is 
calculated as **(LLamalens – SOTA)**.

| **Task**             | **Dataset**               | **Metric** | **SOTA** | **Llama-instruct** | **LLamalens** | **Δ** (LLamalens - SOTA) |
|----------------------|---------------------------|-----------:|--------:|--------------------:|--------------:|------------------------------:|
| News Summarization   | xlsum                     | R-2        | 0.152   | 0.074              | 0.141         | -0.011                       |
| News Genre           | CNN_News_Articles         | Acc        | 0.940   | 0.644              | 0.915         | -0.025                       |
| News Genre           | News_Category             | Ma-F1      | 0.769   | 0.970              | 0.505         | -0.264                       |
| News Genre           | SemEval23T3-ST1           | Mi-F1      | 0.815   | 0.687              | 0.241         | -0.574                       |
| Subjectivity         | CT24_T2                   | Ma-F1      | 0.744   | 0.535              | 0.508         | -0.236                       |
| Emotion              | emotion                   | Ma-F1      | 0.790   | 0.353              | 0.878         | 0.088                        |
| Sarcasm              | News-Headlines            | Acc        | 0.897   | 0.668              | 0.956         | 0.059                        |
| Sentiment            | NewsMTSC                  | Ma-F1      | 0.817   | 0.628              | 0.627         | -0.190                       |
| Checkworthiness      | CT24_T1                   | F1_Pos     | 0.753   | 0.404              | 0.877         | 0.124                        |
| Claim                | claim-detection           | Mi-F1      | –       | 0.545              | 0.915         | –                            |
| Factuality           | News_dataset              | Acc        | 0.920   | 0.654              | 0.946         | 0.026                        |
| Factuality           | Politifact                | W-F1       | 0.490   | 0.121              | 0.290         | -0.200                       |
| Propaganda           | QProp                     | Ma-F1      | 0.667   | 0.759              | 0.851         | 0.184                        |
| Cyberbullying        | Cyberbullying             | Acc        | 0.907   | 0.175              | 0.847         | -0.060                       |
| Offensive            | Offensive_Hateful         | Mi-F1      | –       | 0.692              | 0.805         | –                            |
| Offensive            | offensive_language        | Mi-F1      | 0.994   | 0.646              | 0.884         | -0.110                       |
| Offensive & Hate     | hate-offensive-speech     | Acc        | 0.945   | 0.602              | 0.924         | -0.021                       |


## File Format

Each JSONL file in the dataset follows a structured format with the following fields:

- `id`: Unique identifier for each data entry.
- `original_id`: Identifier from the original dataset, if available.
- `input`: The original text that needs to be analyzed.
- `output`: The label assigned to the text after analysis.
- `dataset`: Name of the dataset the entry belongs.
- `task`: The specific task type.
- `lang`: The language of the input text.
- `instructions`: A brief set of instructions describing how the text should be labeled.
- `text`: A formatted structure including instructions and response for the task in a conversation format between the system, user, and assistant, showing the decision process.


**Example entry in JSONL file:**

```
{
    "id": "3fe3eb6a-843e-4a03-b38c-8333c052f4c4",
    "original_id": "nan",
    "input": "You know, I saw a movie - \"Crocodile Dundee.\"",
    "output": "not_checkworthy",
    "dataset": "CT24_checkworthy",
    "task": "Checkworthiness",
    "lang": "en",
    "instructions": "Analyze the given text and label it as 'checkworthy' if it includes a factual statement that is significant or relevant to verify, or 'not_checkworthy' if it's not worth checking. Return only the label without any explanation, justification or additional text.",
    "text": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>You are a social media expert providing accurate analysis and insights.<|eot_id|><|start_header_id|>user<|end_header_id|>Analyze the given text and label it as 'checkworthy' if it includes a factual statement that is significant or relevant to verify, or 'not_checkworthy' if it's not worth checking. Return only the label without any explanation, justification or additional text.\ninput: You know, I saw a movie - \"Crocodile Dundee.\"\nlabel: <|eot_id|><|start_header_id|>assistant<|end_header_id|>not_checkworthy<|eot_id|><|end_of_text|>"
}

```
## Model  
[**LlamaLens on Hugging Face**](https://huggingface.co/QCRI/LlamaLens)  

## Replication Scripts  
[**LlamaLens GitHub Repository**](https://github.com/firojalam/LlamaLens)


## 📢 Citation

If you use this dataset, please cite our [paper](https://arxiv.org/pdf/2410.15308):

```
@article{kmainasi2024llamalensspecializedmultilingualllm,
  title={LlamaLens: Specialized Multilingual LLM for Analyzing News and Social Media Content},
  author={Mohamed Bayan Kmainasi and Ali Ezzat Shahroor and Maram Hasanain and Sahinur Rahman Laskar and Naeemul Hassan and Firoj Alam},
  year={2024},
  journal={arXiv preprint arXiv:2410.15308},
  volume={},
  number={},
  pages={},
  url={https://arxiv.org/abs/2410.15308},
  eprint={2410.15308},
  archivePrefix={arXiv},
  primaryClass={cs.CL}
}
```