Commit
·
7dfdc23
1
Parent(s):
5e720dd
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ st.write(device_str)
|
|
24 |
|
25 |
tokenizer = AutoTokenizer.from_pretrained("bryanmildort/gpt-clinical-notes-summarizer")
|
26 |
checkpoint = "bryanmildort/gpt-clinical-notes-summarizer"
|
27 |
-
model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", offload_folder="offload", offload_state_dict = True,
|
28 |
|
29 |
device_map = infer_auto_device_map(model, dtype="float16")
|
30 |
st.write(device_map)
|
|
|
24 |
|
25 |
tokenizer = AutoTokenizer.from_pretrained("bryanmildort/gpt-clinical-notes-summarizer")
|
26 |
checkpoint = "bryanmildort/gpt-clinical-notes-summarizer"
|
27 |
+
model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", offload_folder="offload", offload_state_dict = True, load_in_8bit=True)
|
28 |
|
29 |
device_map = infer_auto_device_map(model, dtype="float16")
|
30 |
st.write(device_map)
|