Spaces:
Runtime error
Runtime error
Commit
·
0ff8195
1
Parent(s):
81326fa
add api
Browse files
app.py
CHANGED
@@ -10,9 +10,10 @@ os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
|
|
10 |
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
|
11 |
|
12 |
MODEL_NAME = "RegularizedSelfPlay/sppo_forward1reverse5-0.1-PromptABC-Mistral-7B-Instruct-SPPO-Iter3" # Example: "meta-llama/Llama-2-7b-chat-hf"
|
|
|
13 |
|
14 |
# Load model and tokenizer
|
15 |
-
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")
|
16 |
llm = LLM(
|
17 |
model=MODEL_NAME,
|
18 |
# revision="1296dc8fd9b21e6424c9c305c06db9ae60c03ace",
|
|
|
10 |
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
|
11 |
|
12 |
MODEL_NAME = "RegularizedSelfPlay/sppo_forward1reverse5-0.1-PromptABC-Mistral-7B-Instruct-SPPO-Iter3" # Example: "meta-llama/Llama-2-7b-chat-hf"
|
13 |
+
HF_TOKEN = os.getenv("HF_API_TOKEN")
|
14 |
|
15 |
# Load model and tokenizer
|
16 |
+
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2", use_auth_token=HF_TOKEN)
|
17 |
llm = LLM(
|
18 |
model=MODEL_NAME,
|
19 |
# revision="1296dc8fd9b21e6424c9c305c06db9ae60c03ace",
|