mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 09:34:37 +00:00
alias banned_tokens with banned_strings from ST
increase max bans to 32 for now
This commit is contained in:
parent
5c9650d68e
commit
d75cbd671d
2 changed files with 4 additions and 3 deletions
2
expose.h
2
expose.h
|
@ -2,7 +2,7 @@
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
const int stop_token_max = 24;
|
const int stop_token_max = 24;
|
||||||
const int ban_token_max = 24;
|
const int ban_token_max = 32;
|
||||||
const int tensor_split_max = 16;
|
const int tensor_split_max = 16;
|
||||||
const int logit_bias_max = 24;
|
const int logit_bias_max = 24;
|
||||||
const int dry_seq_break_max = 24;
|
const int dry_seq_break_max = 24;
|
||||||
|
|
|
@ -20,7 +20,7 @@ from datetime import datetime, timezone
|
||||||
# constants
|
# constants
|
||||||
sampler_order_max = 7
|
sampler_order_max = 7
|
||||||
stop_token_max = 24
|
stop_token_max = 24
|
||||||
ban_token_max = 24
|
ban_token_max = 32
|
||||||
tensor_split_max = 16
|
tensor_split_max = 16
|
||||||
logit_bias_max = 24
|
logit_bias_max = 24
|
||||||
dry_seq_break_max = 24
|
dry_seq_break_max = 24
|
||||||
|
@ -909,7 +909,8 @@ def generate(genparams, is_quiet=False, stream_flag=False):
|
||||||
smoothing_factor = genparams.get('smoothing_factor', 0.0)
|
smoothing_factor = genparams.get('smoothing_factor', 0.0)
|
||||||
logit_biases = genparams.get('logit_bias', {})
|
logit_biases = genparams.get('logit_bias', {})
|
||||||
render_special = genparams.get('render_special', False)
|
render_special = genparams.get('render_special', False)
|
||||||
banned_tokens = genparams.get('banned_tokens', [])
|
banned_strings = genparams.get('banned_strings', []) # SillyTavern uses that name
|
||||||
|
banned_tokens = genparams.get('banned_tokens', banned_strings)
|
||||||
bypass_eos_token = genparams.get('bypass_eos', False)
|
bypass_eos_token = genparams.get('bypass_eos', False)
|
||||||
|
|
||||||
inputs = generation_inputs()
|
inputs = generation_inputs()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue