Add bad words and rep pen whitelist for Erato

9d2a700b043b702ec7693679840b39b5cd92fb69

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +20 -0Ignore whitespace
src/endpoints/novelai.js+20 -0
@@ -15,6 +15,11 @@ const badWordsList = [
15 [19438], [43145], [26523], [41471], [2936], [85, 85], [49332], [7286], [1115], [24],15 [19438], [43145], [26523], [41471], [2936], [85, 85], [49332], [7286], [1115], [24],
16];16];
1717
18const eratoBadWordsList = [
19 [16067], [933, 11144], [25106, 11144], [58, 106901, 16073, 33710, 25, 109933],
20 [933, 58, 11144], [128030], [58, 30591, 33503, 17663, 100204, 25, 11144],
21];
22
18const hypeBotBadWordsList = [23const hypeBotBadWordsList = [
19 [58], [60], [90], [92], [685], [1391], [1782], [2361], [3693], [4083], [4357], [4895],24 [58], [60], [90], [92], [685], [1391], [1782], [2361], [3693], [4083], [4357], [4895],
20 [5512], [5974], [7131], [8183], [8351], [8762], [8964], [8973], [9063], [11208],25 [5512], [5974], [7131], [8183], [8351], [8762], [8964], [8973], [9063], [11208],
@@ -42,6 +47,13 @@ const repPenaltyAllowList = [
42 803, 1040, 49209, 4, 5, 6, 7, 8, 9, 10, 11, 12],47 803, 1040, 49209, 4, 5, 6, 7, 8, 9, 10, 11, 12],
43];48];
4449
50const eratoRepPenWhitelist = [
51 6, 1, 11, 13, 25, 198, 12, 9, 8, 279, 264, 459, 323, 477, 539, 912, 374, 574, 1051, 1550, 1587, 4536, 5828, 15058,
52 3287, 3250, 1461, 1077, 813, 11074, 872, 1202, 1436, 7846, 1288, 13434, 1053, 8434, 617, 9167, 1047, 19117, 706,
53 12775, 649, 4250, 527, 7784, 690, 2834, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1210, 1359, 608, 220, 596, 956,
54 3077, 44886, 4265, 3358, 2351, 2846, 311, 389, 315, 304, 520, 505, 430
55];
56
45// Ban the dinkus and asterism57// Ban the dinkus and asterism
46const logitBiasExp = [58const logitBiasExp = [
47 { 'sequence': [23], 'bias': -0.08, 'ensure_sequence_finish': false, 'generate_once': false },59 { 'sequence': [23], 'bias': -0.08, 'ensure_sequence_finish': false, 'generate_once': false },
@@ -64,6 +76,10 @@ function getBadWordsList(model) {
64 list = badWordsList;76 list = badWordsList;
65 }77 }
6678
79 if (model.includes('erato')) {
80 list = eratoBadWordsList;
81 }
82
67 // Clone the list so we don't modify the original83 // Clone the list so we don't modify the original
68 return list.slice();84 return list.slice();
69}85}
@@ -87,6 +103,10 @@ function getRepPenaltyWhitelist(model) {
87 return repPenaltyAllowList.flat();103 return repPenaltyAllowList.flat();
88 }104 }
89105
106 if (model.includes('erato')) {
107 return eratoRepPenWhitelist.flat();
108 }
109
90 return null;110 return null;
91}111}
92112