Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import torch
|
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
|
5 |
def runLLM ():
|
6 |
-
model = AutoModelForCausalLM.from_pretrained("cyberagent/open-calm-small", device_map="auto"
|
7 |
tokenizer = AutoTokenizer.from_pretrained("cyberagent/open-calm-small")
|
8 |
|
9 |
inputs = tokenizer("AIによって私達の暮らしは、", return_tensors="pt").to(model.device)
|
|
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
|
5 |
def runLLM ():
|
6 |
+
model = AutoModelForCausalLM.from_pretrained("cyberagent/open-calm-small", device_map="auto") #, torch_dtype=torch.float16)
|
7 |
tokenizer = AutoTokenizer.from_pretrained("cyberagent/open-calm-small")
|
8 |
|
9 |
inputs = tokenizer("AIによって私達の暮らしは、", return_tensors="pt").to(model.device)
|