anowakowski
commited on
Commit
•
3455472
1
Parent(s):
e4f585c
Upload polemma-small
Browse files- README.md +47 -0
- config.json +32 -0
- generation_config.json +7 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +5 -0
- spiece.model +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +12 -0
README.md
CHANGED
@@ -1,3 +1,50 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language: pl
|
3 |
+
tags:
|
4 |
+
- T5
|
5 |
+
- lemmatization
|
6 |
license: apache-2.0
|
7 |
---
|
8 |
+
|
9 |
+
|
10 |
+
# PoLemma Small
|
11 |
+
|
12 |
+
PoLemma models are intended for lemmatization of named entities and multi-word expressions in the Polish language.
|
13 |
+
|
14 |
+
They were fine-tuned from the allegro/plT5 models, e.g.: [allegro/plt5-small](https://huggingface.co/allegro/plt5-small).
|
15 |
+
|
16 |
+
## Usage
|
17 |
+
|
18 |
+
Sample usage:
|
19 |
+
|
20 |
+
```
|
21 |
+
from transformers import pipeline
|
22 |
+
|
23 |
+
pipe = pipeline(task="text2text-generation", model="amu-cai/polemma-base", tokenizer="amu-cai/polemma-base")
|
24 |
+
hyp = [res['generated_text'] for res in pipe(["federalnego urzędu statystycznego"], clean_up_tokenization_spaces=True, num_beams=5)][0]
|
25 |
+
```
|
26 |
+
|
27 |
+
|
28 |
+
## Evaluation results
|
29 |
+
|
30 |
+
Lemmatization Exact Match was computed on the SlavNER 2021 test set.
|
31 |
+
|
32 |
+
| Model | Exact Match ||
|
33 |
+
| :------ | ------: | ------: |
|
34 |
+
| [polemma-large]() | 92.61 |
|
35 |
+
| [polemma-base]() | 91.34 |
|
36 |
+
| [polemma-small]()| 88.46 |
|
37 |
+
|
38 |
+
|
39 |
+
## Citation
|
40 |
+
|
41 |
+
If you use the model, please cite the following paper:
|
42 |
+
|
43 |
+
TBD
|
44 |
+
|
45 |
+
### Framework versions
|
46 |
+
|
47 |
+
- Transformers 4.26.0
|
48 |
+
- Pytorch 1.13.1.post200
|
49 |
+
- Datasets 2.9.0
|
50 |
+
- Tokenizers 0.13.2
|
config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "allegro/plt5-small",
|
3 |
+
"architectures": [
|
4 |
+
"T5ForConditionalGeneration"
|
5 |
+
],
|
6 |
+
"d_ff": 1024,
|
7 |
+
"d_kv": 64,
|
8 |
+
"d_model": 512,
|
9 |
+
"decoder_start_token_id": 0,
|
10 |
+
"dense_act_fn": "gelu_new",
|
11 |
+
"dropout_rate": 0.1,
|
12 |
+
"eos_token_id": 1,
|
13 |
+
"feed_forward_proj": "gated-gelu",
|
14 |
+
"gradient_checkpointing": false,
|
15 |
+
"initializer_factor": 1,
|
16 |
+
"is_encoder_decoder": true,
|
17 |
+
"is_gated_act": true,
|
18 |
+
"layer_norm_epsilon": 1e-06,
|
19 |
+
"model_type": "t5",
|
20 |
+
"num_decoder_layers": 8,
|
21 |
+
"num_heads": 6,
|
22 |
+
"num_layers": 8,
|
23 |
+
"pad_token_id": 0,
|
24 |
+
"relative_attention_max_distance": 128,
|
25 |
+
"relative_attention_num_buckets": 32,
|
26 |
+
"tie_word_embeddings": false,
|
27 |
+
"tokenizer_class": "T5Tokenizer",
|
28 |
+
"torch_dtype": "float32",
|
29 |
+
"transformers_version": "4.26.0",
|
30 |
+
"use_cache": true,
|
31 |
+
"vocab_size": 50048
|
32 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"decoder_start_token_id": 0,
|
4 |
+
"eos_token_id": 1,
|
5 |
+
"pad_token_id": 0,
|
6 |
+
"transformers_version": "4.26.0"
|
7 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e2e407de5282ce8f6119a7aa433ef20e35a9fd2f8b76b23614263a5419dfdc56
|
3 |
+
size 381310469
|
special_tokens_map.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"eos_token": "</s>",
|
3 |
+
"pad_token": "<pad>",
|
4 |
+
"unk_token": "<unk>"
|
5 |
+
}
|
spiece.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a200b4b9d7106b32ea2340e5cd27033a5c03ae5ece9241ab6e1f685b938800b9
|
3 |
+
size 1124950
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": null,
|
3 |
+
"eos_token": "</s>",
|
4 |
+
"extra_ids": 0,
|
5 |
+
"model_max_length": 1000000000000000019884624838656,
|
6 |
+
"name_or_path": "allegro/plt5-small",
|
7 |
+
"pad_token": "<pad>",
|
8 |
+
"sp_model_kwargs": {},
|
9 |
+
"special_tokens_map_file": "/home/wmi/.cache/huggingface/hub/models--allegro--plt5-small/snapshots/6ab71258c53f77f075fdda380992c0e691703f6b/special_tokens_map.json",
|
10 |
+
"tokenizer_class": "T5Tokenizer",
|
11 |
+
"unk_token": "<unk>"
|
12 |
+
}
|