File size: 2,066 Bytes
bf0c709
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: other
tags:
- generated_from_trainer
model-index:
- name: distilroberta-topic-classification
  results: []
datasets:
- valurank/Topic_Classification
language:
- en
metrics:
- f1
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# distilroberta-topic-classification

This model is a fine-tuned version of [distilroberta-topic-base](https://huggingface.co/distilroberta-base) on a dataset of headlines.
It achieves the following results on the evaluation set:
- Loss: 2.235735
- F1: 0.756

## Training and evaluation data

The following data sources were used:
* 22k News articles classified into 120 different topics from [Hugging face](https://huggingface.co/datasets/valurank/Topic_Classification)

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 12345
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 16
- num_epochs: 10
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | F1     |
|:-------------:|:-----:|:----:|:---------------:|:------:|
| 2.3851        | 1.0   | 561  | 2.3445          | 0.6495 |
| 2.1441        | 2.0   | 1122 | 2.1980          | 0.7019 |
| 1.9992        | 3.0   | 1683 | 2.1720          | 0.7189 |
| 1.8384        | 4.0   | 2244 | 2.1425          | 0.7403 |
| 1.7468        | 5.0   | 2805 | 2.1666          | 0.7453 |
| 1.6360        | 6.0   | 3366 | 2.1779          | 0.7456 |
| 1.5935        | 7.0   | 3927 | 2.2003          | 0.7555 |
| 1.5460        | 8.0   | 4488 | 2.2157          | 0.7575 |
| 1.5510        | 9.0   | 5049 | 2.2300          | 0.7536 |
 | 1.5097       | 10.0  | 5610 | 2.2357          | 0.7547 |

### Framework versions

- Transformers 4.35.2
- Pytorch 2.1.0
- Datasets 2.15.0
- Tokenizers 0.15.0