Model upload
Browse files- README.md +48 -0
- config.json +33 -0
- generation_config.json +6 -0
- model.safetensors +3 -0
- special_tokens_map.json +23 -0
- spiece.model +3 -0
- tokenizer_config.json +9 -0
README.md
CHANGED
@@ -1,3 +1,51 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- multilingual
|
4 |
+
- pl
|
5 |
+
- ru
|
6 |
+
- uk
|
7 |
+
- bg
|
8 |
+
- cs
|
9 |
+
- sl
|
10 |
+
datasets:
|
11 |
+
- SlavicNER
|
12 |
license: apache-2.0
|
13 |
+
library_name: transformers
|
14 |
+
pipeline_tag: text2text-generation
|
15 |
+
tags:
|
16 |
+
- entity linking
|
17 |
+
widget:
|
18 |
+
- text: "pl:Polsce"
|
19 |
+
- text: "cs:Velké Británii"
|
20 |
+
- text: "bg:българите"
|
21 |
+
- text: "ru:Великобританию"
|
22 |
+
- text: "sl:evropske komisije"
|
23 |
+
- text: "uk:Європейського агентства лікарських засобів"
|
24 |
---
|
25 |
+
|
26 |
+
# Model description
|
27 |
+
|
28 |
+
This is a baseline model for named entity **lemmatization** trained on the single-out topic split of the
|
29 |
+
[SlavicNER corpus](https://github.com/SlavicNLP/SlavicNER).
|
30 |
+
|
31 |
+
|
32 |
+
# Usage
|
33 |
+
|
34 |
+
You can use this model directly with a pipeline for text2text generation:
|
35 |
+
|
36 |
+
```python
|
37 |
+
from transformers import pipeline
|
38 |
+
|
39 |
+
model_name = "SlavicNLP/slavicner-linking-cross-topic-large"
|
40 |
+
pipe = pipeline("text2text-generation", model_name)
|
41 |
+
|
42 |
+
texts = ["pl:Polsce", "cs:Velké Británii", "bg:българите", "ru:Великобританию",
|
43 |
+
"sl:evropske komisije", "uk:Європейського агентства лікарських засобів"]
|
44 |
+
|
45 |
+
outputs = pipe(texts)
|
46 |
+
|
47 |
+
ids = [o['generated_text'] for o in outputs]
|
48 |
+
print(ids)
|
49 |
+
# ['GPE-Poland', 'GPE-Great-Britain', 'GPE-Bulgaria', 'GPE-Great-Britain',
|
50 |
+
# 'ORG-European-Commission', 'ORG-EMA-European-Medicines-Agency']
|
51 |
+
```
|
config.json
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google/mt5-large",
|
3 |
+
"architectures": [
|
4 |
+
"MT5ForConditionalGeneration"
|
5 |
+
],
|
6 |
+
"classifier_dropout": 0.0,
|
7 |
+
"d_ff": 2816,
|
8 |
+
"d_kv": 64,
|
9 |
+
"d_model": 1024,
|
10 |
+
"decoder_start_token_id": 0,
|
11 |
+
"dense_act_fn": "gelu_new",
|
12 |
+
"dropout_rate": 0.1,
|
13 |
+
"eos_token_id": 1,
|
14 |
+
"feed_forward_proj": "gated-gelu",
|
15 |
+
"initializer_factor": 1.0,
|
16 |
+
"is_encoder_decoder": true,
|
17 |
+
"is_gated_act": true,
|
18 |
+
"layer_norm_epsilon": 1e-06,
|
19 |
+
"model_type": "mt5",
|
20 |
+
"num_decoder_layers": 24,
|
21 |
+
"num_heads": 16,
|
22 |
+
"num_layers": 24,
|
23 |
+
"output_past": true,
|
24 |
+
"pad_token_id": 0,
|
25 |
+
"relative_attention_max_distance": 128,
|
26 |
+
"relative_attention_num_buckets": 32,
|
27 |
+
"tie_word_embeddings": false,
|
28 |
+
"tokenizer_class": "T5Tokenizer",
|
29 |
+
"torch_dtype": "float32",
|
30 |
+
"transformers_version": "4.38.2",
|
31 |
+
"use_cache": true,
|
32 |
+
"vocab_size": 250112
|
33 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"decoder_start_token_id": 0,
|
3 |
+
"eos_token_id": 1,
|
4 |
+
"pad_token_id": 0,
|
5 |
+
"transformers_version": "4.38.2"
|
6 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6f6e49af30e1abf184c536e0d6af6ddc51515913721254a84e04abdd597167b4
|
3 |
+
size 4918393736
|
special_tokens_map.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"eos_token": {
|
3 |
+
"content": "</s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"pad_token": {
|
10 |
+
"content": "<pad>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"unk_token": {
|
17 |
+
"content": "<unk>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
}
|
23 |
+
}
|
spiece.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ef78f86560d809067d12bac6c09f19a462cb3af3f54d2b8acbba26e1433125d6
|
3 |
+
size 4309802
|
tokenizer_config.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"eos_token": "</s>",
|
3 |
+
"unk_token": "<unk>",
|
4 |
+
"pad_token": "<pad>",
|
5 |
+
"extra_ids": 0,
|
6 |
+
"additional_special_tokens": null,
|
7 |
+
"tokenizer_file": null,
|
8 |
+
"name_or_path": "google/mt5-small"
|
9 |
+
}
|