mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-18 23:49:46 +00:00
ace qwen rep pen for codes
This commit is contained in:
parent
de9840afac
commit
ae67caa2f7
2 changed files with 8 additions and 3 deletions
|
|
@ -551,7 +551,7 @@ void ContextRewind(std::vector<int> &embd, std::vector<int> ¤t_context_tok
|
|||
}
|
||||
if(file_format == FileFormat::RWKV_1 || file_format==FileFormat::RWKV_2 || is_recurrent)
|
||||
{
|
||||
if(!showed_rnn_warning)
|
||||
if(!showed_rnn_warning && debugmode==1 && !is_quiet)
|
||||
{
|
||||
showed_rnn_warning = true;
|
||||
printf("\nWARNING: RNN models do not support context rewind!\n");
|
||||
|
|
|
|||
|
|
@ -1086,7 +1086,7 @@ static std::vector<std::string> run_phase2_batch(
|
|||
for (int v = 0; v < AUDIO_CODE_BASE; v++)
|
||||
if (v != TOKEN_IM_END) lg[v] = -1e9f;
|
||||
|
||||
int tok = kcpp_quick_sample(lg.data(),V,std::vector<int32_t>(),1.02f,top_p,30,temperature,acestep_lm_rng);
|
||||
int tok = kcpp_quick_sample(lg.data(),V,std::vector<int32_t>(),1.03f,top_p,30,temperature,acestep_lm_rng);
|
||||
seqs[i].last_token = tok;
|
||||
|
||||
if (tok == TOKEN_IM_END) {
|
||||
|
|
@ -1124,6 +1124,7 @@ static std::vector<std::string> run_phase2_batch(
|
|||
for (int i = 0; i < N; i++)
|
||||
if (seqs[i].done) n_active--;
|
||||
|
||||
std::vector<int32_t> quicklastntoks;
|
||||
for (int step = 0; step < max_tokens && n_active > 0; step++) {
|
||||
// Collect tokens (done sequences feed their last token, result ignored)
|
||||
for (int i = 0; i < N; i++)
|
||||
|
|
@ -1157,7 +1158,11 @@ static std::vector<std::string> run_phase2_batch(
|
|||
for (int v = 0; v < AUDIO_CODE_BASE; v++)
|
||||
if (v != TOKEN_IM_END) lc[v] = -1e9f;
|
||||
|
||||
int tok = kcpp_quick_sample(lc,V,std::vector<int32_t>(),1.02f,top_p,30,temperature,acestep_lm_rng);
|
||||
int tok = kcpp_quick_sample(lc,V,quicklastntoks,1.03f,top_p,30,temperature,acestep_lm_rng);
|
||||
quicklastntoks.push_back(tok);
|
||||
if (quicklastntoks.size()>32) {
|
||||
quicklastntoks.erase(quicklastntoks.begin());
|
||||
}
|
||||
seqs[i].last_token = tok;
|
||||
|
||||
if (tok == TOKEN_IM_END) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue