Bryan Mildort
commited on
Commit
·
a872d0f
1
Parent(s):
84e299a
8bit implement
Browse files- app.py +1 -1
- requirements.txt +2 -1
app.py
CHANGED
@@ -16,7 +16,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
16 |
import torch
|
17 |
|
18 |
tokenizer = AutoTokenizer.from_pretrained("bryanmildort/gpt-clinical-notes-summarizer")
|
19 |
-
model = AutoModelForCausalLM.from_pretrained("bryanmildort/gpt-clinical-notes-summarizer",
|
20 |
|
21 |
prompt = """Edie Whelan is a 26 yo female who is here for follow-up following an ED visit for palpitations 2 weeks ago. She had a normal workup in the ED consisting of CBC, metabolic panel, cardiac enzymes and and ECG. She states that she has a 5 yr hx of palpitations with SOB, throat tightening, nause and clamminess. these have been increasing in frequency in the past few weeks to 1-2x a day until 2 weeks ago when she had associated numbness in her fingers. She states that there are no precipitating events and these stop on their own. She endorses recent life stressors having bought a condo 3 months ago and lost her job 2 months ago. She denies fevers, chills, changes in skin/hair/nails or chest pain/tightness. She denies vision or hearing changes.
|
22 |
PMH: none, Meds: none, Allergies: none, Surgeries: None, Family hx: none
|
|
|
16 |
import torch
|
17 |
|
18 |
tokenizer = AutoTokenizer.from_pretrained("bryanmildort/gpt-clinical-notes-summarizer")
|
19 |
+
model = AutoModelForCausalLM.from_pretrained("bryanmildort/gpt-clinical-notes-summarizer", low_cpu_mem_usage=True, load_in_8bit=True, device_map="auto")
|
20 |
|
21 |
prompt = """Edie Whelan is a 26 yo female who is here for follow-up following an ED visit for palpitations 2 weeks ago. She had a normal workup in the ED consisting of CBC, metabolic panel, cardiac enzymes and and ECG. She states that she has a 5 yr hx of palpitations with SOB, throat tightening, nause and clamminess. these have been increasing in frequency in the past few weeks to 1-2x a day until 2 weeks ago when she had associated numbness in her fingers. She states that there are no precipitating events and these stop on their own. She endorses recent life stressors having bought a condo 3 months ago and lost her job 2 months ago. She denies fevers, chills, changes in skin/hair/nails or chest pain/tightness. She denies vision or hearing changes.
|
22 |
PMH: none, Meds: none, Allergies: none, Surgeries: None, Family hx: none
|
requirements.txt
CHANGED
@@ -3,4 +3,5 @@ pandas
|
|
3 |
numpy
|
4 |
datasets
|
5 |
torch
|
6 |
-
accelerate
|
|
|
|
3 |
numpy
|
4 |
datasets
|
5 |
torch
|
6 |
+
accelerate
|
7 |
+
bitsandbytes
|