vilarin commited on
Commit
f6cebe3
1 Parent(s): 4513c4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -34,7 +34,11 @@ h3 {
34
  device = "cuda" # for GPU usage or "cpu" for CPU usage
35
 
36
  tokenizer = AutoTokenizer.from_pretrained(MODEL)
37
- model = AutoModelForCausalLM.from_pretrained(MODEL).to(device)
 
 
 
 
38
 
39
  @spaces.GPU()
40
  def stream_chat(
 
34
  device = "cuda" # for GPU usage or "cpu" for CPU usage
35
 
36
  tokenizer = AutoTokenizer.from_pretrained(MODEL)
37
+ model = AutoModelForCausalLM.from_pretrained(
38
+ MODEL,
39
+ torch_dtype=torch.bfloat16,
40
+ device_map="auto",
41
+ ignore_mismatched_sizes=True).to(device)
42
 
43
  @spaces.GPU()
44
  def stream_chat(