Update app.py
Browse files
app.py
CHANGED
@@ -69,8 +69,8 @@ tokenizer.padding_side = 'left'
|
|
69 |
peft_config = PeftConfig.from_pretrained("Tonic/mistralmed")
|
70 |
peft_model = MistralForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1", trust_remote_code=True)
|
71 |
peft_model = PeftModel.from_pretrained(peft_model, "Tonic/mistralmed")
|
72 |
-
peft_model =
|
73 |
-
peft_model =
|
74 |
|
75 |
class ChatBot:
|
76 |
def __init__(self):
|
|
|
69 |
peft_config = PeftConfig.from_pretrained("Tonic/mistralmed")
|
70 |
peft_model = MistralForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1", trust_remote_code=True)
|
71 |
peft_model = PeftModel.from_pretrained(peft_model, "Tonic/mistralmed")
|
72 |
+
peft_model = peft_model.to(torch.bfloat16)
|
73 |
+
peft_model = peft_model.to(device)
|
74 |
|
75 |
class ChatBot:
|
76 |
def __init__(self):
|