robinhad commited on
Commit
b0b43c1
1 Parent(s): 30c0330

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ from peft import PeftModel
2
  from transformers import LlamaTokenizer, LlamaForCausalLM, GenerationConfig
3
  import gradio as gr
4
  from torch.cuda import is_available
5
- from torch import float16
6
 
7
  if is_available():
8
  options = dict(
@@ -11,7 +11,7 @@ if is_available():
11
  )
12
  else:
13
  options = {
14
- "torch_dtype": float16
15
  #"low_cpu_mem_usage": True,
16
  #"offload_state_dict": True,
17
  #"offload_folder": "offload",
 
2
  from transformers import LlamaTokenizer, LlamaForCausalLM, GenerationConfig
3
  import gradio as gr
4
  from torch.cuda import is_available
5
+ from torch import bfloat16
6
 
7
  if is_available():
8
  options = dict(
 
11
  )
12
  else:
13
  options = {
14
+ "torch_dtype": bfloat16
15
  #"low_cpu_mem_usage": True,
16
  #"offload_state_dict": True,
17
  #"offload_folder": "offload",