File size: 2,381 Bytes
90e516a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bd7427e
 
 
 
 
e7c4964
 
df335fc
 
90e516a
bd7427e
90e516a
bd7427e
90e516a
bd7427e
 
 
90e516a
bd7427e
90e516a
bd7427e
 
 
90e516a
bd7427e
90e516a
bd7427e
90e516a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
base_model: studio-ousia/mluke-large-lite
tags:
- generated_from_trainer
metrics:
- accuracy
- precision
- recall
- f1
model-index:
- name: out
  results: []
---

<!-- 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. -->

## Fine-tuning
- this model was trained to classify whether input text comes from "chosen sentence" or "rejected sentence"
- the probability (logits after passing softmax function) in last layer of this model can be used to quantify the preference from user input
- fine-tuned [studio-ousia/mluke-large-lite](https://huggingface.co/studio-ousia/mluke-large-lite) via full parameter tuning using [open-preference-v0.3](https://huggingface.co/datasets/ryota39/open_preference-v0.3)
- trained on bf16 format
- Label 0 stands for rejected sentence
- Label 1 stands for chosen sentence
- **Note that this model can handle only 512 tokens in maximum**
  - **The limitation arises from Luke-based pre-trained model**

## Metric

- train and validation split

|train loss|eval loss|accuracy|recall|precision|f1-score|
|:---|:---|:---|:---|:---|:---|
|0.114|0.1615|0.9399|0.9459|0.9346|0.9402|

- test split

|accuracy|recall|precision|f1-score|
|:---|:---|:---|:---|
|0.9416|0.9319|0.9504|0.9411|

- confusion matrix when test split

![image/png](https://cdn-uploads.huggingface.co/production/uploads/651e3f30ca333f3c8df692b8/00ONMe0qlqv7XB14ttrPY.png)

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
| 0.4109        | 1.0   | 1479 | 0.2462          | 0.9003   | 0.8710    | 0.9399 | 0.9041 |
| 0.1579        | 2.0   | 2958 | 0.1573          | 0.9399   | 0.9495    | 0.9293 | 0.9393 |
| 0.114         | 3.0   | 4437 | 0.1615          | 0.9399   | 0.9346    | 0.9460 | 0.9403 |


### Framework versions

- Transformers 4.42.3
- Pytorch 2.1.0+cu118
- Datasets 2.20.0
- Tokenizers 0.19.1