Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,9 @@ import subprocess
|
|
6 |
import sys
|
7 |
|
8 |
# Force install the specific transformers version from the GitHub PR
|
9 |
-
subprocess.check_call([sys.executable, "-m", "pip", "install", "--force-reinstall", "
|
10 |
|
11 |
-
model_name = "allenai/OLMoE-1B-7B-0924
|
12 |
|
13 |
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, torch_dtype="auto").cuda().eval()
|
14 |
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
|
|
6 |
import sys
|
7 |
|
8 |
# Force install the specific transformers version from the GitHub PR
|
9 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "-upgrade" "--force-reinstall", "torch", "git+https://github.com/Muennighoff/transformers.git@olmoe"])
|
10 |
|
11 |
+
model_name = "allenai/OLMoE-1B-7B-0924"
|
12 |
|
13 |
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, torch_dtype="auto").cuda().eval()
|
14 |
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|