mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix textgen generation
This commit is contained in:
@ -1584,32 +1584,27 @@ async function Generate(type, automatic_trigger, force_name2) {//encode("dsfs").
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (main_api == 'textgenerationwebui') {
|
if (main_api == 'textgenerationwebui') {
|
||||||
var generate_data = {
|
let data = [
|
||||||
data: [
|
|
||||||
finalPromt,
|
finalPromt,
|
||||||
this_amount_gen, // max new tokens
|
{
|
||||||
textgenerationwebui_settings.do_sample, // do_sample
|
'max_new_tokens': this_amount_gen,
|
||||||
textgenerationwebui_settings.temp, // temperature
|
'do_sample': textgenerationwebui_settings.do_sample,
|
||||||
textgenerationwebui_settings.top_p, // top_p
|
'temperature': textgenerationwebui_settings.temp,
|
||||||
textgenerationwebui_settings.typical_p, // typical_p
|
'top_p': textgenerationwebui_settings.top_p,
|
||||||
textgenerationwebui_settings.rep_pen, // repetition_penalty
|
'typical_p': textgenerationwebui_settings.typical_p,
|
||||||
textgenerationwebui_settings.encoder_rep_pen, // encoder rep pen
|
'repetition_penalty': textgenerationwebui_settings.rep_pen,
|
||||||
textgenerationwebui_settings.top_k, // top_k
|
'encoder_repetition_penalty': textgenerationwebui_settings.encoder_rep_pen,
|
||||||
textgenerationwebui_settings.min_length, // min_length
|
'top_k': textgenerationwebui_settings.top_k,
|
||||||
textgenerationwebui_settings.no_repeat_ngram_size, // no_repeat_ngram_size
|
'min_length': textgenerationwebui_settings.min_length,
|
||||||
textgenerationwebui_settings.num_beams, // num_beams
|
'no_repeat_ngram_size': textgenerationwebui_settings.no_repeat_ngram_size,
|
||||||
textgenerationwebui_settings.penalty_alpha, // penalty_alpha
|
'num_beams': textgenerationwebui_settings.num_beams,
|
||||||
textgenerationwebui_settings.length_penalty, // length_penalty
|
'penalty_alpha': textgenerationwebui_settings.penalty_alpha,
|
||||||
textgenerationwebui_settings.early_stopping, // early_stopping
|
'length_penalty': textgenerationwebui_settings.length_penalty,
|
||||||
textgenerationwebui_settings.seed, // seed
|
'early_stopping': textgenerationwebui_settings.early_stopping,
|
||||||
name1, // name1
|
'seed': textgenerationwebui_settings.seed,
|
||||||
name2, // name2
|
}
|
||||||
"", // Context
|
];
|
||||||
true, // stop at newline
|
generate_data = { "data": [ JSON.stringify(data) ]};
|
||||||
this_max_context, // Maximum prompt size in tokens
|
|
||||||
1, // num attempts
|
|
||||||
]
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (main_api == 'novel') {
|
if (main_api == 'novel') {
|
||||||
|
Reference in New Issue
Block a user