This is a Huggingface model fine-tuned on the CNN news dataset for zero-shot text classification task using BART-MNLI. The model achieved an f1 score of 94% and an accuracy of 94% on the CNN test dataset with a maximum length of 128 tokens.
The BART-Large-MNLI model has 12 transformer layers, a hidden size of 1024, and 406 million parameters. It is pre-trained on the English Wikipedia and BookCorpus datasets, and fine-tuned on the Multi-Genre Natural Language Inference (MNLI) task.
Dataset
The CNN news dataset was used for fine-tuning the model. This dataset contains news articles from the CNN website and is labeled into 6 categories, including politics, health, entertainment, tech, travel, world, and sports.
Fine-tuning Parameters
The model was fine-tuned for 1 epoch on a maximum length of 256 tokens. The training took approximately 6 hours to complete.
Evaluation Metrics
The model achieved an f1 score of 94% and an accuracy of 94% on the CNN test dataset with a maximum length of 128 tokens.
Usage
The model can be used for zero-shot text classification tasks on news articles. It can be accessed via the Huggingface Transformers library using the following code:
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("AyoubChLin/Bart-MNLI-CNN_news")
model = AutoModelForSequenceClassification.from_pretrained("AyoubChLin/Bart-MNLI-CNN_news")
classifier = pipeline(
"zero-shot-classification",
model=model,
tokenizer=tokenizer,
device=0
)
Acknowledgments
We would like to acknowledge the Huggingface team for their open-source implementation of transformer models and the CNN news dataset for providing the labeled dataset for fine-tuning.
Runs of AyoubChLin Bart-MNLI-CNN_news on huggingface.co
84
Total runs
17
24-hour runs
37
3-day runs
51
7-day runs
54
30-day runs
More Information About Bart-MNLI-CNN_news huggingface.co Model
Bart-MNLI-CNN_news huggingface.co is an AI model on huggingface.co that provides Bart-MNLI-CNN_news's model effect (), which can be used instantly with this AyoubChLin Bart-MNLI-CNN_news model. huggingface.co supports a free trial of the Bart-MNLI-CNN_news model, and also provides paid use of the Bart-MNLI-CNN_news. Support call Bart-MNLI-CNN_news model through api, including Node.js, Python, http.
Bart-MNLI-CNN_news huggingface.co is an online trial and call api platform, which integrates Bart-MNLI-CNN_news's modeling effects, including api services, and provides a free online trial of Bart-MNLI-CNN_news, you can try Bart-MNLI-CNN_news online for free by clicking the link below.
AyoubChLin Bart-MNLI-CNN_news online free url in huggingface.co:
Bart-MNLI-CNN_news is an open source model from GitHub that offers a free installation service, and any user can find Bart-MNLI-CNN_news on GitHub to install. At the same time, huggingface.co provides the effect of Bart-MNLI-CNN_news install, users can directly use Bart-MNLI-CNN_news installed effect in huggingface.co for debugging and trial. It also supports api for free installation.