From 8947142c468efe9f05d336beed7c8bf6c3eab24a Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Fri, 20 Oct 2023 11:35:44 +0800 Subject: [PATCH] updated lite and colab --- colab.ipynb | 2 +- klite.embd | 51 +++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/colab.ipynb b/colab.ipynb index e1e4b224c..263038e03 100644 --- a/colab.ipynb +++ b/colab.ipynb @@ -19,7 +19,7 @@ "source": [ "#@title v-- Enter your model below and then click this to start Koboldcpp\r\n", "\r\n", - "Model = \"https://huggingface.co/TheBloke/Airoboros-L2-13B-2.2-GGUF/resolve/main/airoboros-l2-13b-2.2.Q4_K_M.gguf\" #@param [\"\"]{allow-input: true}\r\n", + "Model = \"https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter-GGUF/resolve/main/LLaMA2-13B-Tiefighter.Q4_K_S.gguf\" #@param [\"\"]{allow-input: true}\r\n", "Layers = 43 #@param [43]{allow-input: true}\r\n", "\r\n", "%cd /content\r\n", diff --git a/klite.embd b/klite.embd index 2cda6c0cc..90e34d276 100644 --- a/klite.embd +++ b/klite.embd @@ -816,6 +816,7 @@ Current version: 83 line-height: 1.8ex; border-radius: 1.2ex; margin-right: 4px; + margin-left: 1px; padding: 1px; color: #295071; background: #ffffff; @@ -3173,6 +3174,7 @@ Current version: 83 var anote_strength = 320; //distance from end var newlineaftermemory = true; var current_wi = []; //each item stores a wi object. + var wi_searchdepth = 0; //search everything var generateimagesinterval = 600; //if generated images is enabled, it will trigger after every 600 new characters in context. var nextgeneratedimagemilestone = generateimagesinterval; //used to keep track of when to generate the next image var image_db = {}; //stores a dictionary of pending images @@ -7817,6 +7819,12 @@ Current version: 83 //if world info exists, we inject it right after the memory //for each matching key let wimatch_context = truncated_context; + if(wi_searchdepth>0) + { + let cutoff = wimatch_context.length - wi_searchdepth; + cutoff = cutoff<0?0:cutoff; + wimatch_context = wimatch_context.substring(cutoff); + } if (!localsettings.case_sensitive_wi) { wimatch_context = wimatch_context.toLowerCase(); @@ -9972,6 +9980,7 @@ Current version: 83 current_wi[i].content = document.getElementById("wival" + i).value; } localsettings.case_sensitive_wi = (document.getElementById("case_sensitive_wi").checked?true:false); + wi_searchdepth = document.getElementById("wi_searchdepth").value; } let backup_wi_obj = []; @@ -10031,6 +10040,8 @@ Current version: 83 selectionhtml += "" wilist.innerHTML = selectionhtml; + document.getElementById("wi_searchdepth").value = wi_searchdepth; + } var backLongPressTimer = null; @@ -11494,23 +11505,28 @@ Current version: 83