forked from KoboldAI/KoboldAI-Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gensettings.py
165 lines (163 loc) · 4.05 KB
/
gensettings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
gensettingstf = [{
"uitype": "slider",
"unit": "float",
"label": "Temperature",
"id": "settemp",
"min": 0.1,
"max": 2.0,
"step": 0.05,
"default": 1.0,
"tooltip": "Randomness of sampling. High values can increase creativity but may make text less sensible. Lower values will make text more predictable but can become repetitious."
},
{
"uitype": "slider",
"unit": "float",
"label": "Top p Sampling",
"id": "settopp",
"min": 0.1,
"max": 1.0,
"step": 0.05,
"default": 1.0,
"tooltip": "Used to discard unlikely text in the sampling process. Lower values will make text more predictable but can become repetitious."
},
{
"uitype": "slider",
"unit": "float",
"label": "Repetition Penalty",
"id": "setreppen",
"min": 1.0,
"max": 2.0,
"step": 0.05,
"default": 1.0,
"tooltip": "Used to penalize words that were already generated or belong to the context."
},
{
"uitype": "slider",
"unit": "int",
"label": "Amount to Generate",
"id": "setoutput",
"min": 16,
"max": 512,
"step": 2,
"default": 60,
"tooltip": "Number of tokens the AI should generate. Higher numbers will take longer to generate."
},
{
"uitype": "slider",
"unit": "int",
"label": "Max Tokens",
"id": "settknmax",
"min": 512,
"max": 2048,
"step": 8,
"default": 512,
"tooltip": "Max number of tokens of context to submit to the AI for sampling. Make sure this is higher than Amount to Generate. Higher values increase VRAM/RAM usage."
},
{
"uitype": "slider",
"unit": "int",
"label": "Gens Per Action",
"id": "setnumseq",
"min": 1,
"max": 5,
"step": 1,
"default": 1,
"tooltip": "Number of results to generate per submission. Increases VRAM/RAM usage."
},
{
"uitype": "slider",
"unit": "int",
"label": "W Info Depth",
"id": "setwidepth",
"min": 1,
"max": 5,
"step": 1,
"default": 1,
"tooltip": "Number of historic actions to scan for W Info keys."
},
{
"uitype": "toggle",
"unit": "bool",
"label": "Always Add Prompt",
"id": "setuseprompt",
"min": 0,
"max": 1,
"step": 1,
"default": 1,
"tooltip": "Whether the prompt should be sent in the context of every action."
}]
gensettingsik =[{
"uitype": "slider",
"unit": "float",
"label": "Temperature",
"id": "settemp",
"min": 0.1,
"max": 2.0,
"step": 0.05,
"default": 1.0,
"tooltip": "Randomness of sampling. High values can increase creativity but may make text less sensible. Lower values will make text more predictable but can become repetitious."
},
{
"uitype": "slider",
"unit": "float",
"label": "Top p Sampling",
"id": "settopp",
"min": 0.1,
"max": 1.0,
"step": 0.05,
"default": 1.0,
"tooltip": "Used to discard unlikely text in the sampling process. Lower values will make text more predictable but can become repetitious."
},
{
"uitype": "slider",
"unit": "int",
"label": "Amount to Generate",
"id": "setikgen",
"min": 50,
"max": 3000,
"step": 2,
"default": 200,
"tooltip": "Number of characters the AI should generate."
},
{
"uitype": "slider",
"unit": "int",
"label": "W Info Depth",
"id": "setwidepth",
"min": 1,
"max": 5,
"step": 1,
"default": 1,
"tooltip": "Number of historic actions to scan for W Info keys."
},
{
"uitype": "toggle",
"unit": "bool",
"label": "Always Add Prompt",
"id": "setuseprompt",
"min": 0,
"max": 1,
"step": 1,
"default": 1,
"tooltip": "Whether the prompt should be sent in the context of every action."
}]
formatcontrols = [{
"label": "Trim incomplete sentences",
"id": "frmttriminc",
"tooltip": "Remove text after last sentence closure. If no closure is found, all tokens will be returned."
},
{
"label": "Remove blank lines",
"id": "frmtrmblln",
"tooltip": "Replace double newlines (\\n\\n) with single newlines to avoid blank lines."
},
{
"label": "Remove special characters",
"id": "frmtrmspch",
"tooltip": "Remove special characters (@,#,%,^, etc)"
},
{
"label": "Add sentence spacing",
"id": "frmtadsnsp",
"tooltip": "If the last action ended with punctuation, add a space to the beginning of the next action."
}]