Update app.py
Browse files
app.py
CHANGED
@@ -33,11 +33,11 @@ repetition_penalty=1.7
|
|
33 |
|
34 |
tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
|
35 |
model = transformers.AutoModelForCausalLM.from_pretrained(model_name,
|
36 |
-
device_map="auto"
|
37 |
-
torch_dtype=torch.
|
38 |
# load_in_4bit=True
|
39 |
)
|
40 |
-
model.eval()
|
41 |
|
42 |
class StarlingBot:
|
43 |
def __init__(self, system_prompt="The following dialogue is a conversation"):
|
|
|
33 |
|
34 |
tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
|
35 |
model = transformers.AutoModelForCausalLM.from_pretrained(model_name,
|
36 |
+
device_map="auto"
|
37 |
+
torch_dtype=torch.bfloat16,
|
38 |
# load_in_4bit=True
|
39 |
)
|
40 |
+
# model.eval()
|
41 |
|
42 |
class StarlingBot:
|
43 |
def __init__(self, system_prompt="The following dialogue is a conversation"):
|