jhl001 commited on
Commit
158aee9
1 Parent(s): 398b120

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,7 +3,8 @@ import gradio as gr
3
  import torch
4
  from transformers import AutoModelForCausalLM, AutoTokenizer
5
 
6
- model = AutoModelForCausalLM.from_pretrained("cyberagent/open-calm-7b", device_map="auto", torch_dtype=torch.float16)
 
7
  tokenizer = AutoTokenizer.from_pretrained("cyberagent/open-calm-7b")
8
 
9
  def proc( inputs ):
 
3
  import torch
4
  from transformers import AutoModelForCausalLM, AutoTokenizer
5
 
6
+ model = AutoModelForCausalLM.from_pretrained("cyberagent/open-calm-7b", device_map="auto", torch_dtype=torch.int8, load_in_8bit=True)
7
+ #torch_dtype=torch.float16)
8
  tokenizer = AutoTokenizer.from_pretrained("cyberagent/open-calm-7b")
9
 
10
  def proc( inputs ):