amornpan commited on
Commit
ca0021f
1 Parent(s): 5f67597

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -166
README.md CHANGED
@@ -3,10 +3,7 @@ library_name: transformers
3
  tags: []
4
  ---
5
 
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
 
11
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/663ce15f197afc063058dc3a/U0TIiWGdNaxl_9TH90gIx.png)
12
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/663ce15f197afc063058dc3a/mAZBm9Dk7-S-FQ4srj3aG.png)
@@ -18,191 +15,73 @@ tags: []
18
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/663ce15f197afc063058dc3a/ijHMzw9Zrpm23o89vzsSc.png)
19
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/663ce15f197afc063058dc3a/hOIyuIA_zT7_s8SG-ZDWQ.png)
20
 
 
 
 
21
  ## Model Details
22
 
23
  ### Model Description
 
24
 
25
- <!-- Provide a longer summary of what this model is. -->
 
 
 
 
 
 
26
 
27
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
28
 
29
- - **Developed by:** [More Information Needed]
30
- - **Funded by [optional]:** [More Information Needed]
31
- - **Shared by [optional]:** [More Information Needed]
32
- - **Model type:** [More Information Needed]
33
- - **Language(s) (NLP):** [More Information Needed]
34
- - **License:** [More Information Needed]
35
- - **Finetuned from model [optional]:** [More Information Needed]
36
-
37
- ### Model Sources [optional]
38
-
39
- <!-- Provide the basic links for the model. -->
40
-
41
- - **Repository:** [More Information Needed]
42
- - **Paper [optional]:** [More Information Needed]
43
- - **Demo [optional]:** [More Information Needed]
44
 
45
  ## Uses
46
 
47
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
48
-
49
  ### Direct Use
 
 
 
 
50
 
51
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
52
-
53
- [More Information Needed]
54
-
55
- ### Downstream Use [optional]
56
-
57
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
58
-
59
- [More Information Needed]
60
 
61
  ### Out-of-Scope Use
62
-
63
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
64
-
65
- [More Information Needed]
66
 
67
  ## Bias, Risks, and Limitations
68
 
69
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
 
70
 
71
- [More Information Needed]
 
 
72
 
73
- ### Recommendations
74
-
75
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
76
-
77
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
78
 
79
  ## How to Get Started with the Model
80
 
81
- Use the code below to get started with the model.
82
-
83
- [More Information Needed]
84
-
85
- ## Training Details
86
-
87
- ### Training Data
88
-
89
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
90
-
91
- [More Information Needed]
92
-
93
- ### Training Procedure
94
-
95
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
96
-
97
- #### Preprocessing [optional]
98
-
99
- [More Information Needed]
100
-
101
-
102
- #### Training Hyperparameters
103
-
104
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
105
-
106
- #### Speeds, Sizes, Times [optional]
107
-
108
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
109
-
110
- [More Information Needed]
111
-
112
- ## Evaluation
113
-
114
- <!-- This section describes the evaluation protocols and provides the results. -->
115
-
116
- ### Testing Data, Factors & Metrics
117
-
118
- #### Testing Data
119
-
120
- <!-- This should link to a Dataset Card if possible. -->
121
-
122
- [More Information Needed]
123
-
124
- #### Factors
125
-
126
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
127
-
128
- [More Information Needed]
129
-
130
- #### Metrics
131
-
132
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
133
-
134
- [More Information Needed]
135
-
136
- ### Results
137
-
138
- [More Information Needed]
139
-
140
- #### Summary
141
-
142
-
143
-
144
- ## Model Examination [optional]
145
-
146
- <!-- Relevant interpretability work for the model goes here -->
147
-
148
- [More Information Needed]
149
-
150
- ## Environmental Impact
151
-
152
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
153
-
154
- 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).
155
-
156
- - **Hardware Type:** [More Information Needed]
157
- - **Hours used:** [More Information Needed]
158
- - **Cloud Provider:** [More Information Needed]
159
- - **Compute Region:** [More Information Needed]
160
- - **Carbon Emitted:** [More Information Needed]
161
-
162
- ## Technical Specifications [optional]
163
-
164
- ### Model Architecture and Objective
165
-
166
- [More Information Needed]
167
-
168
- ### Compute Infrastructure
169
-
170
- [More Information Needed]
171
-
172
- #### Hardware
173
-
174
- [More Information Needed]
175
-
176
- #### Software
177
-
178
- [More Information Needed]
179
-
180
- ## Citation [optional]
181
-
182
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
183
-
184
- **BibTeX:**
185
-
186
- [More Information Needed]
187
-
188
- **APA:**
189
-
190
- [More Information Needed]
191
-
192
- ## Glossary [optional]
193
-
194
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
195
-
196
- [More Information Needed]
197
-
198
- ## More Information [optional]
199
 
200
- [More Information Needed]
 
201
 
202
- ## Model Card Authors [optional]
 
 
203
 
204
- [More Information Needed]
 
 
205
 
206
- ## Model Card Contact
 
207
 
208
- [More Information Needed]
 
 
3
  tags: []
4
  ---
5
 
6
+ # Model Card for `openthaigpt1.5-7b-medical-tuned`
 
 
 
7
 
8
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/663ce15f197afc063058dc3a/U0TIiWGdNaxl_9TH90gIx.png)
9
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/663ce15f197afc063058dc3a/mAZBm9Dk7-S-FQ4srj3aG.png)
 
15
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/663ce15f197afc063058dc3a/ijHMzw9Zrpm23o89vzsSc.png)
16
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/663ce15f197afc063058dc3a/hOIyuIA_zT7_s8SG-ZDWQ.png)
17
 
18
+ <!-- Provide a quick summary of what the model is/does. -->
19
+ This model is fine-tuned from `openthaigpt1.5-7b-instruct` using Supervised Fine-Tuning (SFT) on the `Thaweewat/thai-med-pack` dataset. The model is designed for medical question-answering tasks in Thai, specializing in providing accurate and contextual answers based on medical information.
20
+
21
  ## Model Details
22
 
23
  ### Model Description
24
+ This model was fine-tuned using Supervised Fine-Tuning (SFT) to optimize it for medical question answering in Thai. The base model is `openthaigpt1.5-7b-instruct`, and it has been enhanced with domain-specific knowledge using the `Thaweewat/thai-med-pack` dataset.
25
 
26
+ - **Developed by:** [Your Name or Organization]
27
+ - **Fine-tuned by:** [Your Name or Organization]
28
+ - **Model type:** Causal Language Model (AutoModelForCausalLM)
29
+ - **Language(s):** Thai
30
+ - **License:** [Your Chosen License]
31
+ - **Fine-tuned from model:** `openthaigpt1.5-7b-instruct`
32
+ - **Dataset used for fine-tuning:** `Thaweewat/thai-med-pack`
33
 
34
+ ### Model Sources
35
 
36
+ - **Repository:** [Link to your Hugging Face model repository]
37
+ - **Base Model:** [Link to `openthaigpt1.5-7b-instruct` repository]
38
+ - **Dataset:** [Link to `Thaweewat/thai-med-pack` repository]
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  ## Uses
41
 
 
 
42
  ### Direct Use
43
+ The model can be directly used for generating medical responses in Thai. It has been optimized for:
44
+ - Medical question-answering
45
+ - Providing clinical information
46
+ - Health-related dialogue generation
47
 
48
+ ### Downstream Use
49
+ This model can be used as a foundational model for medical assistance systems, chatbots, and applications related to healthcare, specifically in the Thai language.
 
 
 
 
 
 
 
50
 
51
  ### Out-of-Scope Use
52
+ - This model should not be used for real-time diagnosis or emergency medical scenarios.
53
+ - Avoid using it for critical clinical decisions without human oversight, as the model is not intended to replace professional medical advice.
 
 
54
 
55
  ## Bias, Risks, and Limitations
56
 
57
+ ### Bias
58
+ - The model might reflect biases present in the dataset, particularly when addressing underrepresented medical conditions or topics.
59
 
60
+ ### Risks
61
+ - Responses may contain inaccuracies due to the inherent limitations of the model and the dataset used for fine-tuning.
62
+ - This model should not be used as the sole source of medical advice.
63
 
64
+ ### Limitations
65
+ - Limited to the medical domain.
66
+ - The model is sensitive to prompts and may generate off-topic responses for non-medical queries.
 
 
67
 
68
  ## How to Get Started with the Model
69
 
70
+ Here’s how to load and use the model for generating medical responses in Thai:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
+ ```python
73
+ from transformers import AutoModelForCausalLM, AutoTokenizer
74
 
75
+ # Load the fine-tuned model and tokenizer
76
+ tokenizer = AutoTokenizer.from_pretrained("amornpan/openthaigpt-MedChatModelv11")
77
+ model = AutoModelForCausalLM.from_pretrained("amornpan/openthaigpt-MedChatModelv11")
78
 
79
+ # Input your medical question or prompt in Thai
80
+ input_text = "ใส่คำถามทางการแพทย์ที่นี่"
81
+ inputs = tokenizer(input_text, return_tensors="pt")
82
 
83
+ # Generate the output
84
+ output = model.generate(**inputs)
85
 
86
+ # Decode and print the generated response, skipping special tokens
87
+ print(tokenizer.decode(output[0], skip_special_tokens=True))