mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
re-added smart context due to people complaining
This commit is contained in:
parent
702be65ed1
commit
eff01660e4
3 changed files with 20 additions and 8 deletions
|
@ -92,6 +92,7 @@ static int current_llava_identifier = LLAVA_TOKEN_IDENTIFIER_A;
|
|||
static gpt_params * kcpp_params = nullptr;
|
||||
static int max_context_limit_at_load = 0;
|
||||
static int n_past = 0;
|
||||
static bool useSmartContext = false;
|
||||
static bool useContextShift = false;
|
||||
static int debugmode = 0; //-1 = hide all, 0 = normal, 1 = showall
|
||||
static std::string modelname;
|
||||
|
@ -786,6 +787,7 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in
|
|||
}
|
||||
kcpp_params->flash_attn = inputs.flash_attention;
|
||||
modelname = kcpp_params->model = inputs.model_filename;
|
||||
useSmartContext = inputs.use_smartcontext;
|
||||
useContextShift = inputs.use_contextshift;
|
||||
debugmode = inputs.debugmode;
|
||||
|
||||
|
@ -1939,7 +1941,7 @@ generation_outputs gpttype_generate(const generation_inputs inputs)
|
|||
}
|
||||
else
|
||||
{
|
||||
bool triggersc = useContextShift;
|
||||
bool triggersc = useSmartContext;
|
||||
if(useContextShift && (file_format == FileFormat::GGUF_GENERIC))
|
||||
{
|
||||
PurgeMissingTokens(llama_ctx_v4, current_context_tokens, embd_inp, inputs.max_length, nctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue