Spaces:
Sleeping
Sleeping
Update model.py
Browse files
model.py
CHANGED
@@ -1,8 +1,4 @@
|
|
1 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
2 |
-
import torch
|
3 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
4 |
-
print(device)
|
5 |
-
@torch.no_grad()
|
6 |
def create_model():
|
7 |
tokenizer = AutoTokenizer.from_pretrained('stabilityai/stablelm-zephyr-3b')
|
8 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
1 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
|
|
|
|
|
2 |
def create_model():
|
3 |
tokenizer = AutoTokenizer.from_pretrained('stabilityai/stablelm-zephyr-3b')
|
4 |
model = AutoModelForCausalLM.from_pretrained(
|