linkanjarad commited on
Commit
121ac0c
1 Parent(s): d07bc74

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -25
README.md CHANGED
@@ -1,10 +1,15 @@
1
  ---
2
  license: other
3
- tags:
4
- - generated_from_trainer
5
  model-index:
6
  - name: Doctor-OPT-350M
7
  results: []
 
 
 
 
 
 
 
8
  ---
9
 
10
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
@@ -12,39 +17,59 @@ should probably proofread and complete it, then remove this comment. -->
12
 
13
  # Doctor-OPT-350M
14
 
15
- This model is a fine-tuned version of [facebook/opt-350m](https://huggingface.co/facebook/opt-350m) on an unknown dataset.
16
 
17
  ## Model description
18
 
19
- More information needed
20
 
21
  ## Intended uses & limitations
22
 
23
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
- ## Training and evaluation data
26
 
27
- More information needed
 
28
 
29
- ## Training procedure
 
30
 
31
- ### Training hyperparameters
 
32
 
33
- The following hyperparameters were used during training:
34
- - learning_rate: 2e-05
35
- - train_batch_size: 1
36
- - eval_batch_size: 1
37
- - seed: 42
38
- - gradient_accumulation_steps: 256
39
- - total_train_batch_size: 256
40
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
41
- - lr_scheduler_type: linear
42
- - lr_scheduler_warmup_ratio: 0.15
43
- - num_epochs: 1
44
 
45
- ### Framework versions
 
46
 
47
- - Transformers 4.27.4
48
- - Pytorch 1.13.0
49
- - Datasets 2.1.0
50
- - Tokenizers 0.13.2
 
1
  ---
2
  license: other
 
 
3
  model-index:
4
  - name: Doctor-OPT-350M
5
  results: []
6
+ widget:
7
+ - text: |-
8
+ Patient: I've been experiencing a persistent cough for the past week. What could be causing it?
9
+
10
+ Doctor: <start>
11
+ datasets:
12
+ - sid6i7/patient-doctor
13
  ---
14
 
15
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
 
17
 
18
  # Doctor-OPT-350M
19
 
20
+ This model is a fine-tuned version of [facebook/opt-350m](https://huggingface.co/facebook/opt-350m) on the [sid6i7/patient-doctor](https://huggingface.co/datasets/sid6i7/patient-doctor).
21
 
22
  ## Model description
23
 
24
+ This is an LLM trained on patient-doctor dialogues, mostly comprised of doctors giving medical advice to patients.
25
 
26
  ## Intended uses & limitations
27
 
28
+ This model is intended for research on the capabilities of LLMs. Any output from this LLM is not to be treated as legitimate medical advice.
29
+
30
+ The model works best when given input in the format of the dataset it was trained on. Here is an example of the format:
31
+
32
+ ```
33
+ Patient: Please can you help me with thoughts about its. Where my gut gives out spasms and. Uncontrol movements like pulsating 24,7. It seems. Worst when stressed I would like something that regards relaxing the bowel to get some more pleasures in life. Many thanks. XXXX
34
+
35
+ Doctor: <start> Hello, Continuous abdominal spasms can be due to different reasons. Is there any intense pain present? Are you on any medication?It might be related to food habits. Try consuming food that is rich in fibers.
36
+ ```
37
+
38
+
39
+ ## Sample Use
40
+
41
+ ```python
42
+ from transformers import pipeline
43
+
44
+ generator = pipeline('text-generation', model='linkanjarad/Doctor-OPT-350M')
45
+
46
+ # Format the prompt to match the dataset formatting
47
+ prompt = '''Patient: Hi, I'm 30 years old. Recently, I've been having abdominal pain and discomfort after meals. It feels like a burning sensation. What could be the possible causes?
48
+
49
+ Doctor: <start>'''
50
+
51
+ output = generator(prompt, do_sample=True, min_length=10, max_length=50, temperature=0.5)
52
+ print(output[0]['generated_text'])
53
+ ```
54
 
55
+ ## Sample Outputs
56
 
57
+ ```
58
+ Patient: "I'm a 40-year-old male with a family history of heart disease. Lately, I've been experiencing chest discomfort and shortness of breath during physical activity. Are these symptoms indicative of a heart problem, and what tests should I undergo to evaluate my heart health?
59
 
60
+ Doctor: <start> Hello,The symptoms you have mentioned are suggestive of cardiac problems. These symptoms are also possible due to high blood pressure and cholesterol. I would recommend performing physical activity such as walking, rollerblading, swimming, etc. to increase your activity levels.I would also recommend doing an ultrasound scan of the heart to determine if there is a risk of a heart problem. I would also recommend doing a blood test to
61
+ ```
62
 
63
+ ```
64
+ Patient: I'm feeling this pain in my chest when I see this particular person. My breath feels shortened and I feel nervous, and I get a tingly sensation. My eyes seem to follow the person. What could this be?
65
 
66
+ Doctor: <start> Hi,
67
+ Thanks for writing in.
68
+ The symptoms you have described suggest to be related to some sort of pulmonary infections. I would advise you to undergo a check up by a physician of the chest and abdomen. In addition, you should go for a chest X-ray and a chest and abdomen MRI.
69
+ ```
 
 
 
 
 
 
 
70
 
71
+ ```
72
+ Patient: Hello, I am a 20 year old female and have been getting stabbing pains on the lower right side of my abdomen everyday for about 4 weeks now. I know it cant be my appendix for it was removed in 2010. I have noticed that above the scar of my appendix removal the area seems risen, and beneath the scar the area is flat. Should i be worried and seek further help?
73
 
74
+ Doctor: <start> Hi dear,Thanks for writing in.The pain in the upper right side of the abdomen may be because of some sort of appendicitis. Some times it can be due to a condition called anemia. If there is anemia and the pain is not related to anemia, then chances of appendicitis are low. I would suggest you to consult an emic specialist and get a urine and blood test done. Anemia can be treated in a few ways. For example, erythrocyte sedimentation rate (ESR), blood protein level, and a few more tests like CT scan of the abdomen and kidney are important but the actual diagnosis is not always confirmed. I hope my answer will help you.Wish you all the best.
75
+ ```