Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,7 @@
|
|
1 |
import torch
|
2 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
|
4 |
-
MODEL_ID = "rinna/bilingual-gpt-neox-4b-instruction-ppo"
|
5 |
-
model = AutoModelForCausalLM.from_pretrained(
|
6 |
-
MODEL_ID,
|
7 |
-
load_in_8bit=True,
|
8 |
-
device_map="auto"
|
9 |
-
)
|
10 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, use_fast=False)
|
11 |
|
12 |
device = model.device
|
|
|
1 |
import torch
|
2 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
|
4 |
+
MODEL_ID = "rinna/bilingual-gpt-neox-4b-instruction-ppo"model = AutoModelForCausalLM.from_pretrained("model_name", device_map="cpu")
|
|
|
|
|
|
|
|
|
|
|
5 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, use_fast=False)
|
6 |
|
7 |
device = model.device
|