File size: 1,943 Bytes
130cb5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4988ec2
 
 
 
 
 
 
130cb5b
 
 
 
c99d746
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130cb5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d0b1040
130cb5b
 
 
 
 
4edda02
130cb5b
 
 
 
 
 
 
 
 
 
 
4edda02
d0b1040
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
87
88
89
90
91
---
language: multilingual
tags:
- document-classification
- text-classification
- multilingual
- doclaynet
- e5
pipeline_tag: text-classification
base_model: intfloat/multilingual-e5-large
datasets:
- pierreguillou/DocLayNet-base
metrics:
- accuracy
model-index:
- name: multilingual-e5-doclaynet
  results:
  - task:
      type: text-classification
      name: Document Classification
    dataset:
      name: DocLayNet
      type: pierreguillou/DocLayNet-base
    metrics:
    - type: accuracy
      value: 0.9719
      name: Test Accuracy
    - type: loss
      value: 0.5192
      name: Test Loss
library_name: transformers
---
# Multilingual E5 for Document Classification (DocLayNet)
This model is a fine-tuned version of intfloat/multilingual-e5-large for document text classification based on the DocLayNet dataset.

## Evaluation results

- Test Loss:  0.5192, Test Acc: 0.9719

## Usage:

```python

# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="kaixkhazaki/multilingual-e5-doclaynet")

prediction = pipe("This is some text from a financial report")
print(prediction)
```

## Model description
- Base model: intfloat/multilingual-e5-large
- Task: Document text classification
- Languages: Multilingual

## Training data
- Dataset: DocLayNet-base
- Source: https://huggingface.co/datasets/pierreguillou/DocLayNet-base
- Categories:
```python
{
    'financial_reports': 0,
    'government_tenders': 1,
    'laws_and_regulations': 2,
    'manuals': 3,
    'patents': 4,
    'scientific_articles': 5
}
```
## Training procedure

Trained on single gpu for 2 epochs for apx. 20 minutes.

hyperparameters:
```python
{
    'batch_size': 8,
    'num_epochs': 10,
    'learning_rate': 2e-5,
    'weight_decay': 0.01,
    'warmup_ratio': 0.1,
    'gradient_clip': 1.0,
    'label_smoothing': 0.1,
    'optimizer': 'AdamW',
    'scheduler': 'cosine_with_warmup'
}
```