Skip to content

Commit

Permalink
tidy up and refactor code to support old flags
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed May 10, 2024
1 parent eccc2dd commit dbe72b9
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 175 deletions.
1 change: 0 additions & 1 deletion expose.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ struct load_model_inputs
const char * mmproj_filename;
const bool use_mmap;
const bool use_mlock;
const bool use_smartcontext;
const bool use_contextshift;
const int clblast_info = 0;
const int cublas_info = 0;
Expand Down
4 changes: 1 addition & 3 deletions gpttype_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ 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;
Expand Down Expand Up @@ -787,7 +786,6 @@ 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;

Expand Down Expand Up @@ -1941,7 +1939,7 @@ generation_outputs gpttype_generate(const generation_inputs inputs)
}
else
{
bool triggersc = useSmartContext;
bool triggersc = useContextShift;
if(useContextShift && (file_format == FileFormat::GGUF_GENERIC))
{
PurgeMissingTokens(llama_ctx_v4, current_context_tokens, embd_inp, inputs.max_length, nctx);
Expand Down
3 changes: 2 additions & 1 deletion klite.embd

Large diffs are not rendered by default.

Loading

0 comments on commit dbe72b9

Please sign in to comment.