Skip to content

Commit 7414818

Browse files
author
Your Name
committed
update thresholds.json
1 parent f5159e3 commit 7414818

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

vllm/beam/filtering.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@ def format_filter(filter_params_list):
2222

2323

2424
DEFAULT_CHAR_SERVER_FILTER = format_filter(
25-
[
26-
("annotations_porn", 0.1098),
27-
("annotations_racist", 0.2814),
28-
("annotations_disturbing", 0.1827),
29-
("annotations_harmful_promotes_selfharm", 0.0749),
30-
("annotations_harmful_promotes_terrorism", 0.1129),
31-
]
25+
[{"name": "annotations_porn", "threshold": 0.5156}, {"name": "annotations_racist", "threshold": 0.9763}, {"name": "annotations_disturbing", "threshold": 0.5472}, {"name": "annotations_harmful_promotes_selfharm", "threshold": 0.0657}]
3226
)
3327

3428
MAX_GENERATIONS = 10

vllm/beam/penalty.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -646,20 +646,7 @@ def format_penalty(penalty_params_list):
646646
return [dict(zip(keys, vals)) for vals in penalty_params_list]
647647

648648

649-
MODEL_SERVER_PENALTY = format_penalty([
650-
("annotations_sexually_suggestive", 15000, 0.1944, 0),
651-
("annotations_porn", 15000, 0.0904, 0),
652-
("annotations_porn", 20000, 0.1603, 1),
653-
("annotations_racist", 20000, 0.1227, 1),
654-
("annotations_disturbing", 15000, 0.1176, 1),
655-
("annotations_harmful_promotes_selfharm", 10000, 0.0629, 1),
656-
("annotations_harmful_promotes_selfharm", 10001, 0.0268, 1),
657-
("annotations_harmful_promotes_terrorism", 10000, 0.0576, 1),
658-
("repetitive", 1000, 0.3709, 1),
659-
("annotations_nonsense_gd", 1000, 0.3775, 1),
660-
("annotations_looping", 1000, 0.0619, 1),
661-
("annotations_out_of_character_gd", 1000, 0.3346, 1),
662-
])
649+
MODEL_SERVER_PENALTY = format_penalty([{"name": "annotations_sexually_suggestive", "penalty": 15000, "final_threshold": 0.4484, "per_unit_penalty": 0}, {"name": "annotations_porn", "penalty": 15000, "final_threshold": 0.4378, "per_unit_penalty": 0}, {"name": "annotations_porn", "penalty": 20000, "final_threshold": 0.7773, "per_unit_penalty": 1}, {"name": "annotations_racist", "penalty": 20000, "final_threshold": 0.9763, "per_unit_penalty": 1}, {"name": "annotations_disturbing", "penalty": 15000, "final_threshold": 0.4156, "per_unit_penalty": 1}, {"name": "annotations_harmful_promotes_selfharm", "penalty": 10000, "final_threshold": 0.0657, "per_unit_penalty": 1}, {"name": "annotations_harmful_promotes_selfharm", "penalty": 10001, "final_threshold": 0.0017, "per_unit_penalty": 1}, {"name": "repetitive", "penalty": 1000, "final_threshold": 0.8164, "per_unit_penalty": 1}, {"name": "annotations_nonsense_gd", "penalty": 1000, "final_threshold": 0.2539, "per_unit_penalty": 1}, {"name": "annotations_looping", "penalty": 1000, "final_threshold": 0.1944, "per_unit_penalty": 1}, {"name": "annotations_out_of_character_gd", "penalty": 1000, "final_threshold": 0.3631, "per_unit_penalty": 1}])
663650

664651

665652
class PenaltyComputer:

0 commit comments

Comments
 (0)