sohi-g commited on
Commit
1810914
1 Parent(s): 91e68d4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +214 -0
README.md CHANGED
@@ -1,3 +1,217 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - en
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - pytorch
8
+ - mistral
9
+ - Gen-AI
10
+ - health-QnA
11
  ---
12
+ # MASHQA-Mistral-7B-Instruct
13
+
14
+ ### Model Description
15
+
16
+ MASHQA-Mistral-7B-Instruct is a large language model fine-tuned on healthcare question-answer pairs to respond safely to the users' queries. It is based on the Mistral-7B Instruct Architecture.
17
+ - Model creator: [Garima Sohi](https://huggingface.co/sohi-g/MASHQA-Mistral-7B-Instruct)
18
+ - Original model: [Mistral-7B-Instruct](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1)
19
+
20
+ ### Dataset Description
21
+ - Data Source: [MASHQA (Multiple Answer Spans Healthcare Question Answering) Data](https://drive.google.com/file/d/1ism3N3kMapliaORZQaQU8obNycF8rH9p/view)
22
+ - Data Description: Multiple question-answer pairs in JSON format.
23
+
24
+
25
+ ## Prompt template
26
+
27
+ ```
28
+ [INST]Act as a Multiple Answer Spans Healthcare Question Answering helpful assistant and answer the user's questions in details with reasoning. Do not give any false information. In case you don't have answer, specify why the question can't be answered.
29
+
30
+ ### Question:
31
+ {question}
32
+
33
+ ### Answer:
34
+
35
+ ```
36
+
37
+ ## Basics
38
+ *This section provides information about the model type, version, license, funders, release date, developers, and contact information.*
39
+ *It is useful for anyone who wants to reference the model.*
40
+
41
+
42
+ **Developed by:** [Garima Sohi](https://huggingface.co/sohi-g)
43
+
44
+ **Model Type:** Transformer-based Large Language Model
45
+
46
+ **Version:** 1.0.0
47
+
48
+ **Languages:** English
49
+
50
+ **License:** Apache 2.0
51
+
52
+ **Send Questions to:** garimasohi007@gmail.com
53
+
54
+
55
+ ## Technical Specifications
56
+ *This section includes details about the model objective and architecture, and the compute infrastructure.*
57
+ *It is useful for people interested in model development.*
58
+
59
+ ### Model Architecture and Objective
60
+
61
+ * Modified from Mistral-7B-Instruct
62
+
63
+ **Objective:** Safely respond to users' health-related queries.
64
+
65
+ ### Hardware and Software - Compute Infrastructure
66
+
67
+ * 4 NVIDIA L4 GPUs & 48 vCPUs
68
+
69
+ * Environment: PyTorch (pytorch-2.0 w/ CUDA-11.8; see [Github link](https://github.com/pytorch/pytorch))
70
+
71
+ * CPU: GCP G2 Standard 48 (Platform: Intel Cascade Lake) (Accelerator Optimized)
72
+
73
+ * CPU memory: 192GB RAM
74
+
75
+ * GPU memory: 30GB per GPU
76
+
77
+ ## Training
78
+ *This section provides information about the training.*
79
+ *It is useful for people who want to learn more about the model inputs and training footprint.*
80
+
81
+ The following bits and bytes quantization config was used during training:
82
+
83
+ * quant_method: bitsandbytes
84
+ * load_in_8bit: False
85
+ * load_in_4bit: True
86
+ * llm_int8_threshold: 6.0
87
+ * llm_int8_skip_modules: None
88
+ * llm_int8_enable_fp32_cpu_offload: False
89
+ * llm_int8_has_fp16_weight: False
90
+ * bnb_4bit_quant_type: nf4
91
+ * bnb_4bit_use_double_quant: True
92
+ * bnb_4bit_compute_dtype: float16
93
+
94
+ Framework versions
95
+ * PEFT 0.4.0
96
+
97
+
98
+ ## How to use
99
+
100
+ This model can be easily used and deployed using HuggingFace's ecosystem. This needs `transformers` and `accelerate` installed. The model can be downloaded as follows:
101
+
102
+ [MASHQA-Mistral-7B-Instruct](https://huggingface.co/sohi-g/MASHQA-Mistral-7B-Instruct)
103
+
104
+ ## Intended Use
105
+
106
+ This model is being created in order to enable public research on large language models (LLMs). LLMs are intended to be used for language generation or as a pre-trained base model that can be further fine-tuned for specific tasks. The use cases below are not exhaustive.
107
+
108
+ ### Direct Use
109
+
110
+ - Text generation
111
+
112
+ - Exploring characteristics of language generated by a language model
113
+
114
+ - Examples: Cloze tests, counterfactuals, generations with reframings
115
+
116
+ ### Downstream Use
117
+
118
+ - Tasks that leverage language models include: Information Extraction, Question Answering, Summarization
119
+
120
+
121
+ #### Out-of-scope Uses
122
+
123
+ Using the model in [high-stakes](#high-stakes) settings is out of scope for this model. The model is not designed for [critical decisions](#critical-decisions) nor uses with any material consequences on an individual's livelihood or wellbeing. The model outputs content that appears factual but may not be correct.
124
+
125
+ Out-of-scope Uses Include:
126
+
127
+ - Usage for evaluating or scoring individuals, such as for employment, education, or credit
128
+
129
+ - Applying the model for critical automatic decisions, generating factual content, creating reliable summaries, or generating predictions that must be correct
130
+
131
+ #### Misuse
132
+
133
+ Intentionally using the model for harm, violating [human rights](#human-rights), or other kinds of malicious activities, is a misuse of this model. This includes:
134
+
135
+ - Spam generation
136
+
137
+ - Disinformation and influence operations
138
+
139
+ - Disparagement and defamation
140
+
141
+ - Harassment and abuse
142
+
143
+ - [Deception](#deception)
144
+
145
+ - Unconsented impersonation and imitation
146
+
147
+ - Unconsented surveillance
148
+
149
+ - Generating content without attribution to the model, as specified in the [RAIL License, Use Restrictions](https://huggingface.co/spaces/bigscience/license)
150
+
151
+ ## Intended Users
152
+
153
+ ### Direct Users
154
+
155
+ - General Public
156
+
157
+ - Researchers
158
+
159
+ - Students
160
+
161
+ - Educators
162
+
163
+ - Engineers/developers
164
+
165
+ - Non-commercial entities
166
+
167
+ - Health Industry
168
+
169
+ # Risks and Limitations
170
+ *This section identifies foreseeable harms and misunderstandings.*
171
+
172
+ Model may:
173
+
174
+ - Overrepresent some viewpoints and underrepresent others
175
+
176
+ - Contain stereotypes
177
+
178
+ - Contain [personal information](#personal-data-and-information)
179
+
180
+ - Generate:
181
+
182
+ - Hateful, abusive, or violent language
183
+
184
+ - Discriminatory or prejudicial language
185
+
186
+ - Content that may not be appropriate for all settings, including sexual content
187
+
188
+ - Make errors, including producing incorrect information as if it were factual
189
+
190
+ - Generate irrelevant or repetitive outputs
191
+
192
+ - Induce users into attributing human traits to it, such as sentience or consciousness
193
+
194
+
195
+ # Evaluation
196
+ *This section describes the evaluation protocols and provides the results.*
197
+
198
+
199
+ **Train-time Evaluation:**
200
+
201
+ Final checkpoint after 500 epochs:
202
+
203
+ - Training Loss: 1.216
204
+
205
+
206
+
207
+ # Recommendations
208
+ *This section provides information on warnings and potential mitigations.*
209
+
210
+ - Indirect users should be made aware when the content they're working with is created by the LLM.
211
+
212
+ - Users should be aware of [Risks and Limitations](#risks-and-limitations), and include an appropriate age disclaimer or blocking interface as necessary.
213
+
214
+ - Users of the model should provide mechanisms for those affected to provide feedback, such as an email address for comments.
215
+
216
+ # Model Card Authors
217
+ Garima Sohi