Instructions to use Alirezamp/news-category-classifier-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Alirezamp/news-category-classifier-distilbert with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("distilbert/distilbert-base-uncased") model = PeftModel.from_pretrained(base_model, "Alirezamp/news-category-classifier-distilbert") - Notebooks
- Google Colab
- Kaggle
Model save
Browse files
README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: distilbert/distilbert-base-uncased
|
| 3 |
+
library_name: peft
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
metrics:
|
| 6 |
+
- accuracy
|
| 7 |
+
tags:
|
| 8 |
+
- generated_from_trainer
|
| 9 |
+
model-index:
|
| 10 |
+
- name: news-category-classifier-distilbert
|
| 11 |
+
results: []
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
+
|
| 17 |
+
# news-category-classifier-distilbert
|
| 18 |
+
|
| 19 |
+
This model is a fine-tuned version of [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) on the None dataset.
|
| 20 |
+
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 0.1640
|
| 22 |
+
- Accuracy: 0.9474
|
| 23 |
+
|
| 24 |
+
## Model description
|
| 25 |
+
|
| 26 |
+
More information needed
|
| 27 |
+
|
| 28 |
+
## Intended uses & limitations
|
| 29 |
+
|
| 30 |
+
More information needed
|
| 31 |
+
|
| 32 |
+
## Training and evaluation data
|
| 33 |
+
|
| 34 |
+
More information needed
|
| 35 |
+
|
| 36 |
+
## Training procedure
|
| 37 |
+
|
| 38 |
+
### Training hyperparameters
|
| 39 |
+
|
| 40 |
+
The following hyperparameters were used during training:
|
| 41 |
+
- learning_rate: 0.0002
|
| 42 |
+
- train_batch_size: 32
|
| 43 |
+
- eval_batch_size: 128
|
| 44 |
+
- seed: 42
|
| 45 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 46 |
+
- lr_scheduler_type: linear
|
| 47 |
+
- lr_scheduler_warmup_steps: 500
|
| 48 |
+
- num_epochs: 10
|
| 49 |
+
- mixed_precision_training: Native AMP
|
| 50 |
+
|
| 51 |
+
### Training results
|
| 52 |
+
|
| 53 |
+
| Training Loss | Epoch | Step | Accuracy | Validation Loss |
|
| 54 |
+
|:-------------:|:-----:|:-----:|:--------:|:---------------:|
|
| 55 |
+
| 0.3293 | 1.0 | 2289 | 0.9119 | 0.2599 |
|
| 56 |
+
| 0.0576 | 2.0 | 4578 | 0.9193 | 0.2425 |
|
| 57 |
+
| 0.4575 | 3.0 | 6867 | 0.9223 | 0.2401 |
|
| 58 |
+
| 0.0339 | 4.0 | 9156 | 0.9245 | 0.2353 |
|
| 59 |
+
| 0.0512 | 5.0 | 11445 | 0.9267 | 0.2367 |
|
| 60 |
+
| 0.3254 | 6.0 | 13734 | 0.9267 | 0.2367 |
|
| 61 |
+
| 0.5933 | 7.0 | 16023 | 0.9482 | 0.1654 |
|
| 62 |
+
| 0.136 | 8.0 | 18312 | 0.9482 | 0.1654 |
|
| 63 |
+
| 0.3128 | 9.0 | 20601 | 0.1640 | 0.9474 |
|
| 64 |
+
| 0.0458 | 10.0 | 22890 | 0.1640 | 0.9474 |
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
### Framework versions
|
| 68 |
+
|
| 69 |
+
- PEFT 0.12.0
|
| 70 |
+
- Transformers 4.42.3
|
| 71 |
+
- Pytorch 2.1.2
|
| 72 |
+
- Datasets 2.20.0
|
| 73 |
+
- Tokenizers 0.19.1
|