File size: 1,931 Bytes
560482d
 
 
 
 
 
 
 
 
fed1693
560482d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fed1693
560482d
 
 
 
 
 
 
 
 
 
 
 
 
 
e1320a6
c118243
560482d
 
 
 
 
 
 
6a6d71a
 
560482d
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- en
license: apache-2.0
datasets:
- glue
metrics:
- accuracy
model-index:
- name: t5-base-finetuned-rte
  results:
  - task:
      name: Text Classification
      type: text-classification
    dataset:
      name: GLUE RTE
      type: glue
      args: rte
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.5634
---


# T5-base-finetuned-rte

<!-- Provide a quick summary of what the model is/does. -->

This model is T5 fine-tuned on GLUE RTE dataset. It acheives the following results on the validation set
- Accuracy: 0.7690


## Model Details
T5 is an encoder-decoder model pre-trained on a multi-task mixture of unsupervised and supervised tasks and for which each task is converted into a text-to-text format. 

## Training procedure

### Tokenization
Since, T5 is a text-to-text model, the labels of the dataset are converted as follows:
For each example, a sentence as been formed as **"rte sentence1: " + rte_sent1 + "sentence 2: " + rte_sent2** and fed to the tokenizer to get the **input_ids** and **attention_mask**.
For each label, target is choosen as **"entailment"** if label is 0, else label is **"not_entailment"** and tokenized to get **input_ids** and **attention_mask** . 
  During training, these inputs_ids having **pad** token are replaced with -100 so that loss is not calculated for them. Then these input ids are given as labels, and above attention_mask of labels
  is given as decoder attention mask.

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 3e-4
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: epsilon=1e-08
- num_epochs: 3.0

### Training results


|Epoch | Training Loss | Validation Accuracy |
|:----:|:-------------:|:-------------------:|
|   1  |    0.1099     | 0.7617             |
|   2  |    0.0573     | 0.7617             |
|   3  |    0.0276     | 0.7690             |