Spaces:
Sleeping
Sleeping
nicholasKluge
commited on
Commit
•
37e5e69
1
Parent(s):
853a8c0
Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,12 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, AutoModelForSequen
|
|
6 |
model_id = "nicholasKluge/Aira-Instruct-PT-124M"
|
7 |
rewardmodel_id = "nicholasKluge/RewardModelPT"
|
8 |
toxicitymodel_id = "nicholasKluge/ToxicityModelPT"
|
9 |
-
token = "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"
|
10 |
|
11 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
12 |
|
13 |
-
model = AutoModelForCausalLM.from_pretrained(model_id
|
14 |
-
rewardModel = AutoModelForSequenceClassification.from_pretrained(rewardmodel_id
|
15 |
-
toxicityModel = AutoModelForSequenceClassification.from_pretrained(toxicitymodel_id
|
16 |
|
17 |
model.eval()
|
18 |
rewardModel.eval()
|
|
|
6 |
model_id = "nicholasKluge/Aira-Instruct-PT-124M"
|
7 |
rewardmodel_id = "nicholasKluge/RewardModelPT"
|
8 |
toxicitymodel_id = "nicholasKluge/ToxicityModelPT"
|
|
|
9 |
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
|
12 |
+
model = AutoModelForCausalLM.from_pretrained(model_id)
|
13 |
+
rewardModel = AutoModelForSequenceClassification.from_pretrained(rewardmodel_id)
|
14 |
+
toxicityModel = AutoModelForSequenceClassification.from_pretrained(toxicitymodel_id)
|
15 |
|
16 |
model.eval()
|
17 |
rewardModel.eval()
|