Add DRY Samplers to ST Staging (#2211)

* Add files via upload

* Add files via upload

* Delete public/index.html

* Add files via upload

* Delete public/scripts/textgen-settings.js

* Add files via upload

* Delete public/scripts/power-user.js

* Add files via upload

* Delete public/scripts/power-user.js

* Add files via upload

* Update power-user.js

* Update index.html

* Fix control attribution

* Fix app loading

* Put sequence breakers under DRY block

* DRY for DRY

* Update public/index.html

Co-authored-by: Philipp Emanuel Weidmann <pew@worldwidemann.com>

* Merge fix

* Add llamacpp control. Add default value for sequence breakers

* Forgot reset

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Philipp Emanuel Weidmann <pew@worldwidemann.com>
This commit is contained in:
kokansei
2024-05-22 13:46:52 -04:00
committed by GitHub
parent d33ca68620
commit 75a1ef4304
3 changed files with 77 additions and 2 deletions

View File

@@ -116,6 +116,11 @@ const settings = {
dynatemp_exponent: 1.0,
smoothing_factor: 0.0,
smoothing_curve: 1.0,
dry_allowed_length: 2,
dry_multiplier: 0.0,
dry_base: 1.75,
dry_sequence_breakers: '["\\n", ":", "\\"", "*"]',
dry_penalty_last_n: 0,
max_tokens_second: 0,
seed: -1,
preset: 'Default',
@@ -190,6 +195,11 @@ export const setting_names = [
'dynatemp_exponent',
'smoothing_factor',
'smoothing_curve',
'dry_allowed_length',
'dry_multiplier',
'dry_base',
'dry_sequence_breakers',
'dry_penalty_last_n',
'max_tokens_second',
'encoder_rep_pen',
'freq_pen',
@@ -665,6 +675,10 @@ jQuery(function () {
'guidance_scale_textgenerationwebui': 1,
'smoothing_factor_textgenerationwebui': 0,
'smoothing_curve_textgenerationwebui': 1,
'dry_allowed_length_textgenerationwebui': 2,
'dry_multiplier_textgenerationwebui': 0,
'dry_base_textgenerationwebui': 1.75,
'dry_penalty_last_n_textgenerationwebui': 0,
};
for (const [id, value] of Object.entries(inputs)) {
@@ -1028,6 +1042,11 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
'dynatemp_exponent': settings.dynatemp ? settings.dynatemp_exponent : undefined,
'smoothing_factor': settings.smoothing_factor,
'smoothing_curve': settings.smoothing_curve,
'dry_allowed_length': settings.dry_allowed_length,
'dry_multiplier': settings.dry_multiplier,
'dry_base': settings.dry_base,
'dry_sequence_breakers': settings.dry_sequence_breakers,
'dry_penalty_last_n': settings.dry_penalty_last_n,
'max_tokens_second': settings.max_tokens_second,
'sampler_priority': settings.type === OOBA ? settings.sampler_priority : undefined,
'samplers': settings.type === LLAMACPP ? settings.samplers : undefined,