File size: 896 Bytes
c948e78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2ea1f41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
datasets:
- Dongwookss/SROIE
- Dongwookss/SROIE_lb1
metrics:
- f1
- exact_match
base_model:
- microsoft/layoutlmv3-base
---


| Model Version | F1 Score | EM Score | EM (no space) |
|--------------|----------|-----------|---------------|
| Initial LayoutLMv3 | 84.965 | 50.4323 | 50.4323 |

```
training_args = TrainingArguments(
    output_dir="test",
    max_steps=1500,
    per_device_train_batch_size=2,
    per_device_eval_batch_size=2,
    learning_rate=2e-5,
    evaluation_strategy="steps",
    eval_steps=100,
    load_best_model_at_end=True,
    metric_for_best_model="f1",
    gradient_accumulation_steps=4  # 메모리 부족시 활용
)

trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=train_dataset,
    eval_dataset=eval_dataset,
    tokenizer=processor,
    data_collator=default_data_collator,
    compute_metrics=compute_metrics,
)