Spaces:
Paused
Paused
truongghieu
commited on
Commit
•
250be57
1
Parent(s):
c22d12b
Update app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,11 @@ bnb_config = BitsAndBytesConfig(
|
|
12 |
)
|
13 |
|
14 |
|
15 |
-
tokenizer = AutoTokenizer.from_pretrained("truongghieu/deci-finetuned", trust_remote_code=True)
|
|
|
16 |
# Load model in this way if use GPU
|
17 |
-
model = AutoModelForCausalLM.from_pretrained("truongghieu/deci-finetuned", trust_remote_code=True, quantization_config=bnb_config)
|
18 |
-
|
19 |
# model = AutoModelForCausalLM.from_pretrained("truongghieu/deci-finetuned", trust_remote_code=True)
|
20 |
# Move the model to the GPU if available
|
21 |
|
|
|
12 |
)
|
13 |
|
14 |
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained("truongghieu/deci-finetuned", trust_remote_code=True)
|
16 |
+
tokenizer.to(device)
|
17 |
# Load model in this way if use GPU
|
18 |
+
model = AutoModelForCausalLM.from_pretrained("truongghieu/deci-finetuned", trust_remote_code=True, quantization_config=bnb_config)
|
19 |
+
model.to(device)
|
20 |
# model = AutoModelForCausalLM.from_pretrained("truongghieu/deci-finetuned", trust_remote_code=True)
|
21 |
# Move the model to the GPU if available
|
22 |
|