Improve model card for Llama-3.2-1B-subjectivity-english: Add metadata, usage, and project details
#1
by
nielsr
HF Staff
- opened
README.md
CHANGED
@@ -1,26 +1,31 @@
|
|
1 |
---
|
2 |
-
library_name: peft
|
3 |
-
license: llama3.2
|
4 |
base_model: meta-llama/Llama-3.2-1B
|
5 |
-
|
6 |
-
-
|
|
|
|
|
7 |
metrics:
|
8 |
- accuracy
|
9 |
- f1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
model-index:
|
11 |
- name: Llama-3.2-1B-subjectivity-english
|
12 |
results: []
|
13 |
-
language:
|
14 |
-
- en
|
15 |
---
|
16 |
|
17 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
18 |
-
should probably proofread and complete it, then remove this comment. -->
|
19 |
-
|
20 |
# Llama-3.2-1B-subjectivity-english
|
21 |
|
22 |
-
This model is a fine-tuned version of [meta-llama/Llama-3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B)
|
23 |
-
|
|
|
24 |
- Loss: 0.6766
|
25 |
- Macro F1: 0.7718
|
26 |
- Macro P: 0.7731
|
@@ -32,15 +37,58 @@ It achieves the following results on the evaluation set:
|
|
32 |
|
33 |
## Model description
|
34 |
|
35 |
-
|
|
|
|
|
36 |
|
37 |
## Intended uses & limitations
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
## Training and evaluation data
|
42 |
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
## Training procedure
|
46 |
|
@@ -66,11 +114,40 @@ The following hyperparameters were used during training:
|
|
66 |
| No log | 5.0 | 260 | 0.6430 | 0.7693 | 0.7716 | 0.7689 | 0.7863 | 0.7617 | 0.8125 | 0.7706 |
|
67 |
| No log | 6.0 | 312 | 0.6766 | 0.7718 | 0.7731 | 0.7715 | 0.7862 | 0.7689 | 0.8042 | 0.7727 |
|
68 |
|
69 |
-
|
70 |
### Framework versions
|
71 |
|
72 |
- PEFT 0.14.0
|
73 |
- Transformers 4.49.0
|
74 |
- Pytorch 2.5.1+cu121
|
75 |
- Datasets 3.3.1
|
76 |
-
- Tokenizers 0.21.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
|
|
|
|
2 |
base_model: meta-llama/Llama-3.2-1B
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
library_name: transformers
|
6 |
+
license: cc-by-4.0
|
7 |
metrics:
|
8 |
- accuracy
|
9 |
- f1
|
10 |
+
pipeline_tag: text-classification
|
11 |
+
tags:
|
12 |
+
- generated_from_trainer
|
13 |
+
- subjectivity-detection
|
14 |
+
- news-articles
|
15 |
+
- sentiment-augmented
|
16 |
+
- clef-2025
|
17 |
+
- llm-finetune
|
18 |
+
- peft
|
19 |
model-index:
|
20 |
- name: Llama-3.2-1B-subjectivity-english
|
21 |
results: []
|
|
|
|
|
22 |
---
|
23 |
|
|
|
|
|
|
|
24 |
# Llama-3.2-1B-subjectivity-english
|
25 |
|
26 |
+
This model is a fine-tuned version of [meta-llama/Llama-3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B) for **Subjectivity Detection in News Articles**. It was presented by AI Wizards in the paper [AI Wizards at CheckThat! 2025: Enhancing Transformer-Based Embeddings with Sentiment for Subjectivity Detection in News Articles](https://huggingface.co/papers/2507.11764).
|
27 |
+
|
28 |
+
This model achieves the following results on the evaluation set:
|
29 |
- Loss: 0.6766
|
30 |
- Macro F1: 0.7718
|
31 |
- Macro P: 0.7731
|
|
|
37 |
|
38 |
## Model description
|
39 |
|
40 |
+
This model, `Llama-3.2-1B-subjectivity-english`, is part of AI Wizards' participation in the CLEF 2025 CheckThat! Lab Task 1: Subjectivity Detection in News Articles. Its core purpose is to classify sentences as subjective (opinion-laden) or objective.
|
41 |
+
|
42 |
+
The model is based on the Llama 3.2-1B architecture and is fine-tuned using Parameter-Efficient Fine-Tuning (PEFT), specifically LoRA. A key innovation of this work is the enhancement of transformer-based classifiers by integrating sentiment scores, derived from an auxiliary model, with the sentence representations. This sentiment-augmented architecture aims to improve upon standard fine-tuning approaches, particularly boosting performance on the subjective F1 score. Additionally, decision threshold calibration was employed to address class imbalance prevalent across the datasets.
|
43 |
|
44 |
## Intended uses & limitations
|
45 |
|
46 |
+
**Intended Uses:**
|
47 |
+
This model is intended for classifying sentences in news articles as either subjective or objective. Potential applications include:
|
48 |
+
* Combating misinformation by identifying opinionated content.
|
49 |
+
* Improving fact-checking pipelines.
|
50 |
+
* Supporting journalists in analyzing and curating news articles.
|
51 |
+
|
52 |
+
While this specific model is fine-tuned for English, the underlying framework was also explored for multilingual and zero-shot settings as part of the broader project.
|
53 |
+
|
54 |
+
**Limitations:**
|
55 |
+
* In the original research, BERT-like models (e.g., mDeBERTaV3-base, ModernBERT-base) consistently outperformed LLM baselines like `Llama-3.2-1B` in most scenarios. This `Llama-3.2-1B` model served as a zero-shot baseline with a classifier added on top of its embeddings.
|
56 |
+
* The model's performance may vary on highly nuanced or ambiguous texts, or on text domains significantly different from news articles.
|
57 |
+
* Generalization to unseen languages in zero-shot settings, while explored in the paper, should be re-evaluated for specific applications.
|
58 |
|
59 |
## Training and evaluation data
|
60 |
|
61 |
+
This model was fine-tuned on the English split of the datasets provided for the **CLEF 2025 CheckThat! Lab Task 1: Subjectivity Detection in News Articles**.
|
62 |
+
|
63 |
+
The overall project utilized training and development datasets for Arabic, German, English, Italian, and Bulgarian. The final evaluation included additional unseen languages such as Greek, Romanian, Polish, and Ukrainian to assess generalization capabilities. Decision threshold calibration was applied during training to mitigate class imbalance issues across languages.
|
64 |
+
|
65 |
+
## How to use
|
66 |
+
|
67 |
+
You can use this model for text classification with the `pipeline` function from the `transformers` library.
|
68 |
+
|
69 |
+
```python
|
70 |
+
from transformers import pipeline
|
71 |
+
|
72 |
+
# Initialize the text classification pipeline
|
73 |
+
classifier = pipeline(
|
74 |
+
"text-classification",
|
75 |
+
model="MatteoFasulo/Llama-3.2-1B-subjectivity-english",
|
76 |
+
tokenizer="meta-llama/Llama-3.2-1B", # Use the tokenizer of the base model
|
77 |
+
device=0 # Specify device for GPU usage, or -1 for CPU
|
78 |
+
)
|
79 |
+
|
80 |
+
# Example 1: Subjective sentence
|
81 |
+
text_subjective = "This film is an absolute masterpiece, truly breathtaking!"
|
82 |
+
result_subjective = classifier(text_subjective)
|
83 |
+
print(f"'{text_subjective}' -> {result_subjective}")
|
84 |
+
# Expected output: [{'label': 'LABEL_1', 'score': X.XXX}] (Assuming LABEL_1 is subjective)
|
85 |
+
|
86 |
+
# Example 2: Objective sentence
|
87 |
+
text_objective = "The company's quarterly report showed a 5% increase in net profit."
|
88 |
+
result_objective = classifier(text_objective)
|
89 |
+
print(f"'{text_objective}' -> {result_objective}")
|
90 |
+
# Expected output: [{'label': 'LABEL_0', 'score': X.XXX}] (Assuming LABEL_0 is objective)
|
91 |
+
```
|
92 |
|
93 |
## Training procedure
|
94 |
|
|
|
114 |
| No log | 5.0 | 260 | 0.6430 | 0.7693 | 0.7716 | 0.7689 | 0.7863 | 0.7617 | 0.8125 | 0.7706 |
|
115 |
| No log | 6.0 | 312 | 0.6766 | 0.7718 | 0.7731 | 0.7715 | 0.7862 | 0.7689 | 0.8042 | 0.7727 |
|
116 |
|
|
|
117 |
### Framework versions
|
118 |
|
119 |
- PEFT 0.14.0
|
120 |
- Transformers 4.49.0
|
121 |
- Pytorch 2.5.1+cu121
|
122 |
- Datasets 3.3.1
|
123 |
+
- Tokenizers 0.21.0
|
124 |
+
|
125 |
+
## Code
|
126 |
+
|
127 |
+
The official code and materials for AI Wizards' submission to CLEF 2025 CheckThat! Lab are available on GitHub:
|
128 |
+
[https://github.com/MatteoFasulo/clef2025-checkthat](https://github.com/MatteoFasulo/clef2025-checkthat)
|
129 |
+
|
130 |
+
## Project Page
|
131 |
+
|
132 |
+
You can explore a collection of models and results related to this work on the Hugging Face Hub:
|
133 |
+
[AI Wizards @ CLEF 2025 - CheckThat! Lab - Task 1 Subjectivity](https://huggingface.co/collections/MatteoFasulo/clef-2025-checkthat-lab-task-1-subjectivity-6878f0199d302acdfe2ceddb)
|
134 |
+
|
135 |
+
## Citation
|
136 |
+
|
137 |
+
If you find our work helpful or inspiring, please feel free to cite it:
|
138 |
+
|
139 |
+
```bibtex
|
140 |
+
@misc{fasulo2025aiwizardscheckthat2025,
|
141 |
+
title={AI Wizards at CheckThat! 2025: Enhancing Transformer-Based Embeddings with Sentiment for Subjectivity Detection in News Articles},
|
142 |
+
author={Matteo Fasulo and Luca Babboni and Luca Tedeschini},
|
143 |
+
year={2025},
|
144 |
+
eprint={2507.11764},
|
145 |
+
archivePrefix={arXiv},
|
146 |
+
primaryClass={cs.CL},
|
147 |
+
url={https://arxiv.org/abs/2507.11764},
|
148 |
+
}
|
149 |
+
```
|
150 |
+
|
151 |
+
## License
|
152 |
+
|
153 |
+
This research work, including the paper and the code, is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/) (CC BY 4.0). Please note that the underlying base model, [Llama 3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B), has its own specific usage license, which should also be consulted.
|