Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,12 @@ from llama_cpp import Llama, LlamaGrammar
|
|
6 |
|
7 |
|
8 |
zero = torch.Tensor([0]).cuda()
|
9 |
-
print(zero.device) # <-- 'cpu' 🤔
|
10 |
|
11 |
@spaces.GPU
|
12 |
def greet(n):
|
13 |
global llm
|
14 |
-
print(zero.device) # <-- 'cuda:0' 🤗
|
15 |
grammar = LlamaGrammar.from_string('''
|
16 |
root ::= sentence
|
17 |
answer ::= (weather | complaint | yesno | gen)
|
|
|
6 |
|
7 |
|
8 |
zero = torch.Tensor([0]).cuda()
|
9 |
+
print(f'zero.device: {zero.device}') # <-- 'cpu' 🤔
|
10 |
|
11 |
@spaces.GPU
|
12 |
def greet(n):
|
13 |
global llm
|
14 |
+
print(f'zero.device: {zero.device}') # <-- 'cuda:0' 🤗
|
15 |
grammar = LlamaGrammar.from_string('''
|
16 |
root ::= sentence
|
17 |
answer ::= (weather | complaint | yesno | gen)
|