Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
from transformers import pipeline
|
4 |
|
5 |
-
pipe = pipeline("text-generation", model="NousResearch/Llama-2-13b-chat-hf", device_map="auto")
|
6 |
|
7 |
def model_generate(text):
|
8 |
# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
|
|
|
2 |
import torch
|
3 |
from transformers import pipeline
|
4 |
|
5 |
+
pipe = pipeline("text-generation", model="NousResearch/Llama-2-13b-chat-hf", torch_dtype=torch.bfloat16, device_map="auto")
|
6 |
|
7 |
def model_generate(text):
|
8 |
# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
|