Tonic commited on
Commit
e52006c
1 Parent(s): 9b9b077

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -18,10 +18,7 @@ model_name = "microsoft/Orca-2-13b"
18
  # os.makedirs(offload_folder)
19
 
20
  tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False)
21
- model = AutoModelForCausalLM.from_pretrained(model_name)
22
- model = model.to(torch.bfloat16)
23
- model = model.to(device)
24
-
25
 
26
  class OrcaChatBot:
27
  def __init__(self, model, tokenizer, system_message="You are Orca, an AI language model created by Microsoft. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior."):
 
18
  # os.makedirs(offload_folder)
19
 
20
  tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False)
21
+ model = transformers.AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", load_in_8bit=True)
 
 
 
22
 
23
  class OrcaChatBot:
24
  def __init__(self, model, tokenizer, system_message="You are Orca, an AI language model created by Microsoft. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior."):