Spaces:
Sleeping
Sleeping
Update model.py
Browse files
model.py
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
)
|
9 |
-
return model,tokenizer
|
|
|
1 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
2 |
+
tokenizer = AutoTokenizer.from_pretrained('stabilityai/stablelm-zephyr-3b')
|
3 |
+
model = AutoModelForCausalLM.from_pretrained(
|
4 |
+
'stabilityai/stablelm-zephyr-3b',
|
5 |
+
trust_remote_code=True,
|
6 |
+
device_map="auto"
|
7 |
+
)
|
|
|
|