zodumair commited on
Commit
83b0f47
·
verified ·
1 Parent(s): a810317

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ checkpoint-2000/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ checkpoint-3500/tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - ur
5
+ license: mit
6
+ tags:
7
+ - text-classification
8
+ - fake-news-detection
9
+ - misinformation
10
+ - xlm-roberta
11
+ - urdu
12
+ - english
13
+ - multilingual
14
+ datasets:
15
+ - liar
16
+ - GonzaloA/fake_news
17
+ - UrduFakeNews-AxToGrind
18
+ metrics:
19
+ - accuracy
20
+ - f1
21
+ model-index:
22
+ - name: sifta-fakenews-xlmr
23
+ results:
24
+ - task:
25
+ type: text-classification
26
+ name: Fake News Detection
27
+ metrics:
28
+ - type: accuracy
29
+ value: 0.9696
30
+ - type: f1
31
+ value: 0.9695
32
+ name: Macro F1
33
+ ---
34
+
35
+ # SIFTA — Multilingual Fake News Detector (EN + UR)
36
+
37
+ **Model:** Fine-tuned `xlm-roberta-base` for binary fake news classification
38
+ **Languages:** English · Urdu (اردو)
39
+ **Labels:** `TRUE` (0) · `FAKE` (1)
40
+ **Student:** Muhammad Umair Khan · 2023F-BCET-010
41
+ **Institute:** Sir Syed University of Engineering and Technology, Karachi
42
+ **Project:** SIFTA — AI Misinformation Detection Platform (Final Year Project 2025–26)
43
+
44
+ ---
45
+
46
+ ## Model Description
47
+
48
+ This model fine-tunes [XLM-RoBERTa base](https://huggingface.co/xlm-roberta-base)
49
+ on a combined English + Urdu fake news corpus. It is the core ML component of
50
+ SIFTA — a multi-modal AI misinformation detection platform that also performs
51
+ voice clone detection, document forgery analysis, and live source verification.
52
+
53
+ The raw probability output is passed through SIFTA's Decision Engine alongside
54
+ live source verification signals to produce a five-class Trust Score verdict:
55
+ Verified Real · Likely Real · Uncertain · Unable to Verify · Likely Fake.
56
+
57
+ ---
58
+
59
+ ## Training Data
60
+
61
+ | Dataset | Samples (train) | Language |
62
+ |---|---|---|
63
+ | ISOT | 32482 | English |
64
+ | UrduFakeNews-AxToGrind | 8054 | Urdu |
65
+ | **Total** | **40536** | EN + UR |
66
+
67
+ ### Dataset details
68
+
69
+ **Urdu — Ax-to-Grind UrduFakeNews Corpus**
70
+ - 10,106 news items from Pakistani social media and news outlets
71
+ - Binary labels: TRUE / FAKE
72
+ - Near-balanced: ~5,039 FAKE / ~4,997 TRUE
73
+ - Average length: 351 characters per item
74
+
75
+ **LIAR (Wang, 2017)**
76
+ - 12,836 political statements from PolitiFact
77
+ - 6-way labels mapped to binary:
78
+ - pants-fire / false / barely-true → FAKE
79
+ - half-true / mostly-true / true → TRUE
80
+
81
+ **ISOT Fake News Dataset (University of Victoria)**
82
+ - ~44,000 real/fake news articles
83
+ - Real: Reuters. Fake: unreliable sources. Already binary labelled.
84
+
85
+ ---
86
+
87
+ ## Training Configuration
88
+
89
+ | Parameter | Value |
90
+ |---|---|
91
+ | Base model | xlm-roberta-base |
92
+ | Max token length | 256 |
93
+ | Epochs | 5 |
94
+ | Batch size | 16 x 2 grad accum = 32 effective |
95
+ | Learning rate | 2e-05 |
96
+ | LR schedule | Cosine with 10% linear warmup |
97
+ | Weight decay | 0.01 |
98
+ | Dropout | 0.1 |
99
+ | Loss | CrossEntropyLoss with inverse-frequency class weights |
100
+ | Early stopping | Patience 3 on val macro-F1 |
101
+ | Mixed precision | fp16 on T4 GPU |
102
+ | Random seed | 42 |
103
+
104
+ ---
105
+
106
+ ## Evaluation Results
107
+
108
+ ### Overall (held-out test set — 10% stratified)
109
+
110
+ | Metric | Score |
111
+ |---|---|
112
+ | Accuracy | 0.9696 |
113
+ | Macro F1 | 0.9695 |
114
+ | TRUE (class 0) F1 | 0.9676 |
115
+ | FAKE (class 1) F1 | 0.9713 |
116
+
117
+ ### Per-language macro-F1
118
+
119
+ | Language | Macro F1 |
120
+ |---|---|
121
+ | EN | 0.9854 |
122
+ | UR | 0.9053 |
123
+
124
+ ### Full classification report
125
+
126
+ ```
127
+ precision recall f1-score support
128
+
129
+ TRUE 0.9632 0.9721 0.9676 2369
130
+ FAKE 0.9753 0.9674 0.9713 2698
131
+
132
+ accuracy 0.9696 5067
133
+ macro avg 0.9693 0.9698 0.9695 5067
134
+ weighted avg 0.9697 0.9696 0.9696 5067
135
+
136
+ ```
137
+ ### Confusion Matrix
138
+
139
+ ![Confusion Matrix](confusion_matrix.png)
140
+
141
+ | | Predicted TRUE | Predicted FAKE |
142
+ |---|---|---|
143
+ | **Actual TRUE** | 2,303 (TN) | 66 (FP) |
144
+ | **Actual FAKE** | 88 (FN) | 2,610 (TP) |
145
+
146
+ - **TRUE recall:** 97.2%
147
+ - **FAKE recall:** 96.7%
148
+
149
+ ---
150
+
151
+ ## Usage
152
+
153
+ ### HuggingFace Inference API (used by SIFTA backend)
154
+
155
+ ```python
156
+ import httpx
157
+
158
+ API_URL = "https://api-inference.huggingface.co/models/zodumair/sifta-fakenews-xlmr"
159
+ headers = {"Authorization": "Bearer hf_your_token_here"}
160
+
161
+ def classify(text):
162
+ return httpx.post(API_URL, headers=headers, json={'inputs': text}).json()
163
+
164
+ print(classify("Scientists confirm new vaccine is 77% effective."))
165
+ print(classify("حکومت نے خفیہ طور پر ملک کا سارا سونا بیرون ملک بھیج دیا"))
166
+ ```
167
+ ### Local inference
168
+
169
+ ```python
170
+ from transformers import pipeline
171
+
172
+ classifier = pipeline("text-classification", model="zodumair/sifta-fakenews-xlmr")
173
+ print(classifier("SHOCKING: Scientists hiding cancer cure from the public."))
174
+ # [{'label': 'FAKE', 'score': 0.93}]
175
+ ```
176
+ ---
177
+
178
+ ## Limitations
179
+
180
+ - Optimised for headlines and short excerpts under 256 tokens
181
+ - Urdu performance is lower than English due to smaller Urdu training set
182
+ - Satire and opinion pieces may be misclassified
183
+ - Use alongside source verification — not as a standalone decision tool
184
+
185
+ ---
186
+
187
+ ## Citation
188
+
189
+ ```
190
+ @misc{sifta2026,
191
+ author = {Muhammad Umair Khan},
192
+ title = {SIFTA: AI Misinformation Detection Platform},
193
+ year = {2026},
194
+ institution = {Sir Syed University of Engineering and Technology, Karachi},
195
+ note = {Final Year Project, Batch 2023F}
196
+ }
197
+ ```
198
+ ---
199
+ *SIFTA FYP SSUET Karachi · Batch 2023F · 2023F-BCET-010*
checkpoint-2000/config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "XLMRobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "TRUE",
16
+ "1": "FAKE"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "is_decoder": false,
21
+ "label2id": {
22
+ "FAKE": 1,
23
+ "TRUE": 0
24
+ },
25
+ "layer_norm_eps": 1e-05,
26
+ "max_position_embeddings": 514,
27
+ "model_type": "xlm-roberta",
28
+ "num_attention_heads": 12,
29
+ "num_hidden_layers": 12,
30
+ "output_past": true,
31
+ "pad_token_id": 1,
32
+ "position_embedding_type": "absolute",
33
+ "tie_word_embeddings": true,
34
+ "transformers_version": "5.12.1",
35
+ "type_vocab_size": 1,
36
+ "use_cache": false,
37
+ "vocab_size": 250002
38
+ }
checkpoint-2000/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01813e8912e5a6e170cb27bcdf268caf1ef3dde7339e114d0129c3bc844605af
3
+ size 1112205008
checkpoint-2000/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e200b5ad8efb51e246ba634f7083181e99180c6bd9faf3adb60abee982ca6c9d
3
+ size 2224532875
checkpoint-2000/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81b9b59ff6c6e428c304847bdb69165ada5d6bf5d44b1a91844e7a3e386ab3e3
3
+ size 14645
checkpoint-2000/scaler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52fdbe03c6ee3fc7688e2854d1f87d9e898a5909ac109776c7735a230667f733
3
+ size 1383
checkpoint-2000/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd9d66016d89a43de634092495adc9298d13f83cbdd115358b14dbacb22d239b
3
+ size 1465
checkpoint-2000/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d237c4974cfea16dffbc5035028fea5b47ad8b653af90c908b7a35bdc8b0d90
3
+ size 17098184
checkpoint-2000/tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "cls_token": "<s>",
6
+ "eos_token": "</s>",
7
+ "is_local": false,
8
+ "local_files_only": false,
9
+ "mask_token": "<mask>",
10
+ "model_max_length": 512,
11
+ "pad_token": "<pad>",
12
+ "sep_token": "</s>",
13
+ "tokenizer_class": "XLMRobertaTokenizer",
14
+ "unk_token": "<unk>"
15
+ }
checkpoint-2000/trainer_state.json ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 2000,
3
+ "best_metric": 0.9721,
4
+ "best_model_checkpoint": "./sifta-fakenews-xlmr/checkpoint-2000",
5
+ "epoch": 1.5785319652722967,
6
+ "eval_steps": 500,
7
+ "global_step": 2000,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.07892659826361484,
14
+ "grad_norm": 7.519743919372559,
15
+ "learning_rate": 3.1230283911671926e-06,
16
+ "loss": 1.3593978881835938,
17
+ "step": 100
18
+ },
19
+ {
20
+ "epoch": 0.15785319652722968,
21
+ "grad_norm": 44.37847137451172,
22
+ "learning_rate": 6.2776025236593065e-06,
23
+ "loss": 0.6375294876098633,
24
+ "step": 200
25
+ },
26
+ {
27
+ "epoch": 0.23677979479084452,
28
+ "grad_norm": 3.3530941009521484,
29
+ "learning_rate": 9.43217665615142e-06,
30
+ "loss": 0.3285886001586914,
31
+ "step": 300
32
+ },
33
+ {
34
+ "epoch": 0.31570639305445936,
35
+ "grad_norm": 4.9190993309021,
36
+ "learning_rate": 1.2586750788643533e-05,
37
+ "loss": 0.31189311981201173,
38
+ "step": 400
39
+ },
40
+ {
41
+ "epoch": 0.39463299131807417,
42
+ "grad_norm": 13.304952621459961,
43
+ "learning_rate": 1.574132492113565e-05,
44
+ "loss": 0.28032915115356444,
45
+ "step": 500
46
+ },
47
+ {
48
+ "epoch": 0.39463299131807417,
49
+ "eval_accuracy": 0.9513,
50
+ "eval_f1": 0.951,
51
+ "eval_loss": 0.11800144612789154,
52
+ "eval_runtime": 17.0078,
53
+ "eval_samples_per_second": 297.922,
54
+ "eval_steps_per_second": 9.349,
55
+ "step": 500
56
+ },
57
+ {
58
+ "epoch": 0.47355958958168903,
59
+ "grad_norm": 69.24589538574219,
60
+ "learning_rate": 1.889589905362776e-05,
61
+ "loss": 0.23949861526489258,
62
+ "step": 600
63
+ },
64
+ {
65
+ "epoch": 0.5524861878453039,
66
+ "grad_norm": 77.79669952392578,
67
+ "learning_rate": 1.9993585719507573e-05,
68
+ "loss": 0.26106679916381836,
69
+ "step": 700
70
+ },
71
+ {
72
+ "epoch": 0.6314127861089187,
73
+ "grad_norm": 9.278132438659668,
74
+ "learning_rate": 1.9958691794328414e-05,
75
+ "loss": 0.26748144149780273,
76
+ "step": 800
77
+ },
78
+ {
79
+ "epoch": 0.7103393843725335,
80
+ "grad_norm": 10.259608268737793,
81
+ "learning_rate": 1.9893564256008604e-05,
82
+ "loss": 0.2700900650024414,
83
+ "step": 900
84
+ },
85
+ {
86
+ "epoch": 0.7892659826361483,
87
+ "grad_norm": 1.331714153289795,
88
+ "learning_rate": 1.9798400825377246e-05,
89
+ "loss": 0.23025428771972656,
90
+ "step": 1000
91
+ },
92
+ {
93
+ "epoch": 0.7892659826361483,
94
+ "eval_accuracy": 0.9637,
95
+ "eval_f1": 0.9636,
96
+ "eval_loss": 0.11573408544063568,
97
+ "eval_runtime": 16.2817,
98
+ "eval_samples_per_second": 311.209,
99
+ "eval_steps_per_second": 9.766,
100
+ "step": 1000
101
+ },
102
+ {
103
+ "epoch": 0.8681925808997633,
104
+ "grad_norm": 0.1167285144329071,
105
+ "learning_rate": 1.9673490409291412e-05,
106
+ "loss": 0.22350259780883788,
107
+ "step": 1100
108
+ },
109
+ {
110
+ "epoch": 0.9471191791633781,
111
+ "grad_norm": 21.29085922241211,
112
+ "learning_rate": 1.9519212223543213e-05,
113
+ "loss": 0.24957496643066407,
114
+ "step": 1200
115
+ },
116
+ {
117
+ "epoch": 1.0260457774269929,
118
+ "grad_norm": 6.630244731903076,
119
+ "learning_rate": 1.933603464159779e-05,
120
+ "loss": 0.2235790252685547,
121
+ "step": 1300
122
+ },
123
+ {
124
+ "epoch": 1.1049723756906078,
125
+ "grad_norm": 3.18111252784729,
126
+ "learning_rate": 1.912451377265733e-05,
127
+ "loss": 0.17377975463867187,
128
+ "step": 1400
129
+ },
130
+ {
131
+ "epoch": 1.1838989739542225,
132
+ "grad_norm": 1.588996410369873,
133
+ "learning_rate": 1.888529177336798e-05,
134
+ "loss": 0.18398305892944336,
135
+ "step": 1500
136
+ },
137
+ {
138
+ "epoch": 1.1838989739542225,
139
+ "eval_accuracy": 0.9692,
140
+ "eval_f1": 0.9691,
141
+ "eval_loss": 0.08150316029787064,
142
+ "eval_runtime": 16.4485,
143
+ "eval_samples_per_second": 308.053,
144
+ "eval_steps_per_second": 9.667,
145
+ "step": 1500
146
+ },
147
+ {
148
+ "epoch": 1.2628255722178374,
149
+ "grad_norm": 2.542539119720459,
150
+ "learning_rate": 1.861909489829517e-05,
151
+ "loss": 0.20040679931640626,
152
+ "step": 1600
153
+ },
154
+ {
155
+ "epoch": 1.3417521704814521,
156
+ "grad_norm": 1.4010111093521118,
157
+ "learning_rate": 1.8326731295085838e-05,
158
+ "loss": 0.1535040855407715,
159
+ "step": 1700
160
+ },
161
+ {
162
+ "epoch": 1.420678768745067,
163
+ "grad_norm": 2.9616997241973877,
164
+ "learning_rate": 1.800908855101132e-05,
165
+ "loss": 0.1694472312927246,
166
+ "step": 1800
167
+ },
168
+ {
169
+ "epoch": 1.499605367008682,
170
+ "grad_norm": 8.78850269317627,
171
+ "learning_rate": 1.766713099833931e-05,
172
+ "loss": 0.18262014389038086,
173
+ "step": 1900
174
+ },
175
+ {
176
+ "epoch": 1.5785319652722967,
177
+ "grad_norm": 5.830899715423584,
178
+ "learning_rate": 1.730189678671552e-05,
179
+ "loss": 0.15452383995056151,
180
+ "step": 2000
181
+ },
182
+ {
183
+ "epoch": 1.5785319652722967,
184
+ "eval_accuracy": 0.9722,
185
+ "eval_f1": 0.9721,
186
+ "eval_loss": 0.08517046272754669,
187
+ "eval_runtime": 17.0389,
188
+ "eval_samples_per_second": 297.379,
189
+ "eval_steps_per_second": 9.332,
190
+ "step": 2000
191
+ }
192
+ ],
193
+ "logging_steps": 100,
194
+ "max_steps": 6335,
195
+ "num_input_tokens_seen": 0,
196
+ "num_train_epochs": 5,
197
+ "save_steps": 500,
198
+ "stateful_callbacks": {
199
+ "EarlyStoppingCallback": {
200
+ "args": {
201
+ "early_stopping_patience": 3,
202
+ "early_stopping_threshold": 0.0
203
+ },
204
+ "attributes": {
205
+ "early_stopping_patience_counter": 0
206
+ }
207
+ },
208
+ "TrainerControl": {
209
+ "args": {
210
+ "should_epoch_stop": false,
211
+ "should_evaluate": false,
212
+ "should_log": false,
213
+ "should_save": true,
214
+ "should_training_stop": false
215
+ },
216
+ "attributes": {}
217
+ }
218
+ },
219
+ "total_flos": 8418501327298560.0,
220
+ "train_batch_size": 16,
221
+ "trial_name": null,
222
+ "trial_params": null
223
+ }
checkpoint-2000/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6399d38d06ebeb459d7534aa989f92e96c4483d112f9ce5d7f695596af7f00d
3
+ size 5201
checkpoint-3500/config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "XLMRobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "TRUE",
16
+ "1": "FAKE"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "is_decoder": false,
21
+ "label2id": {
22
+ "FAKE": 1,
23
+ "TRUE": 0
24
+ },
25
+ "layer_norm_eps": 1e-05,
26
+ "max_position_embeddings": 514,
27
+ "model_type": "xlm-roberta",
28
+ "num_attention_heads": 12,
29
+ "num_hidden_layers": 12,
30
+ "output_past": true,
31
+ "pad_token_id": 1,
32
+ "position_embedding_type": "absolute",
33
+ "tie_word_embeddings": true,
34
+ "transformers_version": "5.12.1",
35
+ "type_vocab_size": 1,
36
+ "use_cache": false,
37
+ "vocab_size": 250002
38
+ }
checkpoint-3500/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1dd37401db7582c6eff4c1cae02a6d72d7dca5176df8338bbb291a95731bf024
3
+ size 1112205008
checkpoint-3500/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c78b337dd4d1e59808e2712116499d183ae4ba71920263c402015a08ac5435c1
3
+ size 2224532875
checkpoint-3500/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b88525b5b027c40c3d45a6400a47ebb8f274fbe218c8a908da74a4d6d8f1675a
3
+ size 14645
checkpoint-3500/scaler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7eec9530a8e94fb0be5f11a65bc58a564506ff2ec7f427721f35bf80ff0727b
3
+ size 1383
checkpoint-3500/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f71cd3abc387204e04085410364338ff66913c9db2ae75282da4165bf5307c4
3
+ size 1465
checkpoint-3500/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d237c4974cfea16dffbc5035028fea5b47ad8b653af90c908b7a35bdc8b0d90
3
+ size 17098184
checkpoint-3500/tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "cls_token": "<s>",
6
+ "eos_token": "</s>",
7
+ "is_local": false,
8
+ "local_files_only": false,
9
+ "mask_token": "<mask>",
10
+ "model_max_length": 512,
11
+ "pad_token": "<pad>",
12
+ "sep_token": "</s>",
13
+ "tokenizer_class": "XLMRobertaTokenizer",
14
+ "unk_token": "<unk>"
15
+ }
checkpoint-3500/trainer_state.json ADDED
@@ -0,0 +1,358 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 2000,
3
+ "best_metric": 0.9721,
4
+ "best_model_checkpoint": "./sifta-fakenews-xlmr/checkpoint-2000",
5
+ "epoch": 2.7624309392265194,
6
+ "eval_steps": 500,
7
+ "global_step": 3500,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.07892659826361484,
14
+ "grad_norm": 7.519743919372559,
15
+ "learning_rate": 3.1230283911671926e-06,
16
+ "loss": 1.3593978881835938,
17
+ "step": 100
18
+ },
19
+ {
20
+ "epoch": 0.15785319652722968,
21
+ "grad_norm": 44.37847137451172,
22
+ "learning_rate": 6.2776025236593065e-06,
23
+ "loss": 0.6375294876098633,
24
+ "step": 200
25
+ },
26
+ {
27
+ "epoch": 0.23677979479084452,
28
+ "grad_norm": 3.3530941009521484,
29
+ "learning_rate": 9.43217665615142e-06,
30
+ "loss": 0.3285886001586914,
31
+ "step": 300
32
+ },
33
+ {
34
+ "epoch": 0.31570639305445936,
35
+ "grad_norm": 4.9190993309021,
36
+ "learning_rate": 1.2586750788643533e-05,
37
+ "loss": 0.31189311981201173,
38
+ "step": 400
39
+ },
40
+ {
41
+ "epoch": 0.39463299131807417,
42
+ "grad_norm": 13.304952621459961,
43
+ "learning_rate": 1.574132492113565e-05,
44
+ "loss": 0.28032915115356444,
45
+ "step": 500
46
+ },
47
+ {
48
+ "epoch": 0.39463299131807417,
49
+ "eval_accuracy": 0.9513,
50
+ "eval_f1": 0.951,
51
+ "eval_loss": 0.11800144612789154,
52
+ "eval_runtime": 17.0078,
53
+ "eval_samples_per_second": 297.922,
54
+ "eval_steps_per_second": 9.349,
55
+ "step": 500
56
+ },
57
+ {
58
+ "epoch": 0.47355958958168903,
59
+ "grad_norm": 69.24589538574219,
60
+ "learning_rate": 1.889589905362776e-05,
61
+ "loss": 0.23949861526489258,
62
+ "step": 600
63
+ },
64
+ {
65
+ "epoch": 0.5524861878453039,
66
+ "grad_norm": 77.79669952392578,
67
+ "learning_rate": 1.9993585719507573e-05,
68
+ "loss": 0.26106679916381836,
69
+ "step": 700
70
+ },
71
+ {
72
+ "epoch": 0.6314127861089187,
73
+ "grad_norm": 9.278132438659668,
74
+ "learning_rate": 1.9958691794328414e-05,
75
+ "loss": 0.26748144149780273,
76
+ "step": 800
77
+ },
78
+ {
79
+ "epoch": 0.7103393843725335,
80
+ "grad_norm": 10.259608268737793,
81
+ "learning_rate": 1.9893564256008604e-05,
82
+ "loss": 0.2700900650024414,
83
+ "step": 900
84
+ },
85
+ {
86
+ "epoch": 0.7892659826361483,
87
+ "grad_norm": 1.331714153289795,
88
+ "learning_rate": 1.9798400825377246e-05,
89
+ "loss": 0.23025428771972656,
90
+ "step": 1000
91
+ },
92
+ {
93
+ "epoch": 0.7892659826361483,
94
+ "eval_accuracy": 0.9637,
95
+ "eval_f1": 0.9636,
96
+ "eval_loss": 0.11573408544063568,
97
+ "eval_runtime": 16.2817,
98
+ "eval_samples_per_second": 311.209,
99
+ "eval_steps_per_second": 9.766,
100
+ "step": 1000
101
+ },
102
+ {
103
+ "epoch": 0.8681925808997633,
104
+ "grad_norm": 0.1167285144329071,
105
+ "learning_rate": 1.9673490409291412e-05,
106
+ "loss": 0.22350259780883788,
107
+ "step": 1100
108
+ },
109
+ {
110
+ "epoch": 0.9471191791633781,
111
+ "grad_norm": 21.29085922241211,
112
+ "learning_rate": 1.9519212223543213e-05,
113
+ "loss": 0.24957496643066407,
114
+ "step": 1200
115
+ },
116
+ {
117
+ "epoch": 1.0260457774269929,
118
+ "grad_norm": 6.630244731903076,
119
+ "learning_rate": 1.933603464159779e-05,
120
+ "loss": 0.2235790252685547,
121
+ "step": 1300
122
+ },
123
+ {
124
+ "epoch": 1.1049723756906078,
125
+ "grad_norm": 3.18111252784729,
126
+ "learning_rate": 1.912451377265733e-05,
127
+ "loss": 0.17377975463867187,
128
+ "step": 1400
129
+ },
130
+ {
131
+ "epoch": 1.1838989739542225,
132
+ "grad_norm": 1.588996410369873,
133
+ "learning_rate": 1.888529177336798e-05,
134
+ "loss": 0.18398305892944336,
135
+ "step": 1500
136
+ },
137
+ {
138
+ "epoch": 1.1838989739542225,
139
+ "eval_accuracy": 0.9692,
140
+ "eval_f1": 0.9691,
141
+ "eval_loss": 0.08150316029787064,
142
+ "eval_runtime": 16.4485,
143
+ "eval_samples_per_second": 308.053,
144
+ "eval_steps_per_second": 9.667,
145
+ "step": 1500
146
+ },
147
+ {
148
+ "epoch": 1.2628255722178374,
149
+ "grad_norm": 2.542539119720459,
150
+ "learning_rate": 1.861909489829517e-05,
151
+ "loss": 0.20040679931640626,
152
+ "step": 1600
153
+ },
154
+ {
155
+ "epoch": 1.3417521704814521,
156
+ "grad_norm": 1.4010111093521118,
157
+ "learning_rate": 1.8326731295085838e-05,
158
+ "loss": 0.1535040855407715,
159
+ "step": 1700
160
+ },
161
+ {
162
+ "epoch": 1.420678768745067,
163
+ "grad_norm": 2.9616997241973877,
164
+ "learning_rate": 1.800908855101132e-05,
165
+ "loss": 0.1694472312927246,
166
+ "step": 1800
167
+ },
168
+ {
169
+ "epoch": 1.499605367008682,
170
+ "grad_norm": 8.78850269317627,
171
+ "learning_rate": 1.766713099833931e-05,
172
+ "loss": 0.18262014389038086,
173
+ "step": 1900
174
+ },
175
+ {
176
+ "epoch": 1.5785319652722967,
177
+ "grad_norm": 5.830899715423584,
178
+ "learning_rate": 1.730189678671552e-05,
179
+ "loss": 0.15452383995056151,
180
+ "step": 2000
181
+ },
182
+ {
183
+ "epoch": 1.5785319652722967,
184
+ "eval_accuracy": 0.9722,
185
+ "eval_f1": 0.9721,
186
+ "eval_loss": 0.08517046272754669,
187
+ "eval_runtime": 17.0389,
188
+ "eval_samples_per_second": 297.379,
189
+ "eval_steps_per_second": 9.332,
190
+ "step": 2000
191
+ },
192
+ {
193
+ "epoch": 1.6574585635359116,
194
+ "grad_norm": 14.781915664672852,
195
+ "learning_rate": 1.6914494731443005e-05,
196
+ "loss": 0.17684141159057618,
197
+ "step": 2100
198
+ },
199
+ {
200
+ "epoch": 1.7363851617995265,
201
+ "grad_norm": 14.542154312133789,
202
+ "learning_rate": 1.6506100947227483e-05,
203
+ "loss": 0.16984281539916993,
204
+ "step": 2200
205
+ },
206
+ {
207
+ "epoch": 1.8153117600631412,
208
+ "grad_norm": 2.6693317890167236,
209
+ "learning_rate": 1.607795527760824e-05,
210
+ "loss": 0.16369407653808593,
211
+ "step": 2300
212
+ },
213
+ {
214
+ "epoch": 1.8942383583267561,
215
+ "grad_norm": 35.68703842163086,
216
+ "learning_rate": 1.5631357530914576e-05,
217
+ "loss": 0.16996910095214843,
218
+ "step": 2400
219
+ },
220
+ {
221
+ "epoch": 1.973164956590371,
222
+ "grad_norm": 8.133594512939453,
223
+ "learning_rate": 1.5167663534174963e-05,
224
+ "loss": 0.17478582382202149,
225
+ "step": 2500
226
+ },
227
+ {
228
+ "epoch": 1.973164956590371,
229
+ "eval_accuracy": 0.9722,
230
+ "eval_f1": 0.9721,
231
+ "eval_loss": 0.07743066549301147,
232
+ "eval_runtime": 17.1006,
233
+ "eval_samples_per_second": 296.305,
234
+ "eval_steps_per_second": 9.298,
235
+ "step": 2500
236
+ },
237
+ {
238
+ "epoch": 2.0520915548539858,
239
+ "grad_norm": 3.4671425819396973,
240
+ "learning_rate": 1.468828101695897e-05,
241
+ "loss": 0.14399107933044433,
242
+ "step": 2600
243
+ },
244
+ {
245
+ "epoch": 2.1310181531176005,
246
+ "grad_norm": 29.677196502685547,
247
+ "learning_rate": 1.4194665337648121e-05,
248
+ "loss": 0.15213555335998535,
249
+ "step": 2700
250
+ },
251
+ {
252
+ "epoch": 2.2099447513812156,
253
+ "grad_norm": 7.875465393066406,
254
+ "learning_rate": 1.368831506511036e-05,
255
+ "loss": 0.14315860748291015,
256
+ "step": 2800
257
+ },
258
+ {
259
+ "epoch": 2.2888713496448303,
260
+ "grad_norm": 20.07367706298828,
261
+ "learning_rate": 1.3170767429191709e-05,
262
+ "loss": 0.13439299583435058,
263
+ "step": 2900
264
+ },
265
+ {
266
+ "epoch": 2.367797947908445,
267
+ "grad_norm": 0.5996111631393433,
268
+ "learning_rate": 1.2643593653836975e-05,
269
+ "loss": 0.15156855583190917,
270
+ "step": 3000
271
+ },
272
+ {
273
+ "epoch": 2.367797947908445,
274
+ "eval_accuracy": 0.9714,
275
+ "eval_f1": 0.9712,
276
+ "eval_loss": 0.08889847248792648,
277
+ "eval_runtime": 17.0683,
278
+ "eval_samples_per_second": 296.866,
279
+ "eval_steps_per_second": 9.316,
280
+ "step": 3000
281
+ },
282
+ {
283
+ "epoch": 2.44672454617206,
284
+ "grad_norm": 9.044219970703125,
285
+ "learning_rate": 1.2108394187007715e-05,
286
+ "loss": 0.12777873992919922,
287
+ "step": 3100
288
+ },
289
+ {
290
+ "epoch": 2.525651144435675,
291
+ "grad_norm": 0.1941675990819931,
292
+ "learning_rate": 1.1566793841878931e-05,
293
+ "loss": 0.13878602981567384,
294
+ "step": 3200
295
+ },
296
+ {
297
+ "epoch": 2.6045777426992895,
298
+ "grad_norm": 8.129409790039062,
299
+ "learning_rate": 1.1020436864065368e-05,
300
+ "loss": 0.14199438095092773,
301
+ "step": 3300
302
+ },
303
+ {
304
+ "epoch": 2.6835043409629042,
305
+ "grad_norm": 0.1269533634185791,
306
+ "learning_rate": 1.0470981939852842e-05,
307
+ "loss": 0.12948278427124024,
308
+ "step": 3400
309
+ },
310
+ {
311
+ "epoch": 2.7624309392265194,
312
+ "grad_norm": 4.474359512329102,
313
+ "learning_rate": 9.92009716058909e-06,
314
+ "loss": 0.12795443534851075,
315
+ "step": 3500
316
+ },
317
+ {
318
+ "epoch": 2.7624309392265194,
319
+ "eval_accuracy": 0.9722,
320
+ "eval_f1": 0.972,
321
+ "eval_loss": 0.08592783659696579,
322
+ "eval_runtime": 17.0846,
323
+ "eval_samples_per_second": 296.584,
324
+ "eval_steps_per_second": 9.307,
325
+ "step": 3500
326
+ }
327
+ ],
328
+ "logging_steps": 100,
329
+ "max_steps": 6335,
330
+ "num_input_tokens_seen": 0,
331
+ "num_train_epochs": 5,
332
+ "save_steps": 500,
333
+ "stateful_callbacks": {
334
+ "EarlyStoppingCallback": {
335
+ "args": {
336
+ "early_stopping_patience": 3,
337
+ "early_stopping_threshold": 0.0
338
+ },
339
+ "attributes": {
340
+ "early_stopping_patience_counter": 3
341
+ }
342
+ },
343
+ "TrainerControl": {
344
+ "args": {
345
+ "should_epoch_stop": false,
346
+ "should_evaluate": false,
347
+ "should_log": false,
348
+ "should_save": true,
349
+ "should_training_stop": true
350
+ },
351
+ "attributes": {}
352
+ }
353
+ },
354
+ "total_flos": 1.473211421171712e+16,
355
+ "train_batch_size": 16,
356
+ "trial_name": null,
357
+ "trial_params": null
358
+ }
checkpoint-3500/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6399d38d06ebeb459d7534aa989f92e96c4483d112f9ce5d7f695596af7f00d
3
+ size 5201
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "XLMRobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "TRUE",
16
+ "1": "FAKE"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "is_decoder": false,
21
+ "label2id": {
22
+ "FAKE": 1,
23
+ "TRUE": 0
24
+ },
25
+ "layer_norm_eps": 1e-05,
26
+ "max_position_embeddings": 514,
27
+ "model_type": "xlm-roberta",
28
+ "num_attention_heads": 12,
29
+ "num_hidden_layers": 12,
30
+ "output_past": true,
31
+ "pad_token_id": 1,
32
+ "position_embedding_type": "absolute",
33
+ "tie_word_embeddings": true,
34
+ "transformers_version": "5.12.1",
35
+ "type_vocab_size": 1,
36
+ "use_cache": false,
37
+ "vocab_size": 250002
38
+ }
confusion_matrix.png ADDED
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01813e8912e5a6e170cb27bcdf268caf1ef3dde7339e114d0129c3bc844605af
3
+ size 1112205008
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d237c4974cfea16dffbc5035028fea5b47ad8b653af90c908b7a35bdc8b0d90
3
+ size 17098184
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "cls_token": "<s>",
6
+ "eos_token": "</s>",
7
+ "is_local": false,
8
+ "local_files_only": false,
9
+ "mask_token": "<mask>",
10
+ "model_max_length": 512,
11
+ "pad_token": "<pad>",
12
+ "sep_token": "</s>",
13
+ "tokenizer_class": "XLMRobertaTokenizer",
14
+ "unk_token": "<unk>"
15
+ }