Instructions to use darkdwine/news_classification_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use darkdwine/news_classification_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="darkdwine/news_classification_model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("darkdwine/news_classification_model") model = AutoModelForSequenceClassification.from_pretrained("darkdwine/news_classification_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 2,108 Bytes
c314280 8726ae5 c314280 8726ae5 c314280 8726ae5 c314280 8726ae5 c314280 8726ae5 c314280 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | ---
license: apache-2.0
base_model: distilbert-base-uncased
tags:
- generated_from_keras_callback
model-index:
- name: news_classification_model
results: []
---
# news_classification_model
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on an unknown dataset.
It achieves the following results on the evaluation set:
- Train Loss: 0.0865
- Train Accuracy: 0.9712
- Validation Loss: 1.5070
- Validation Accuracy: 0.7252
- Epoch: 1
## Model description
Output Labels of this Model are:
- 'HEALTH & MEDICINE': 0,
- 'ENTERTAINMENT': 1,
- 'FINANCE': 2,
- 'SCIENCE & TECHNOLOGY': 3,
- 'WORLD NEWS': 4,
- 'EDUCATION': 5,
- 'SOCIETY': 6,
- 'POLITICS': 7,
- 'ENVIRONMENT': 8,
- 'BUSINESS': 9,
- 'MEDIA': 10,
- 'FOOD': 11,
- 'CRIME': 12,
- 'LIFESTYLE': 13,
- 'SPORTS': 14
## Intended uses & limitations
This models classifies News headlines into different categories mentioned above.
## Training and evaluation data
Model was trained and evaluated using the dataset available here: https://www.kaggle.com/datasets/rmisra/news-category-dataset
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- optimizer: {'name': 'Adam',
- 'weight_decay': None,
- 'clipnorm': None,
- 'global_clipnorm': None,
- 'clipvalue': None,
- 'use_ema': False,
- 'ema_momentum': 0.99,
- 'ema_overwrite_frequency': None,
- 'jit_compile': True,
- 'is_legacy_optimizer': False,
- 'learning_rate': 5e-05,
- 'beta_1': 0.9,
- 'beta_2': 0.999,
- 'epsilon': 1e-07,
- 'amsgrad': False}
- training_precision: float32
### Training results
Upon the second round of trainning, the results were as follows:
| Train Loss | Train Accuracy | Validation Loss | Validation Accuracy | Epoch |
|:----------:|:--------------:|:---------------:|:-------------------:|:-----:|
| 0.1022 | 0.9666 | 1.4192 | 0.7276 | 0 |
| 0.0865 | 0.9712 | 1.5070 | 0.7252 | 1 |
### Framework versions
- Transformers 4.33.1
- TensorFlow 2.13.0
- Tokenizers 0.13.3
|