pietruszkowiec commited on
Commit
f8cd472
1 Parent(s): 0f52716

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -72
README.md CHANGED
@@ -1,47 +1,26 @@
1
  ---
2
  license: cc-by-4.0
3
- tags:
4
- - generated_from_trainer
5
  datasets:
6
  - wikiann
7
- metrics:
8
- - precision
9
- - recall
10
- - f1
11
- - accuracy
12
- model-index:
13
- - name: herbert-base-ner
14
- results:
15
- - task:
16
- name: Token Classification
17
- type: token-classification
18
- dataset:
19
- name: wikiann
20
- type: wikiann
21
- config: pl
22
- split: validation
23
- args: pl
24
- metrics:
25
- - name: Precision
26
- type: precision
27
- value: 0.8885878330430295
28
- - name: Recall
29
- type: recall
30
- value: 0.905945803735859
31
- - name: F1
32
- type: f1
33
- value: 0.8971828692395376
34
- - name: Accuracy
35
- type: accuracy
36
- value: 0.9568532096363909
37
  ---
38
 
39
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
40
- should probably proofread and complete it, then remove this comment. -->
41
 
42
  # herbert-base-ner
43
 
44
- This model is a fine-tuned version of [allegro/herbert-base-cased](https://huggingface.co/allegro/herbert-base-cased) on the wikiann dataset.
 
 
 
 
 
 
45
  It achieves the following results on the evaluation set:
46
  - Loss: 0.2006
47
  - Precision: 0.8886
@@ -49,43 +28,59 @@ It achieves the following results on the evaluation set:
49
  - F1: 0.8972
50
  - Accuracy: 0.9569
51
 
52
- ## Model description
53
-
54
- More information needed
55
 
56
  ## Intended uses & limitations
57
 
58
- More information needed
59
-
60
- ## Training and evaluation data
61
-
62
- More information needed
63
-
64
- ## Training procedure
65
-
66
- ### Training hyperparameters
67
-
68
- The following hyperparameters were used during training:
69
- - learning_rate: 1e-05
70
- - train_batch_size: 8
71
- - eval_batch_size: 8
72
- - seed: 42
73
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
74
- - lr_scheduler_type: linear
75
- - num_epochs: 3
76
-
77
- ### Training results
78
-
79
- | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
80
- |:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
81
- | 0.207 | 1.0 | 2500 | 0.1929 | 0.8566 | 0.8884 | 0.8722 | 0.9499 |
82
- | 0.1528 | 2.0 | 5000 | 0.1979 | 0.8807 | 0.9006 | 0.8905 | 0.9547 |
83
- | 0.1195 | 3.0 | 7500 | 0.2006 | 0.8886 | 0.9059 | 0.8972 | 0.9569 |
84
-
85
-
86
- ### Framework versions
87
-
88
- - Transformers 4.29.2
89
- - Pytorch 2.0.1+cu118
90
- - Datasets 2.12.0
91
- - Tokenizers 0.13.3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
 
 
3
  datasets:
4
  - wikiann
5
+ language:
6
+ - pl
7
+ pipeline_tag: token-classification
8
+ widget:
9
+ - text: "Jestem Krzysiek i pracuję w Ministerstwie Sportu"
10
+ - text: "Wiktoria pracuje w Krakowie, na AGH"
11
+ - text: "Nazywam się Grzegorz Jasiński, pochodzę ze Szczebrzeszyna"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  ---
13
 
 
 
14
 
15
  # herbert-base-ner
16
 
17
+ ## Model description
18
+
19
+ **herbert-base-ner** is a fine-tuned HerBERT model that can be used for **Named Entity Recognition** .
20
+ It has been trained to recognize three types of entities: person (PER), location (LOC) and organization (ORG).
21
+
22
+ Specifically, this model is an [*allegro/herbert-base-cased*](https://huggingface.co/allegro/herbert-base-cased) model that was fine-tuned on the Polish subset of *wikiann* dataset.
23
+
24
  It achieves the following results on the evaluation set:
25
  - Loss: 0.2006
26
  - Precision: 0.8886
 
28
  - F1: 0.8972
29
  - Accuracy: 0.9569
30
 
 
 
 
31
 
32
  ## Intended uses & limitations
33
 
34
+ #### How to use
35
+
36
+ You can use this model with Transformers *pipeline* for NER.
37
+
38
+ ```python
39
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
40
+ from transformers import pipeline
41
+ tokenizer = AutoTokenizer.from_pretrained("pietruszkowiec/herbert-base-ner")
42
+ model = AutoModelForTokenClassification.from_pretrained("pietruszkowiec/herbert-base-ner")
43
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
44
+ example = "Nazywam się Grzegorz Jasiński, pochodzę ze Szczebrzeszyna"
45
+ ner_results = nlp(example)
46
+ print(ner_results)
47
+ ```
48
+
49
+ ### BibTeX entry and citation info
50
+
51
+ ```
52
+ @inproceedings{mroczkowski-etal-2021-herbert,
53
+ title = "{H}er{BERT}: Efficiently Pretrained Transformer-based Language Model for {P}olish",
54
+ author = "Mroczkowski, Robert and
55
+ Rybak, Piotr and
56
+ Wr{\\'o}blewska, Alina and
57
+ Gawlik, Ireneusz",
58
+ booktitle = "Proceedings of the 8th Workshop on Balto-Slavic Natural Language Processing",
59
+ month = apr,
60
+ year = "2021",
61
+ address = "Kiyv, Ukraine",
62
+ publisher = "Association for Computational Linguistics",
63
+ url = "https://www.aclweb.org/anthology/2021.bsnlp-1.1",
64
+ pages = "1--10",
65
+ }
66
+ ```
67
+ ```
68
+ @inproceedings{pan-etal-2017-cross,
69
+ title = "Cross-lingual Name Tagging and Linking for 282 Languages",
70
+ author = "Pan, Xiaoman and
71
+ Zhang, Boliang and
72
+ May, Jonathan and
73
+ Nothman, Joel and
74
+ Knight, Kevin and
75
+ Ji, Heng",
76
+ booktitle = "Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
77
+ month = jul,
78
+ year = "2017",
79
+ address = "Vancouver, Canada",
80
+ publisher = "Association for Computational Linguistics",
81
+ url = "https://www.aclweb.org/anthology/P17-1178",
82
+ doi = "10.18653/v1/P17-1178",
83
+ pages = "1946--1958",
84
+ abstract = "The ambitious goal of this work is to develop a cross-lingual name tagging and linking framework for 282 languages that exist in Wikipedia. Given a document in any of these languages, our framework is able to identify name mentions, assign a coarse-grained or fine-grained type to each mention, and link it to an English Knowledge Base (KB) if it is linkable. We achieve this goal by performing a series of new KB mining methods: generating {``}silver-standard{''} annotations by transferring annotations from English to other languages through cross-lingual links and KB properties, refining annotations through self-training and topic selection, deriving language-specific morphology features from anchor links, and mining word translation pairs from cross-lingual links. Both name tagging and linking results for 282 languages are promising on Wikipedia data and on-Wikipedia data.",
85
+ }
86
+ ```