Text Classification
Transformers
Safetensors
distilbert
Generated from Trainer
text-embeddings-inference
Instructions to use ContextNews/news-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ContextNews/news-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ContextNews/news-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ContextNews/news-classifier") model = AutoModelForSequenceClassification.from_pretrained("ContextNews/news-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
news-classifier
This model is a fine-tuned version of distilbert-base-uncased on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.1354
- F1 Micro: 0.8373
- F1 Macro: 0.7917
- Precision: 0.8792
- Recall: 0.7992
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 32
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss | F1 Micro | F1 Macro | Precision | Recall |
|---|---|---|---|---|---|---|---|
| 0.2000 | 1.0 | 500 | 0.1929 | 0.7639 | 0.6071 | 0.8548 | 0.6904 |
| 0.1472 | 2.0 | 1000 | 0.1532 | 0.8114 | 0.7259 | 0.8892 | 0.7461 |
| 0.1292 | 3.0 | 1500 | 0.1421 | 0.8265 | 0.7534 | 0.8891 | 0.7722 |
Framework versions
- Transformers 5.0.0
- Pytorch 2.9.0+cu128
- Datasets 4.0.0
- Tokenizers 0.22.2
- Downloads last month
- 30
Model tree for ContextNews/news-classifier
Base model
distilbert/distilbert-base-uncased