Spaces:
Runtime error
Runtime error
Commit
·
e450f6c
1
Parent(s):
2b64787
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ model = LlamaForCausalLM.from_pretrained(
|
|
| 17 |
load_in_8bit=True,
|
| 18 |
device_map="auto") #low_cpu_mem_usage=True)
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
|
| 23 |
def add_text(history, text):
|
|
@@ -68,7 +68,7 @@ def generateresponse(history, task):
|
|
| 68 |
PROMPT,
|
| 69 |
return_tensors="pt",
|
| 70 |
)
|
| 71 |
-
input_ids = inputs["input_ids"]
|
| 72 |
|
| 73 |
generation_config = GenerationConfig(
|
| 74 |
temperature=0.6,
|
|
|
|
| 17 |
load_in_8bit=True,
|
| 18 |
device_map="auto") #low_cpu_mem_usage=True)
|
| 19 |
|
| 20 |
+
model = model.to('cuda')
|
| 21 |
|
| 22 |
|
| 23 |
def add_text(history, text):
|
|
|
|
| 68 |
PROMPT,
|
| 69 |
return_tensors="pt",
|
| 70 |
)
|
| 71 |
+
input_ids = inputs["input_ids"].cuda()
|
| 72 |
|
| 73 |
generation_config = GenerationConfig(
|
| 74 |
temperature=0.6,
|