hjdai commited on
Commit
afe4a54
1 Parent(s): dbdcc1e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +66 -85
README.md CHANGED
@@ -5,37 +5,31 @@ tags: []
5
 
6
  # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
 
12
  ## Model Details
13
 
14
  ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
 
28
- ### Model Sources [optional]
29
 
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
  ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
 
39
 
40
  ### Direct Use
41
 
@@ -43,35 +37,35 @@ This is the model card of a 🤗 transformers model that has been pushed on the
43
 
44
  [More Information Needed]
45
 
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
  ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
 
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
 
62
- [More Information Needed]
63
 
64
- ### Recommendations
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
 
70
- ## How to Get Started with the Model
 
 
71
 
72
- Use the code below to get started with the model.
 
 
 
73
 
74
- [More Information Needed]
 
 
 
75
 
76
  ## Training Details
77
 
@@ -126,47 +120,40 @@ Use the code below to get started with the model.
126
 
127
  ### Results
128
 
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
 
171
  ## Citation [optional]
172
 
@@ -180,12 +167,6 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
180
 
181
  [More Information Needed]
182
 
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
  ## More Information [optional]
190
 
191
  [More Information Needed]
 
5
 
6
  # Model Card for Model ID
7
 
8
+ The OpenDeid AICUP Suite is a collection of models developed to facilitate deidentification and temporal normalization research (see paper). It contains sets of eight models of sizes 70M, 160M, 410M, 1B, 1.4B, 2.8B, 6.9B, and 12B based on the [Pythia Scaling Suite](https://huggingface.co/collections/EleutherAI/pythia-scaling-suite-64fb5dfa8c21ebb3db7ad2e1). The 2.8B model was trained on the original OpenDeid-AICUP corpus.
 
 
9
 
10
  ## Model Details
11
 
12
  ### Model Description
13
 
14
+ This model is trained on the full OpenDeid-AICUP corpus released in the [ACIUP 2023 competition](https://codalab.lisn.upsaclay.fr/competitions/15425).
 
 
15
 
16
+ - **Developed by:** [ISLab](https://nkustislab.github.io/)
17
+ - **Model type:** Transformer-based Language Model
18
+ - **Language:** English
19
+ - **License:** Apache 2.0
20
+ - **Finetuned from model:** [EleutherAI/pythia-160m](https://huggingface.co/EleutherAI/pythia-160m)
 
 
21
 
22
+ ### Model Sources
23
 
24
+ - **Repository:** [ISLab-git](https://islab.ee.nkust.edu.tw:40000/hjdai/opendeid)
25
+ - **Paper:** [More Information Needed]
26
+ - **Demo:** [More Information Needed]
 
 
27
 
28
  ## Uses
29
 
30
+ The primary intended use of the OpenDeid AICUP Suite is research on the behavior, functionality, and limitations of large language models for the deidentification and normalization tasks proposed in the [ACIUP 2023 competition](https://codalab.lisn.upsaclay.fr/competitions/15425). This suite is intended to provide a controlled setting for performing scientific experiments.
31
+
32
+ The models in the suite work with the Hugging Face Transformers Library. You may also further fine-tune and adapt the model for deployment, as long as your use is in accordance with the Apache 2.0 license and conduct your own risk and bias assessment.
33
 
34
  ### Direct Use
35
 
 
37
 
38
  [More Information Needed]
39
 
 
 
 
 
 
 
40
  ### Out-of-Scope Use
41
 
42
+ Similar to the original Pythia Suite, the OpenDeid AICUP Suite is not intended for deployment. It is not a in itself a product and cannot be used for human-facing interactions. For example, the model may generate harmful or offensive text. Please evaluate the risks associated with your particular use case.
43
 
44
+ The OpenDeid models are English-language only, and are not suitable for translation or generating text in other languages.
 
 
45
 
46
+ OpenDeid-2.8B has been fine-tuned for the sensitive health information recognition and normalization tasks based on a pre-defined format. This means the OpenDeid AICUP Suite will not respond to a given prompt the way a product like ChatGPT does, which was fine-tuned using methods such as Reinforcement Learning from Human Feedback (RLHF) to better “follow” human instructions.
47
 
48
+ ## Bias, Risks, and Limitations
49
 
50
+ This OpenDeid AICUP models are based on the Pythia models, which were pre-trained on the Pile, and further fine-tuned on the OpenDeid AICUP corpus, a dataset compiled for the sensitive health information and normalization tasks. The fine-tuned models tend to generate outputs in the manner of a pre-defined output layout which may not suiable for downstream tasks like text summarization or translation.
51
 
52
+ ## How to Get Started with the Model
53
 
54
+ Use the code (based on [vLLM](https://github.com/vllm-project/vllm)) below or conventional transformer codes to to get started with the model.
55
 
56
+ ```
57
+ from vllm import LLM, SamplingParams
58
+ from transformers import AutoTokenizer
59
 
60
+ model = LLM('ISLabResearch/opendeid-2.8b-ft-full')
61
+ seed = 309
62
+ tokenizer = AutoTokenizer.from_pretrained(Name)
63
+ eos = tokenizer.eos_token
64
 
65
+ params = SamplingParams(max_tokens = 50, include_stop_str_in_output = True, temperature = 0,
66
+ ignore_eos = False, stop = [eos], seed=seed)
67
+ preds = model.generate("Hello", params, use_tqdm = False)
68
+ ```
69
 
70
  ## Training Details
71
 
 
120
 
121
  ### Results
122
 
123
+ #### Sensitive Health Information Recognition Results
124
+
125
+ | Coding Type | Precision | Recall | F-measure | Support |
126
+ |-------------|----------:|:------:|----------:|--------:|
127
+ | MEDICALRECORD | 0.7651331 | 0.8460509 | 0.8035601 | 747 |
128
+ | PATIENT | 0.8121547 | 0.6159218 | 0.700556 | 716 |
129
+ | IDNUM | 0.8933273 | 0.9283019 | 0.9104788 | 2120 |
130
+ | DATE | 0.9843959 | 0.897926 | 0.9391748 | 2459 |
131
+ | DOCTOR | 0.8278772 | 0.7373009 | 0.7799682 | 3327 |
132
+ | CITY | 0.9522388 | 0.8552279 | 0.90113 | 373 |
133
+ | STATE | 0.973384 | 0.7710843 | 0.8605042 | 332 |
134
+ | ZIP | 0.9937888 | 0.9065156 | 0.9481481 | 353 |
135
+ | TIME | 0.9425287 | 0.8723404 | 0.9060773 | 470 |
136
+ | DEPARTMENT | 0.7521866 | 0.6157518 | 0.6771653 | 419 |
137
+ | HOSPITAL | 0.7908788 | 0.5934892 | 0.6781116 | 1198 |
138
+ | AGE | 0.9565217 | 0.4313726 | 0.5945946 | 51 |
139
+ | STREET | 0.8181818 | 0.2093023 | 0.3333333 | 344 |
140
+ | ORGANIZATION | 0.75 | 0.04054054 | 0.07692308 | 74 |
141
+ | DURATION | 0 | 0 | 0 | 12 |
142
+ | SET | 0 | 0 | 0 | 5 |
143
+ | LOCATION-OTHER | 0 | 0 | 0 | 6 |
144
+ | PHONE | 0 | 0 | 0 | 1 |
145
+ | Micro-avg. F| 0.8766754 | 0.7744291 | 0.8223864 | 13007 |
146
+ | Macro-avg. F| 0.6784776 | 0.5178403 | 0.587374 | 13007 |
147
+
148
+ #### Temporal Information Normalization Results
149
+ | Temporal Type | Precision | Recall | F-measure | Support |
150
+ |-------------|----------:|:------:|----------:|----------:|
151
+ | DATE | 0.7993659 | 0.7177715 | 0.7563745 | 2459 |
152
+ | TIME | 0.6951219 | 0.606383 | 0.6477273 | 470 |
153
+ | DURATION | 0 | 0 | 0 | 12 |
154
+ | SET | 0 | 0 | 0 | 5 |
155
+ | Micro-avg.| 0.7830405 | 0.6958588 | 0.7368799 | 2946 |
156
+ | Macro-avg.| 0.373622 | 0.3310386 | 0.3510436 | 2946 |
 
 
 
 
 
 
 
157
 
158
  ## Citation [optional]
159
 
 
167
 
168
  [More Information Needed]
169
 
 
 
 
 
 
 
170
  ## More Information [optional]
171
 
172
  [More Information Needed]