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