tomaarsen HF staff commited on
Commit
1507aa3
1 Parent(s): 6c7840e

Upload model

Browse files
Files changed (4) hide show
  1. README.md +6 -9
  2. config.json +14 -14
  3. pytorch_model.bin +1 -1
  4. tokenizer.json +2 -16
README.md CHANGED
@@ -1,3 +1,4 @@
 
1
  ---
2
  license: apache-2.0
3
  library_name: span-marker
@@ -7,15 +8,11 @@ tags:
7
  - ner
8
  - named-entity-recognition
9
  pipeline_tag: token-classification
10
- datasets:
11
- - DFKI-SLT/few-nerd
12
- language:
13
- - en
14
  ---
15
 
16
  # SpanMarker for Named Entity Recognition
17
 
18
- This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that can be used for Named Entity Recognition. In particular, this SpanMarker model uses [roberta-large](https://huggingface.co/roberta-large) as the underlying encoder.
19
 
20
  ## Usage
21
 
@@ -25,15 +22,15 @@ To use this model for inference, first install the `span_marker` library:
25
  pip install span_marker
26
  ```
27
 
28
- You can then run inference as follows:
29
 
30
  ```python
31
  from span_marker import SpanMarkerModel
32
 
33
- # Download from Hub and run inference
34
- model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-roberta-large-fewnerd-fine-super")
35
  # Run inference
36
  entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
37
  ```
38
 
39
- See the [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) repository for documentation and additional information on this model framework.
 
1
+
2
  ---
3
  license: apache-2.0
4
  library_name: span-marker
 
8
  - ner
9
  - named-entity-recognition
10
  pipeline_tag: token-classification
 
 
 
 
11
  ---
12
 
13
  # SpanMarker for Named Entity Recognition
14
 
15
+ This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that can be usedfor Named Entity Recognition. In particular, this SpanMarker model uses [roberta-large](https://huggingface.co/roberta-large) as the underlying encoder.
16
 
17
  ## Usage
18
 
 
22
  pip install span_marker
23
  ```
24
 
25
+ You can then run inference with this model like so:
26
 
27
  ```python
28
  from span_marker import SpanMarkerModel
29
 
30
+ # Download from the 🤗 Hub
31
+ model = SpanMarkerModel.from_pretrained("span_marker_model_name")
32
  # Run inference
33
  entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
34
  ```
35
 
36
+ See the [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) repository for documentation and additional information on this library.
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "models\\rl-full-5e-5-rl-1\\checkpoint-final",
3
  "architectures": [
4
  "SpanMarkerModel"
5
  ],
@@ -32,6 +32,14 @@
32
  "id2label": {
33
  "0": "O",
34
  "1": "art-broadcastprogram",
 
 
 
 
 
 
 
 
35
  "10": "building-library",
36
  "11": "building-other",
37
  "12": "building-restaurant",
@@ -42,7 +50,6 @@
42
  "17": "event-election",
43
  "18": "event-other",
44
  "19": "event-protest",
45
- "2": "art-film",
46
  "20": "event-sportsevent",
47
  "21": "location-GPE",
48
  "22": "location-bodiesofwater",
@@ -53,7 +60,6 @@
53
  "27": "location-road/railway/highway/transit",
54
  "28": "organization-company",
55
  "29": "organization-education",
56
- "3": "art-music",
57
  "30": "organization-government/governmentagency",
58
  "31": "organization-media/newspaper",
59
  "32": "organization-other",
@@ -64,7 +70,6 @@
64
  "37": "organization-sportsteam",
65
  "38": "other-astronomything",
66
  "39": "other-award",
67
- "4": "art-other",
68
  "40": "other-biologything",
69
  "41": "other-chemicalthing",
70
  "42": "other-currency",
@@ -75,7 +80,6 @@
75
  "47": "other-law",
76
  "48": "other-livingthing",
77
  "49": "other-medical",
78
- "5": "art-painting",
79
  "50": "person-actor",
80
  "51": "person-artist/author",
81
  "52": "person-athlete",
@@ -86,17 +90,13 @@
86
  "57": "person-soldier",
87
  "58": "product-airplane",
88
  "59": "product-car",
89
- "6": "art-writtenart",
90
  "60": "product-food",
91
  "61": "product-game",
92
  "62": "product-other",
93
  "63": "product-ship",
94
  "64": "product-software",
95
  "65": "product-train",
96
- "66": "product-weapon",
97
- "7": "building-airport",
98
- "8": "building-hospital",
99
- "9": "building-hotel"
100
  },
101
  "initializer_range": 0.02,
102
  "intermediate_size": 4096,
@@ -214,12 +214,12 @@
214
  "use_cache": true,
215
  "vocab_size": 50267
216
  },
217
- "entity_max_length": 16,
218
- "marker_max_length": 256,
219
- "model_max_length": 512,
220
  "model_max_length_default": 512,
221
  "model_type": "span-marker",
222
- "outside_id": 0,
223
  "torch_dtype": "float32",
224
  "transformers_version": "4.27.2",
225
  "vocab_size": 50267
 
1
  {
2
+ "_name_or_path": "models\\rl-full-pl-marker-2\\checkpoint-final",
3
  "architectures": [
4
  "SpanMarkerModel"
5
  ],
 
32
  "id2label": {
33
  "0": "O",
34
  "1": "art-broadcastprogram",
35
+ "2": "art-film",
36
+ "3": "art-music",
37
+ "4": "art-other",
38
+ "5": "art-painting",
39
+ "6": "art-writtenart",
40
+ "7": "building-airport",
41
+ "8": "building-hospital",
42
+ "9": "building-hotel",
43
  "10": "building-library",
44
  "11": "building-other",
45
  "12": "building-restaurant",
 
50
  "17": "event-election",
51
  "18": "event-other",
52
  "19": "event-protest",
 
53
  "20": "event-sportsevent",
54
  "21": "location-GPE",
55
  "22": "location-bodiesofwater",
 
60
  "27": "location-road/railway/highway/transit",
61
  "28": "organization-company",
62
  "29": "organization-education",
 
63
  "30": "organization-government/governmentagency",
64
  "31": "organization-media/newspaper",
65
  "32": "organization-other",
 
70
  "37": "organization-sportsteam",
71
  "38": "other-astronomything",
72
  "39": "other-award",
 
73
  "40": "other-biologything",
74
  "41": "other-chemicalthing",
75
  "42": "other-currency",
 
80
  "47": "other-law",
81
  "48": "other-livingthing",
82
  "49": "other-medical",
 
83
  "50": "person-actor",
84
  "51": "person-artist/author",
85
  "52": "person-athlete",
 
90
  "57": "person-soldier",
91
  "58": "product-airplane",
92
  "59": "product-car",
 
93
  "60": "product-food",
94
  "61": "product-game",
95
  "62": "product-other",
96
  "63": "product-ship",
97
  "64": "product-software",
98
  "65": "product-train",
99
+ "66": "product-weapon"
 
 
 
100
  },
101
  "initializer_range": 0.02,
102
  "intermediate_size": 4096,
 
214
  "use_cache": true,
215
  "vocab_size": 50267
216
  },
217
+ "entity_max_length": 8,
218
+ "marker_max_length": 128,
219
+ "model_max_length": 256,
220
  "model_max_length_default": 512,
221
  "model_type": "span-marker",
222
+ "span_marker_version": "1.0.0.dev",
223
  "torch_dtype": "float32",
224
  "transformers_version": "4.27.2",
225
  "vocab_size": 50267
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:888208234cecfb97b580e7b8267712b421a49840220cbd9f84ae279f2d4af0f3
3
  size 1422130805
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d8bf73b0c3a973f9edadde6a620b247465b8ae0a24072daf1461a38ebe71103
3
  size 1422130805
tokenizer.json CHANGED
@@ -1,21 +1,7 @@
1
  {
2
  "version": "1.0",
3
- "truncation": {
4
- "direction": "Right",
5
- "max_length": 512,
6
- "strategy": "LongestFirst",
7
- "stride": 0
8
- },
9
- "padding": {
10
- "strategy": {
11
- "Fixed": 512
12
- },
13
- "direction": "Right",
14
- "pad_to_multiple_of": null,
15
- "pad_id": 1,
16
- "pad_type_id": 0,
17
- "pad_token": "<pad>"
18
- },
19
  "added_tokens": [
20
  {
21
  "id": 0,
 
1
  {
2
  "version": "1.0",
3
+ "truncation": null,
4
+ "padding": null,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "added_tokens": [
6
  {
7
  "id": 0,