diff --git a/Makefile b/Makefile index 1e16e5b40..6d810a6fd 100644 --- a/Makefile +++ b/Makefile @@ -341,15 +341,15 @@ $(info ) ggml.o: ggml.c ggml.h ggml-cuda.h k_quants.h $(CC) $(CFLAGS) $(FULLCFLAGS) -c $< -o $@ -ggml_openblas.o: ggml.c ggml.h +ggml_openblas.o: ggml.c ggml.h ggml-cuda.h k_quants.h $(CC) $(CFLAGS) $(FULLCFLAGS) $(OPENBLAS_FLAGS) -c $< -o $@ -ggml_failsafe.o: ggml.c ggml.h +ggml_failsafe.o: ggml.c ggml.h ggml-cuda.h k_quants.h $(CC) $(CFLAGS) $(NONECFLAGS) -c $< -o $@ -ggml_noavx2.o: ggml.c ggml.h +ggml_noavx2.o: ggml.c ggml.h ggml-cuda.h k_quants.h $(CC) $(CFLAGS) $(SIMPLECFLAGS) -c $< -o $@ -ggml_clblast.o: ggml.c ggml.h +ggml_clblast.o: ggml.c ggml.h ggml-cuda.h k_quants.h $(CC) $(CFLAGS) $(FULLCFLAGS) $(CLBLAST_FLAGS) -c $< -o $@ -ggml_cublas.o: ggml.c ggml.h +ggml_cublas.o: ggml.c ggml.h ggml-cuda.h k_quants.h $(CC) $(CFLAGS) $(FULLCFLAGS) $(CUBLAS_FLAGS) $(HIPFLAGS) -c $< -o $@ #quants K diff --git a/klite.embd b/klite.embd index 0ce4bfed0..054058791 100644 --- a/klite.embd +++ b/klite.embd @@ -7847,12 +7847,25 @@ Kobold Lite is under the AGPL v3.0 License for the purposes of koboldcpp. Please if(foundself!=null && foundself.length>0) { - myturnchat = true; - chatunits.push({ - name:foundself[0].substring(0,foundself[0].length-2), - msg:tempfullsearchable.split(foundself[0])[1], - myturn:myturnchat}); - }else if(foundopponent != null && foundopponent.length > 0) + //exception: check to see if it's actually opponent naming us and not our turn + if(localsettings.chatopponent!="" && tempfullsearchable.startsWith(localsettings.chatopponent+": ")) + { + myturnchat = false; + chatunits.push({ + name:localsettings.chatopponent, + msg:tempfullsearchable.split(localsettings.chatopponent+": ")[1], + myturn:myturnchat}); + } + else + { + myturnchat = true; + chatunits.push({ + name:foundself[0].substring(0,foundself[0].length-2), + msg:tempfullsearchable.split(foundself[0])[1], + myturn:myturnchat}); + } + } + else if(foundopponent != null && foundopponent.length > 0) { myturnchat = false; chatunits.push({ diff --git a/llama.cpp b/llama.cpp index e54055eb2..f038e699c 100644 --- a/llama.cpp +++ b/llama.cpp @@ -612,6 +612,7 @@ struct llama_mmap { throw std::runtime_error(format("MapViewOfFile failed: %s", llama_format_win_err(error).c_str())); } + #ifndef USE_FAILSAFE #if _WIN32_WINNT >= _WIN32_WINNT_WIN8 if (prefetch) { // Advise the kernel to preload the mapped memory @@ -626,6 +627,9 @@ struct llama_mmap { #else #pragma message("warning: You are building for pre-Windows 8; prefetch not supported") #endif // _WIN32_WINNT >= _WIN32_WINNT_WIN8 + #else + printf("\nPrefetchVirtualMemory skipped in compatibility mode.\n"); + #endif } ~llama_mmap() { diff --git a/otherarch/llama-util.h b/otherarch/llama-util.h index 0eb55e79a..e1986eb26 100644 --- a/otherarch/llama-util.h +++ b/otherarch/llama-util.h @@ -271,6 +271,7 @@ struct llama_v3_mmap { throw std::runtime_error(format_old("MapViewOfFile failed: %s", llama_v3_format_win_err(error).c_str())); } + #ifndef USE_FAILSAFE if (prefetch) { // The PrefetchVirtualMemory API is only present on Windows 8 and above, so we // will dynamically load it using GetProcAddress. @@ -294,6 +295,9 @@ struct llama_v3_mmap { } } } + #else + printf("\nPrefetchVirtualMemory skipped in compatibility mode.\n"); + #endif } ~llama_v3_mmap() {