mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 01:05:09 +02:00
restructure some compilation units
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
//
|
||||
|
||||
//kcpp: use a global flag to toggle pipeline parallelism to avoid messing with ctx params
|
||||
static bool kcpp_pipeline_parallelism = false;
|
||||
bool kcpp_pipeline_parallelism = false;
|
||||
|
||||
static llm_graph_type ctx_type_to_graph_type(llama_context_type ctx_type) {
|
||||
switch (ctx_type) {
|
||||
|
||||
@@ -36,7 +36,7 @@ using candidates_memos = std::unordered_map<size_t, llama_grammar_candidates>;
|
||||
using stack_memos = std::unordered_map<size_t, candidates_memos>;
|
||||
static stack_memos memo_cache;
|
||||
|
||||
static void llama_grammar_reset_memos() {
|
||||
void llama_grammar_reset_memos() {
|
||||
memo_cache.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,8 @@ const llama_grammar_rules & llama_grammar_get_rules (const struct llama_grammar
|
||||
// positions
|
||||
void llama_grammar_accept(struct llama_grammar * grammar, uint32_t chr);
|
||||
|
||||
void llama_grammar_reset_memos();
|
||||
|
||||
std::vector<llama_grammar_candidate> llama_grammar_reject_candidates_for_stack(
|
||||
const llama_grammar_rules & rules,
|
||||
const llama_grammar_stack & stack,
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
// llama_kv_cache_iswa
|
||||
//
|
||||
//kcpp: use a global flag to adjust swa padding
|
||||
static int kcpp_extra_swa_padding = 0;
|
||||
static int kcpp_active_swa_size = 0;
|
||||
int kcpp_extra_swa_padding = 0;
|
||||
int kcpp_active_swa_size = 0;
|
||||
|
||||
llama_kv_cache_iswa::llama_kv_cache_iswa(
|
||||
const llama_model & model,
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
// helpers
|
||||
//
|
||||
|
||||
static bool OldBPETokenizerMode = false;
|
||||
bool OldBPETokenizerMode = false;
|
||||
|
||||
struct naive_trie {
|
||||
naive_trie() : has_value(false), value(0) {
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "llama-memory-recurrent.cpp"
|
||||
#include "llama-model-loader.cpp"
|
||||
#include "llama-model-saver.cpp"
|
||||
#include "llama-model.cpp"
|
||||
#include "llama-quant.cpp"
|
||||
#include "llama-hparams.cpp"
|
||||
#include "llama-graph.cpp"
|
||||
@@ -47,10 +46,6 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#ifdef GGML_USE_CUDA
|
||||
# include "ggml-cuda.h"
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4244 4267) // possible loss of data
|
||||
#endif
|
||||
|
||||
@@ -210,9 +210,8 @@ static ggml_tensor * dsv4_build_kq_zero_bias(
|
||||
return ggml_fill(ctx, res, 0.0f);
|
||||
}
|
||||
|
||||
//kcpp: avoid redefine conflict
|
||||
// static constexpr int64_t DSV4_CSA_RATIO = 4;
|
||||
// static constexpr int64_t DSV4_HCA_RATIO = 128;
|
||||
static constexpr int64_t DSV4_CSA_RATIO = 4;
|
||||
static constexpr int64_t DSV4_HCA_RATIO = 128;
|
||||
|
||||
static ggml_tensor * dsv4_hc_affine(
|
||||
ggml_context * ctx,
|
||||
|
||||
Reference in New Issue
Block a user