Downloads · 30 days
158
3% of all-time downloads
AyoubChLin/distilBART-mnli-cnn_news
distilBART-mnli-cnn_news is a zero-shot classification model from AyoubChLin. Use it when you need labels you did not train the model on. It is set up for transformers. The card lists the license as apache-2.0.
This is a Huggingface model fine-tuned on the CNN news dataset for zero-shot text classification task using DistilBART-MNLI. The model achieved an f1 score of 93% and an accuracy of 93% on the CNN test dataset with a…
Downloads · 30 days
158
3% of all-time downloads
All-time downloads
5.3K
Public
Parameters
307M
2.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin1.2 GB · 50%
From the Hugging Face model README
This is a Huggingface model fine-tuned on the CNN news dataset for zero-shot text classification task using DistilBART-MNLI. The model achieved an f1 score of 93% and an accuracy of 93% on the CNN test dataset with a maximum length of 128 tokens.
This work was done by CHERGUELAINE Ayoub & BOUBEKRI Faycal
The model architecture is based on the DistilBART-MNLI transformer model. DistilBART is a smaller and faster version of BART that is pre-trained on a large corpus of text and fine-tuned on downstream natural language processing tasks.
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.
The model was fine-tuned for 1 epoch on a maximum length of 256 tokens. The training took approximately 6 hours to complete.
The model achieved an f1 score of 93% and an accuracy of 93% on the CNN test dataset with a maximum length of 128 tokens.
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/DistilBart_cnn_zeroShot")
model = AutoModelForSequenceClassification.from_pretrained("AyoubChLin/DistilBart_cnn_zeroShot")
classifier = pipeline(
"zero-shot-classification",
model=model,
tokenizer=tokenizer,
device=0
)
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.