Instructions to use aequa-tech/flame-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aequa-tech/flame-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="aequa-tech/flame-it")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("aequa-tech/flame-it") model = AutoModelForSequenceClassification.from_pretrained("aequa-tech/flame-it", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| license: apache-2.0 | |
| metrics: | |
| - accuracy | |
| - f1 | |
| pipeline_tag: text-classification | |
| tags: | |
| - flame | |
| language: | |
| - it | |
| # Flame detection at aequa-tech | |
| ## cite this work | |
| ``` | |
| @inproceedings{arthur2023debunker, | |
| title={Debunker Assistant: a support for detecting online misinformation}, | |
| author={Arthur, Thomas Edward Capozzi Lupi and Cignarella, Alessandra Teresa and Frenda, Simona and Lai, Mirko and Stranisci, Marco Antonio and Urbinati, Alessandra and others}, | |
| booktitle={Proceedings of the Ninth Italian Conference on Computational Linguistics (CLiC-it 2023)}, | |
| volume={3596}, | |
| pages={1--5}, | |
| year={2023}, | |
| organization={Federico Boschetti, Gianluca E. Lebani, Bernardo Magnini, Nicole Novielli} | |
| } | |
| ``` | |
| ## Model Description | |
| - **Developed by:** [aequa-tech](https://aequa-tech.com/) | |
| - **Funded by:** [NGI-Search](https://www.ngi.eu/ngi-projects/ngi-search/) | |
| - **Language(s) (NLP):** Italian | |
| - **License:** apache-2.0 | |
| - **Finetuned from model:** [AlBERTo](https://huggingface.co/m-polignano-uniba/bert_uncased_L-12_H-768_A-12_italian_alberto) | |
| This model is a fine-tuned version of [AlBERTo](https://huggingface.co/m-polignano-uniba/bert_uncased_L-12_H-768_A-12_italian_alberto) Italian model on **flame detection** | |
| # Training Details | |
| ## Training Data | |
| - [HaSpeeDe 2020](https://live.european-language-grid.eu/catalogue/corpus/7498) | |
| - [Sarcastic Hate Speech dataset](https://github.com/simonasnow/Sarcastic-Hate-Speech) | |
| - [HaSpeeDe 2023](https://github.com/mirkolai/EVALITA2023-HaSpeeDe3) | |
| - [Debunker-Assistant corpus](https://github.com/AequaTech/DebunkerAssistant/tree/main/evaluation/training_datasets) | |
| ## Training Hyperparameters | |
| - learning_rate: 2e-5 | |
| - train_batch_size: 16 | |
| - eval_batch_size: 16 | |
| - seed: 42 | |
| - optimizer: Adam | |
| # Evaluation | |
| ## Testing Data | |
| It was tested on HaSpeeDe 2020 test sets (tweets and news headlines) obtaining the following results: | |
| ## Metrics and Results | |
| Tweets: | |
| - macro F1: 0.81 | |
| - accuracy: 0.81 | |
| - precision of positive class: 0.77 | |
| - recall of positive class: 0.88 | |
| - F1 of positive class: 0.82 | |
| News Headlines: | |
| - macro F1: 0.64 | |
| - accuracy: 0.73 | |
| - precision of positive class: 0.79 | |
| - recall of positive class: 0.33 | |
| - F1 of positive class: 0.47 | |
| # Framework versions | |
| - Transformers 4.30.2 | |
| - Pytorch 2.1.2 | |
| - Datasets 2.19.0 | |
| - Accelerate 0.30.0 | |
| # How to use this model: | |
| ```Python | |
| model = AutoModelForSequenceClassification.from_pretrained('aequa-tech/flame-it',num_labels=2) | |
| tokenizer = AutoTokenizer.from_pretrained("m-polignano-uniba/bert_uncased_L-12_H-768_A-12_italian_alb3rt0") | |
| classifier = pipeline("text-classification", model=model, tokenizer=tokenizer) | |
| classifier("text") | |
| ``` |