File size: 7,328 Bytes
49f6018
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
74
75
76
77
78
79
80
81
82
83
84
85
86
---
license: apache-2.0
base_model: allenai/longformer-base-4096
tags:
- generated_from_trainer
datasets:
- essays_su_g
metrics:
- accuracy
model-index:
- name: longformer-spans
  results:
  - task:
      name: Token Classification
      type: token-classification
    dataset:
      name: essays_su_g
      type: essays_su_g
      config: spans
      split: test
      args: spans
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.9421333619979219
---

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

# longformer-spans

This model is a fine-tuned version of [allenai/longformer-base-4096](https://huggingface.co/allenai/longformer-base-4096) on the essays_su_g dataset.
It achieves the following results on the evaluation set:
- Loss: 0.1716
- B: {'precision': 0.8420123565754634, 'recall': 0.9008498583569405, 'f1-score': 0.8704379562043796, 'support': 1059.0}
- I: {'precision': 0.9520763187429854, 'recall': 0.965348506401138, 'f1-score': 0.9586664783161464, 'support': 17575.0}
- O: {'precision': 0.9350156319785619, 'recall': 0.9028571428571428, 'f1-score': 0.9186550381218803, 'support': 9275.0}
- Accuracy: 0.9421
- Macro avg: {'precision': 0.9097014357656702, 'recall': 0.9230185025384072, 'f1-score': 0.9159198242141354, 'support': 27909.0}
- Weighted avg: {'precision': 0.9422301900506126, 'recall': 0.9421333619979219, 'f1-score': 0.9420216643594235, 'support': 27909.0}

## 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: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 6

### Training results

| Training Loss | Epoch | Step | Validation Loss | B                                                                                                                  | I                                                                                                                   | O                                                                                                                  | Accuracy | Macro avg                                                                                                           | Weighted avg                                                                                                        |
|:-------------:|:-----:|:----:|:---------------:|:------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------:|:--------:|:-------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------:|
| No log        | 1.0   | 41   | 0.2779          | {'precision': 0.8035190615835777, 'recall': 0.5174693106704438, 'f1-score': 0.6295232624928202, 'support': 1059.0} | {'precision': 0.9134303762702555, 'recall': 0.9461735419630156, 'f1-score': 0.9295136948015652, 'support': 17575.0} | {'precision': 0.8836178230990911, 'recall': 0.8595148247978437, 'f1-score': 0.8713996830081434, 'support': 9275.0} | 0.9011   | {'precision': 0.8668557536509748, 'recall': 0.7743858924771011, 'f1-score': 0.8101455467675095, 'support': 27909.0} | {'precision': 0.8993522110577526, 'recall': 0.9011071697301946, 'f1-score': 0.8988175993771879, 'support': 27909.0} |
| No log        | 2.0   | 82   | 0.1973          | {'precision': 0.8130590339892666, 'recall': 0.8583569405099151, 'f1-score': 0.8350941662838769, 'support': 1059.0} | {'precision': 0.9326064325242452, 'recall': 0.9684779516358464, 'f1-score': 0.9502037626304918, 'support': 17575.0} | {'precision': 0.9385245901639344, 'recall': 0.8641509433962264, 'f1-score': 0.899803536345776, 'support': 9275.0}  | 0.9296   | {'precision': 0.8947300188924822, 'recall': 0.896995278513996, 'f1-score': 0.8950338217533815, 'support': 27909.0}  | {'precision': 0.9300370182514147, 'recall': 0.9296284352717761, 'f1-score': 0.9290864470218421, 'support': 27909.0} |
| No log        | 3.0   | 123  | 0.1836          | {'precision': 0.788197251414713, 'recall': 0.9206798866855525, 'f1-score': 0.8493031358885017, 'support': 1059.0}  | {'precision': 0.938334252619967, 'recall': 0.9679658605974395, 'f1-score': 0.9529197591373757, 'support': 17575.0}  | {'precision': 0.943807070943573, 'recall': 0.8692183288409704, 'f1-score': 0.904978391423921, 'support': 9275.0}   | 0.9334   | {'precision': 0.8901128583260842, 'recall': 0.9192880253746541, 'f1-score': 0.9024004288165995, 'support': 27909.0} | {'precision': 0.9344561239043228, 'recall': 0.9333548317746964, 'f1-score': 0.9330556941560847, 'support': 27909.0} |
| No log        | 4.0   | 164  | 0.1709          | {'precision': 0.8227739726027398, 'recall': 0.9074598677998111, 'f1-score': 0.8630444544229906, 'support': 1059.0} | {'precision': 0.9512620158524931, 'recall': 0.9628449502133712, 'f1-score': 0.9570184368284129, 'support': 17575.0} | {'precision': 0.9324173369079535, 'recall': 0.8999460916442048, 'f1-score': 0.9158940034015471, 'support': 9275.0} | 0.9398   | {'precision': 0.9021511084543955, 'recall': 0.9234169698857958, 'f1-score': 0.9119856315509836, 'support': 27909.0} | {'precision': 0.9401239157768152, 'recall': 0.9398401949192017, 'f1-score': 0.9397857317009801, 'support': 27909.0} |
| No log        | 5.0   | 205  | 0.1695          | {'precision': 0.8363954505686789, 'recall': 0.902738432483475, 'f1-score': 0.8683015440508628, 'support': 1059.0}  | {'precision': 0.9477175185329691, 'recall': 0.9674537695590327, 'f1-score': 0.9574839508953711, 'support': 17575.0} | {'precision': 0.9385835694050991, 'recall': 0.8930458221024259, 'f1-score': 0.9152486187845303, 'support': 9275.0} | 0.9403   | {'precision': 0.9075655128355824, 'recall': 0.9210793413816445, 'f1-score': 0.9136780379102548, 'support': 27909.0} | {'precision': 0.9404579446272334, 'recall': 0.9402701637464617, 'f1-score': 0.9400638758594909, 'support': 27909.0} |
| No log        | 6.0   | 246  | 0.1716          | {'precision': 0.8420123565754634, 'recall': 0.9008498583569405, 'f1-score': 0.8704379562043796, 'support': 1059.0} | {'precision': 0.9520763187429854, 'recall': 0.965348506401138, 'f1-score': 0.9586664783161464, 'support': 17575.0}  | {'precision': 0.9350156319785619, 'recall': 0.9028571428571428, 'f1-score': 0.9186550381218803, 'support': 9275.0} | 0.9421   | {'precision': 0.9097014357656702, 'recall': 0.9230185025384072, 'f1-score': 0.9159198242141354, 'support': 27909.0} | {'precision': 0.9422301900506126, 'recall': 0.9421333619979219, 'f1-score': 0.9420216643594235, 'support': 27909.0} |


### Framework versions

- Transformers 4.37.2
- Pytorch 2.2.0+cu121
- Datasets 2.17.0
- Tokenizers 0.15.2