tomaarsen HF staff commited on
Commit
5d37e42
1 Parent(s): 6c4cf39

Add auto-generated model card

Browse files
Files changed (1) hide show
  1. README.md +177 -11
README.md CHANGED
@@ -1,4 +1,6 @@
1
  ---
 
 
2
  library_name: span-marker
3
  tags:
4
  - span-marker
@@ -6,35 +8,172 @@ tags:
6
  - ner
7
  - named-entity-recognition
8
  - generated_from_span_marker_trainer
 
 
9
  metrics:
10
  - precision
11
  - recall
12
  - f1
13
- widget: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  pipeline_tag: token-classification
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  ---
16
 
17
- # SpanMarker
18
 
19
- This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that can be used for Named Entity Recognition.
20
 
21
  ## Model Details
22
 
23
  ### Model Description
24
 
25
  - **Model Type:** SpanMarker
26
- <!-- - **Encoder:** [Unknown](https://huggingface.co/models/unknown) -->
27
  - **Maximum Sequence Length:** 256 tokens
28
  - **Maximum Entity Length:** 8 words
29
- <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
30
- <!-- - **Language:** Unknown -->
31
- <!-- - **License:** Unknown -->
32
 
33
  ### Model Sources
34
 
35
  - **Repository:** [SpanMarker on GitHub](https://github.com/tomaarsen/SpanMarkerNER)
36
  - **Thesis:** [SpanMarker For Named Entity Recognition](https://raw.githubusercontent.com/tomaarsen/SpanMarkerNER/main/thesis.pdf)
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  ## Uses
39
 
40
  ### Direct Use
@@ -43,9 +182,9 @@ This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that ca
43
  from span_marker import SpanMarkerModel
44
 
45
  # Download from the 🤗 Hub
46
- model = SpanMarkerModel.from_pretrained("span_marker_model_id")
47
  # Run inference
48
- entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
49
  ```
50
 
51
  ### Downstream Use
@@ -57,7 +196,7 @@ You can finetune this model on your own dataset.
57
  from span_marker import SpanMarkerModel, Trainer
58
 
59
  # Download from the 🤗 Hub
60
- model = SpanMarkerModel.from_pretrained("span_marker_model_id")
61
 
62
  # Specify a Dataset with "tokens" and "ner_tag" columns
63
  dataset = load_dataset("conll2003") # For example CoNLL2003
@@ -69,12 +208,39 @@ trainer = Trainer(
69
  eval_dataset=dataset["validation"],
70
  )
71
  trainer.train()
72
- trainer.save_model("span_marker_model_id-finetuned")
73
  ```
74
  </details>
75
 
76
  ## Training Details
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  ### Framework Versions
79
 
80
  - Python: 3.9.16
 
1
  ---
2
+ language: en
3
+ license: apache-2.0
4
  library_name: span-marker
5
  tags:
6
  - span-marker
 
8
  - ner
9
  - named-entity-recognition
10
  - generated_from_span_marker_trainer
11
+ datasets:
12
+ - midas/inspec
13
  metrics:
14
  - precision
15
  - recall
16
  - f1
17
+ widget:
18
+ - text: 'Genetic algorithm guided selection : variable selection and subset selection
19
+ A novel genetic algorithm guided selection method , GAS , has been described .
20
+ The method utilizes a simple encoding scheme which can represent both compounds
21
+ and variables used to construct a QSAR/QSPR model . A genetic algorithm is then
22
+ utilized to simultaneously optimize the encoded variables that include both descriptors
23
+ and compound subsets . The GAS method generates multiple models each applying
24
+ to a subset of the compounds . Typically the subsets represent clusters with different
25
+ chemotypes . Also a procedure based on molecular similarity is presented to determine
26
+ which model should be applied to a given test set compound . The variable selection
27
+ method implemented in GAS has been tested and compared using the Selwood data
28
+ set -LRB- n = 31 compounds ; nu = 53 descriptors -RRB- . The results showed that
29
+ the method is comparable to other published methods . The subset selection method
30
+ implemented in GAS has been first tested using an artificial data set -LRB- n
31
+ = 100 points ; nu = 1 descriptor -RRB- to examine its ability to subset data points
32
+ and second applied to analyze the XLOGP data set -LRB- n = 1831 compounds ; nu
33
+ = 126 descriptors -RRB- . The method is able to correctly identify artificial
34
+ data points belonging to various subsets . The analysis of the XLOGP data set
35
+ shows that the subset selection method can be useful in improving a QSAR/QSPR
36
+ model when the variable selection method fails'
37
+ - text: Presentation media , information complexity , and learning outcomes Multimedia
38
+ computing provides a variety of information presentation modality combinations
39
+ . Educators have observed that visuals enhance learning which suggests that multimedia
40
+ presentations should be superior to text-only and text with static pictures in
41
+ facilitating optimal human information processing and , therefore , comprehension
42
+ . The article reports the findings from a 3 -LRB- text-only , overhead slides
43
+ , and multimedia presentation -RRB- * 2 -LRB- high and low information complexity
44
+ -RRB- factorial experiment . Subjects read a text script , viewed an acetate overhead
45
+ slide presentation , or viewed a multimedia presentation depicting the greenhouse
46
+ effect -LRB- low complexity -RRB- or photocopier operation -LRB- high complexity
47
+ -RRB- . Multimedia was superior to text-only and overhead slides for comprehension
48
+ . Information complexity diminished comprehension and perceived presentation quality
49
+ . Multimedia was able to reduce the negative impact of information complexity
50
+ on comprehension and increase the extent of sustained attention to the presentation
51
+ . These findings suggest that multimedia presentations invoke the use of both
52
+ the verbal and visual working memory channels resulting in a reduction of the
53
+ cognitive load imposed by increased information complexity . Moreover , multimedia
54
+ superiority in facilitating comprehension goes beyond its ability to increase
55
+ sustained attention ; the quality and effectiveness of information processing
56
+ attained -LRB- i.e. , use of verbal and visual working memory -RRB- is also significant
57
+ - text: Adaptive filtering for noise reduction in hue saturation intensity color space
58
+ Even though the hue saturation intensity -LRB- HSI -RRB- color model has been
59
+ widely used in color image processing and analysis , the conversion formulas from
60
+ the RGB color model to HSI are nonlinear and complicated in comparison with the
61
+ conversion formulas of other color models . When an RGB image is degraded by random
62
+ Gaussian noise , this nonlinearity leads to a nonuniform noise distribution in
63
+ HSI , making accurate image analysis more difficult . We have analyzed the noise
64
+ characteristics of the HSI color model and developed an adaptive spatial filtering
65
+ method to reduce the magnitude of noise and the nonuniformity of noise variance
66
+ in the HSI color space . With this adaptive filtering method , the filter kernel
67
+ for each pixel is dynamically adjusted , depending on the values of intensity
68
+ and saturation . In our experiments we have filtered the saturation and hue components
69
+ and generated edge maps from color gradients . We have found that by using the
70
+ adaptive filtering method , the minimum error rate in edge detection improves
71
+ by approximately 15 %
72
+ - text: Restoration of broadband imagery steered with a liquid-crystal optical phased
73
+ array In many imaging applications , it is highly desirable to replace mechanical
74
+ beam-steering components -LRB- i.e. , mirrors and gimbals -RRB- with a nonmechanical
75
+ device . One such device is a nematic liquid crystal optical phased array -LRB-
76
+ LCOPA -RRB- . An LCOPA can implement a blazed phase grating to steer the incident
77
+ light . However , when a phase grating is used in a broadband imaging system ,
78
+ two adverse effects can occur . First , dispersion will cause different incident
79
+ wavelengths arriving at the same angle to be steered to different output angles
80
+ , causing chromatic aberrations in the image plane . Second , the device will
81
+ steer energy not only to the first diffraction order , but to others as well .
82
+ This multiple-order effect results in multiple copies of the scene appearing in
83
+ the image plane . We describe a digital image restoration technique designed to
84
+ overcome these degradations . The proposed postprocessing technique is based on
85
+ a Wiener deconvolution filter . The technique , however , is applicable only to
86
+ scenes containing objects with approximately constant reflectivities over the
87
+ spectral region of interest . Experimental results are presented to demonstrate
88
+ the effectiveness of this technique
89
+ - text: A comparison of computational color constancy Algorithms . II . Experiments
90
+ with image data For pt.I see ibid. , vol . 11 , no. 9 , p.972-84 -LRB- 2002 -RRB-
91
+ . We test a number of the leading computational color constancy algorithms using
92
+ a comprehensive set of images . These were of 33 different scenes under 11 different
93
+ sources representative of common illumination conditions . The algorithms studied
94
+ include two gray world methods , a version of the Retinex method , several variants
95
+ of Forsyth 's -LRB- 1990 -RRB- gamut-mapping method , Cardei et al. 's -LRB- 2000
96
+ -RRB- neural net method , and Finlayson et al. 's color by correlation method
97
+ -LRB- Finlayson et al. 1997 , 2001 ; Hubel and Finlayson 2000 -RRB- . We discuss
98
+ a number of issues in applying color constancy ideas to image data , and study
99
+ in depth the effect of different preprocessing strategies . We compare the performance
100
+ of the algorithms on image data with their performance on synthesized data . All
101
+ data used for this study are available online at http://www.cs.sfu.ca/~color/data
102
+ , and implementations for most of the algorithms are also available -LRB- http://www.cs.sfu.ca/~color/code
103
+ -RRB- . Experiments with synthesized data -LRB- part one of this paper -RRB- suggested
104
+ that the methods which emphasize the use of the input data statistics , specifically
105
+ color by correlation and the neural net algorithm , are potentially the most effective
106
+ at estimating the chromaticity of the scene illuminant . Unfortunately , we were
107
+ unable to realize comparable performance on real images . Here exploiting pixel
108
+ intensity proved to be more beneficial than exploiting the details of image chromaticity
109
+ statistics , and the three-dimensional -LRB- 3-D -RRB- gamut-mapping algorithms
110
+ gave the best performance
111
  pipeline_tag: token-classification
112
+ co2_eq_emissions:
113
+ emissions: 20.795
114
+ source: codecarbon
115
+ training_type: fine-tuning
116
+ on_cloud: false
117
+ gpu_model: 1 x NVIDIA GeForce RTX 3090
118
+ cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
119
+ ram_total_size: 31.777088165283203
120
+ hours_used: 0.137
121
+ model-index:
122
+ - name: SpanMarker with bert-base-uncased on Inspec
123
+ results:
124
+ - task:
125
+ type: token-classification
126
+ name: Named Entity Recognition
127
+ dataset:
128
+ name: Inspec
129
+ type: midas/inspec
130
+ split: test
131
+ metrics:
132
+ - type: f1
133
+ value: 0.5934525191548642
134
+ name: F1
135
+ - type: precision
136
+ value: 0.5666149412547107
137
+ name: Precision
138
+ - type: recall
139
+ value: 0.6229588106263709
140
+ name: Recall
141
  ---
142
 
143
+ # SpanMarker with bert-base-uncased on Inspec
144
 
145
+ This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model trained on the [Inspec](https://huggingface.co/datasets/midas/inspec) dataset that can be used for Named Entity Recognition. This SpanMarker model uses [bert-base-uncased](https://huggingface.co/models/bert-base-uncased) as the underlying encoder.
146
 
147
  ## Model Details
148
 
149
  ### Model Description
150
 
151
  - **Model Type:** SpanMarker
152
+ - **Encoder:** [bert-base-uncased](https://huggingface.co/models/bert-base-uncased)
153
  - **Maximum Sequence Length:** 256 tokens
154
  - **Maximum Entity Length:** 8 words
155
+ - **Training Dataset:** [Inspec](https://huggingface.co/datasets/midas/inspec)
156
+ - **Language:** en
157
+ - **License:** apache-2.0
158
 
159
  ### Model Sources
160
 
161
  - **Repository:** [SpanMarker on GitHub](https://github.com/tomaarsen/SpanMarkerNER)
162
  - **Thesis:** [SpanMarker For Named Entity Recognition](https://raw.githubusercontent.com/tomaarsen/SpanMarkerNER/main/thesis.pdf)
163
 
164
+ ### Model Labels
165
+ | Label | Examples |
166
+ |:------|:-----------------------------------------------|
167
+ | KEY | "Content Atomism", "philosophy of mind", "IBS" |
168
+
169
+ ## Evaluation
170
+
171
+ ### Metrics
172
+ | Label | Precision | Recall | F1 |
173
+ |:--------|:----------|:-------|:-------|
174
+ | **all** | 0.5666 | 0.6230 | 0.5935 |
175
+ | KEY | 0.5666 | 0.6230 | 0.5935 |
176
+
177
  ## Uses
178
 
179
  ### Direct Use
 
182
  from span_marker import SpanMarkerModel
183
 
184
  # Download from the 🤗 Hub
185
+ model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker_bert-base-uncased-keyphrase-inspec")
186
  # Run inference
187
+ entities = model.predict("Adaptive filtering for noise reduction in hue saturation intensity color space Even though the hue saturation intensity -LRB- HSI -RRB- color model has been widely used in color image processing and analysis , the conversion formulas from the RGB color model to HSI are nonlinear and complicated in comparison with the conversion formulas of other color models . When an RGB image is degraded by random Gaussian noise , this nonlinearity leads to a nonuniform noise distribution in HSI , making accurate image analysis more difficult . We have analyzed the noise characteristics of the HSI color model and developed an adaptive spatial filtering method to reduce the magnitude of noise and the nonuniformity of noise variance in the HSI color space . With this adaptive filtering method , the filter kernel for each pixel is dynamically adjusted , depending on the values of intensity and saturation . In our experiments we have filtered the saturation and hue components and generated edge maps from color gradients . We have found that by using the adaptive filtering method , the minimum error rate in edge detection improves by approximately 15 %")
188
  ```
189
 
190
  ### Downstream Use
 
196
  from span_marker import SpanMarkerModel, Trainer
197
 
198
  # Download from the 🤗 Hub
199
+ model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker_bert-base-uncased-keyphrase-inspec")
200
 
201
  # Specify a Dataset with "tokens" and "ner_tag" columns
202
  dataset = load_dataset("conll2003") # For example CoNLL2003
 
208
  eval_dataset=dataset["validation"],
209
  )
210
  trainer.train()
211
+ trainer.save_model("tomaarsen/span-marker_bert-base-uncased-keyphrase-inspec-finetuned")
212
  ```
213
  </details>
214
 
215
  ## Training Details
216
 
217
+ ### Training Set Metrics
218
+ | Training set | Min | Median | Max |
219
+ |:----------------------|:----|:---------|:----|
220
+ | Sentence length | 15 | 138.5327 | 557 |
221
+ | Entities per sentence | 0 | 8.2507 | 41 |
222
+
223
+ ### Training Hyperparameters
224
+ - learning_rate: 5e-05
225
+ - train_batch_size: 32
226
+ - eval_batch_size: 32
227
+ - seed: 42
228
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
229
+ - lr_scheduler_type: linear
230
+ - lr_scheduler_warmup_ratio: 0.1
231
+ - num_epochs: 3
232
+
233
+ ### Environmental Impact
234
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
235
+ - **Carbon Emitted**: 0.021 kg of CO2
236
+ - **Hours Used**: 0.137 hours
237
+
238
+ ### Training Hardware
239
+ - **On Cloud**: No
240
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3090
241
+ - **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
242
+ - **RAM Size**: 31.78 GB
243
+
244
  ### Framework Versions
245
 
246
  - Python: 3.9.16