Skip to content

Commit

Permalink
fix top picks bug, lower input anti abuse thresholds (+1 squashed com…
Browse files Browse the repository at this point in the history
…mits)

Squashed commits:

[a81d9b2] fix top picks bug, lower input anti abuse thresholds
  • Loading branch information
LostRuins committed Nov 1, 2024
1 parent 6a27003 commit bbebc76
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions gpttype_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,15 @@ void ContextRewind(std::vector<int> &embd, std::vector<int> &current_context_tok
last_n_tokens.resize(last_n_tokens.size() - amount_rewind);
}

if(amount_rewind >= top_picks_history.size())
{
top_picks_history.clear();
}
else
{
top_picks_history.resize(top_picks_history.size() - amount_rewind);
}

if (amount_rewind >= current_context_tokens.size())
{
current_context_tokens.clear();
Expand Down
8 changes: 4 additions & 4 deletions koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
logprobs_max = 5

# abuse prevention
stop_token_max = 512
ban_token_max = 1024
logit_bias_max = 1024
dry_seq_break_max = 256
stop_token_max = 256
ban_token_max = 512
logit_bias_max = 512
dry_seq_break_max = 128

# global vars
handle = None
Expand Down

0 comments on commit bbebc76

Please sign in to comment.