mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
try ci for avx1, up ver (+2 squashed commit)
Squashed commit: [74150175] up version [97b6163c] try ci for avx1 linux
This commit is contained in:
parent
066e7ac540
commit
21179d675b
6 changed files with 60 additions and 103 deletions
|
@ -3,6 +3,7 @@ name: Koboldcpp Linux
|
||||||
on: workflow_dispatch
|
on: workflow_dispatch
|
||||||
env:
|
env:
|
||||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||||
|
NOAVX2: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
linux:
|
||||||
|
|
38
.github/workflows/python-type-check.yml
vendored
38
.github/workflows/python-type-check.yml
vendored
|
@ -1,38 +0,0 @@
|
||||||
name: Python Type-Check
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/python-type-check.yml'
|
|
||||||
- '**.py'
|
|
||||||
- '**/requirements*.txt'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/python-type-check.yml'
|
|
||||||
- '**.py'
|
|
||||||
- '**/requirements*.txt'
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
python-type-check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: pyright type-check
|
|
||||||
steps:
|
|
||||||
- name: Check out source repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Set up Python environment
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.11"
|
|
||||||
- name: Install Python dependencies
|
|
||||||
# TODO: use a venv
|
|
||||||
run: pip install -r requirements/requirements-all.txt
|
|
||||||
- name: Type-check with Pyright
|
|
||||||
uses: jakebailey/pyright-action@v2
|
|
||||||
with:
|
|
||||||
version: 1.1.370
|
|
||||||
level: warning
|
|
||||||
warnings: true
|
|
8
Makefile
8
Makefile
|
@ -131,7 +131,11 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
|
||||||
CFLAGS +=
|
CFLAGS +=
|
||||||
NONECFLAGS +=
|
NONECFLAGS +=
|
||||||
SIMPLECFLAGS += -mavx -msse3
|
SIMPLECFLAGS += -mavx -msse3
|
||||||
FULLCFLAGS += -mavx2 -msse3 -mfma -mf16c -mavx
|
ifdef LLAMA_NOAVX2
|
||||||
|
FULLCFLAGS += -msse3 -mavx
|
||||||
|
else
|
||||||
|
FULLCFLAGS += -mavx2 -msse3 -mfma -mf16c -mavx
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
CFLAGS += -march=native -mtune=native
|
CFLAGS += -march=native -mtune=native
|
||||||
endif
|
endif
|
||||||
|
@ -554,7 +558,7 @@ gpttype_adapter_vulkan_noavx2.o: $(GPTTYPE_ADAPTER)
|
||||||
$(CXX) $(CXXFLAGS) $(FAILSAFE_FLAGS) $(VULKAN_FLAGS) -c $< -o $@
|
$(CXX) $(CXXFLAGS) $(FAILSAFE_FLAGS) $(VULKAN_FLAGS) -c $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -vf *.o main sdmain whispermain quantize_gguf quantize_clip quantize_gpt2 quantize_gptj quantize_neox quantize_mpt quantize-stats perplexity embedding benchmark-matmult save-load-state gguf imatrix vulkan-shaders-gen vulkan-shaders-gen.exe imatrix.exe gguf.exe main.exe quantize_clip.exe quantize_gguf.exe quantize_gptj.exe quantize_gpt2.exe quantize_neox.exe quantize_mpt.exe koboldcpp_default.dll koboldcpp_openblas.dll koboldcpp_failsafe.dll koboldcpp_noavx2.dll koboldcpp_clblast.dll koboldcpp_clblast_noavx2.dll koboldcpp_cublas.dll koboldcpp_hipblas.dll koboldcpp_vulkan.dll koboldcpp_vulkan_noavx2.dll koboldcpp_default.so koboldcpp_openblas.so koboldcpp_failsafe.so koboldcpp_noavx2.so koboldcpp_clblast.so koboldcpp_clblast_noavx2.so koboldcpp_cublas.so koboldcpp_hipblas.so koboldcpp_vulkan.so koboldcpp_vulkan_noavx2.so
|
rm -vf *.o main sdmain whispermain quantize_gguf quantize_clip quantize_gpt2 quantize_gptj quantize_neox quantize_mpt quantize-stats perplexity embedding benchmark-matmult save-load-state gguf imatrix vulkan-shaders-gen gguf-split gguf-split.exe vulkan-shaders-gen.exe imatrix.exe gguf.exe main.exe sdmain.exe whispermain.exe quantize_clip.exe quantize_gguf.exe quantize_gptj.exe quantize_gpt2.exe quantize_neox.exe quantize_mpt.exe koboldcpp_default.dll koboldcpp_openblas.dll koboldcpp_failsafe.dll koboldcpp_noavx2.dll koboldcpp_clblast.dll koboldcpp_clblast_noavx2.dll koboldcpp_cublas.dll koboldcpp_hipblas.dll koboldcpp_vulkan.dll koboldcpp_vulkan_noavx2.dll koboldcpp_default.so koboldcpp_openblas.so koboldcpp_failsafe.so koboldcpp_noavx2.so koboldcpp_clblast.so koboldcpp_clblast_noavx2.so koboldcpp_cublas.so koboldcpp_hipblas.so koboldcpp_vulkan.so koboldcpp_vulkan_noavx2.so
|
||||||
rm -vrf ggml/src/ggml-cuda/*.o
|
rm -vrf ggml/src/ggml-cuda/*.o
|
||||||
rm -vrf ggml/src/ggml-cuda/template-instances/*.o
|
rm -vrf ggml/src/ggml-cuda/template-instances/*.o
|
||||||
|
|
||||||
|
|
99
klite.embd
99
klite.embd
|
@ -12,7 +12,7 @@ Current version indicated by LITEVER below.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const LITEVER = 154;
|
const LITEVER = 156;
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const localflag = true;
|
const localflag = true;
|
||||||
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
|
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
|
||||||
|
@ -3764,9 +3764,9 @@ Current version indicated by LITEVER below.
|
||||||
.replace(/<\/[ou]l\>\n\n<[ou]l\>/gm, "\n")
|
.replace(/<\/[ou]l\>\n\n<[ou]l\>/gm, "\n")
|
||||||
.replace(/<\/[ou]l\>\n<[ou]l\>/g, "")
|
.replace(/<\/[ou]l\>\n<[ou]l\>/g, "")
|
||||||
.replace(/<\/li><\/ul><ul><li>/gm, "</li><li>")
|
.replace(/<\/li><\/ul><ul><li>/gm, "</li><li>")
|
||||||
.replace(/\*\*\*(\w.*?[^\\])\*\*\*/gm, "<b><em>$1</em></b>")
|
.replace(/\*\*\*([^\s*].*?[^\\])\*\*\*/gm, "<b><em>$1</em></b>")
|
||||||
.replace(/\*\*(\w.*?[^\\])\*\*/gm, "<b>$1</b>")
|
.replace(/\*\*([^\s*].*?[^\\])\*\*/gm, "<b>$1</b>")
|
||||||
.replace(/\*(\w.*?[^\\])\*/gm, "<em>$1</em>")
|
.replace(/\*([^\s*].*?[^\\])\*/gm, "<em>$1</em>")
|
||||||
.replace(/___(\w.*?[^\\])___/gm, "<b><em>$1</em></b>")
|
.replace(/___(\w.*?[^\\])___/gm, "<b><em>$1</em></b>")
|
||||||
.replace(/__(\w.*?[^\\])__/gm, "<u>$1</u>")
|
.replace(/__(\w.*?[^\\])__/gm, "<u>$1</u>")
|
||||||
.replace(/~~(\w.*?)~~/gm, "<del>$1</del>")
|
.replace(/~~(\w.*?)~~/gm, "<del>$1</del>")
|
||||||
|
@ -3999,6 +3999,7 @@ Current version indicated by LITEVER below.
|
||||||
var synchro_pending_stream = ""; //used for token pseduo streaming for kobold api only
|
var synchro_pending_stream = ""; //used for token pseduo streaming for kobold api only
|
||||||
var waiting_for_autosummary = false;
|
var waiting_for_autosummary = false;
|
||||||
var italics_regex = new RegExp(/\*(\S[^*]+\S)\*/g); //the fallback regex
|
var italics_regex = new RegExp(/\*(\S[^*]+\S)\*/g); //the fallback regex
|
||||||
|
var bold_regex = new RegExp(/\*\*(\S[^*]+\S)\*\*/g); //the fallback regex
|
||||||
var temp_scenario = null;
|
var temp_scenario = null;
|
||||||
var last_token_budget = ""; //to display token limits
|
var last_token_budget = ""; //to display token limits
|
||||||
var last_known_filename = "saved_story.json";
|
var last_known_filename = "saved_story.json";
|
||||||
|
@ -4319,6 +4320,8 @@ Current version indicated by LITEVER below.
|
||||||
// Test if lookahead is supported, enhance italics regex if so
|
// Test if lookahead is supported, enhance italics regex if so
|
||||||
let improved_italics = new RegExp("\\*(?!\\s)(.+?)(?<!\\s)\\*","g");
|
let improved_italics = new RegExp("\\*(?!\\s)(.+?)(?<!\\s)\\*","g");
|
||||||
italics_regex = improved_italics;
|
italics_regex = improved_italics;
|
||||||
|
let improved_bold = new RegExp("\\*\\*(?!\\s)(.+?)(?<!\\s)\\*\\*","g");
|
||||||
|
bold_regex = improved_bold;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('Lookaheads are not supported in this environment.');
|
console.log('Lookaheads are not supported in this environment.');
|
||||||
}
|
}
|
||||||
|
@ -4778,8 +4781,7 @@ Current version indicated by LITEVER below.
|
||||||
const foundAicc = urlParams.get('aicc');
|
const foundAicc = urlParams.get('aicc');
|
||||||
|
|
||||||
if (foundStory && foundStory != "") {
|
if (foundStory && foundStory != "") {
|
||||||
let safe_to_overwrite = (gametext_arr.length == 0 && current_memory == "" && current_anote == "" && current_wi.length == 0 && redo_arr.length == 0);
|
if (localsettings.persist_session && !safe_to_overwrite()) {
|
||||||
if (localsettings.persist_session && !safe_to_overwrite) {
|
|
||||||
import_compressed_story_prompt_overwrite(foundStory);
|
import_compressed_story_prompt_overwrite(foundStory);
|
||||||
} else {
|
} else {
|
||||||
import_compressed_story(foundStory, false);
|
import_compressed_story(foundStory, false);
|
||||||
|
@ -5840,6 +5842,11 @@ Current version indicated by LITEVER below.
|
||||||
reader.readAsText(selectedFile);
|
reader.readAsText(selectedFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function safe_to_overwrite()
|
||||||
|
{
|
||||||
|
return (gametext_arr.length == 0 && current_memory == "" && current_anote == "" && current_wi.length == 0 && redo_arr.length == 0);
|
||||||
|
}
|
||||||
|
|
||||||
function kai_json_load(storyobj, force_load_settngs)
|
function kai_json_load(storyobj, force_load_settngs)
|
||||||
{
|
{
|
||||||
//either show popup or just proceed to load
|
//either show popup or just proceed to load
|
||||||
|
@ -6926,7 +6933,7 @@ Current version indicated by LITEVER below.
|
||||||
|
|
||||||
render_gametext(true);
|
render_gametext(true);
|
||||||
}
|
}
|
||||||
function togglescenarioallownsfw()
|
function togglescenarioautopick()
|
||||||
{
|
{
|
||||||
if(localflag)
|
if(localflag)
|
||||||
{
|
{
|
||||||
|
@ -6937,12 +6944,6 @@ Current version indicated by LITEVER below.
|
||||||
if (selected_models.length == 0) {
|
if (selected_models.length == 0) {
|
||||||
document.getElementById("scenarioautopickai").checked = true;
|
document.getElementById("scenarioautopickai").checked = true;
|
||||||
}
|
}
|
||||||
let scenarioautopickai = document.getElementById("scenarioautopickai").checked ? true : false;
|
|
||||||
if (scenarioautopickai) {
|
|
||||||
document.getElementById("scenarioallownsfwbox").classList.remove("hidden");
|
|
||||||
} else {
|
|
||||||
document.getElementById("scenarioallownsfwbox").classList.add("hidden");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function confirm_scenario_verify()
|
function confirm_scenario_verify()
|
||||||
|
@ -6982,7 +6983,6 @@ Current version indicated by LITEVER below.
|
||||||
hide_popups();
|
hide_popups();
|
||||||
//assign model if necessary
|
//assign model if necessary
|
||||||
let scenarioautopickai = document.getElementById("scenarioautopickai").checked?true:false;
|
let scenarioautopickai = document.getElementById("scenarioautopickai").checked?true:false;
|
||||||
let scenarioallownsfw = document.getElementById("scenarioallownsfw").checked?true:false;
|
|
||||||
|
|
||||||
if(selected_models.length == 0 && !is_using_custom_ep())
|
if(selected_models.length == 0 && !is_using_custom_ep())
|
||||||
{
|
{
|
||||||
|
@ -6998,7 +6998,6 @@ Current version indicated by LITEVER below.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
let nsfwmodels = ["erebus","shinen","horni","litv2","lit-6b","spicyboros","mlewd","mxlewd"];
|
|
||||||
selected_models = [];
|
selected_models = [];
|
||||||
for (var i = 0; i < mdls.length; ++i) {
|
for (var i = 0; i < mdls.length; ++i) {
|
||||||
let skipignored = false;
|
let skipignored = false;
|
||||||
|
@ -7014,19 +7013,7 @@ Current version indicated by LITEVER below.
|
||||||
for (var j = 0; j < temp_scenario.prefmodel1.length; ++j) {
|
for (var j = 0; j < temp_scenario.prefmodel1.length; ++j) {
|
||||||
if (mdls[i].name.trim().toLowerCase().includes(temp_scenario.prefmodel1[j].trim().toLowerCase()) ||
|
if (mdls[i].name.trim().toLowerCase().includes(temp_scenario.prefmodel1[j].trim().toLowerCase()) ||
|
||||||
temp_scenario.prefmodel1[j].trim().toLowerCase().includes(mdls[i].name.trim().toLowerCase())) {
|
temp_scenario.prefmodel1[j].trim().toLowerCase().includes(mdls[i].name.trim().toLowerCase())) {
|
||||||
|
selected_models.push(mdls[i]);
|
||||||
let allow = true;
|
|
||||||
if (!scenarioallownsfw) {
|
|
||||||
for (var k = 0; k < nsfwmodels.length; ++k) {
|
|
||||||
if (mdls[i].name.trim().toLowerCase().includes(nsfwmodels[k])) {
|
|
||||||
allow = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (allow) {
|
|
||||||
selected_models.push(mdls[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7050,18 +7037,7 @@ Current version indicated by LITEVER below.
|
||||||
for (var j = 0; j < temp_scenario.prefmodel2.length; ++j) {
|
for (var j = 0; j < temp_scenario.prefmodel2.length; ++j) {
|
||||||
if (mdls[i].name.trim().toLowerCase().includes(temp_scenario.prefmodel2[j].trim().toLowerCase()) ||
|
if (mdls[i].name.trim().toLowerCase().includes(temp_scenario.prefmodel2[j].trim().toLowerCase()) ||
|
||||||
temp_scenario.prefmodel2[j].trim().toLowerCase().includes(mdls[i].name.trim().toLowerCase())) {
|
temp_scenario.prefmodel2[j].trim().toLowerCase().includes(mdls[i].name.trim().toLowerCase())) {
|
||||||
let allow = true;
|
selected_models.push(mdls[i]);
|
||||||
if (!scenarioallownsfw) {
|
|
||||||
for (var k = 0; k < nsfwmodels.length; ++k) {
|
|
||||||
if (mdls[i].name.trim().toLowerCase().includes(nsfwmodels[k])) {
|
|
||||||
allow = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (allow) {
|
|
||||||
selected_models.push(mdls[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7104,7 +7080,7 @@ Current version indicated by LITEVER below.
|
||||||
|
|
||||||
document.getElementById("scenariogrid").innerHTML = scenarios;
|
document.getElementById("scenariogrid").innerHTML = scenarios;
|
||||||
document.getElementById("scenariodesc").innerText = "No Scenario Selected";
|
document.getElementById("scenariodesc").innerText = "No Scenario Selected";
|
||||||
togglescenarioallownsfw();
|
togglescenarioautopick();
|
||||||
}
|
}
|
||||||
|
|
||||||
function scenario_search()
|
function scenario_search()
|
||||||
|
@ -8220,6 +8196,8 @@ Current version indicated by LITEVER below.
|
||||||
koboldcpp_has_vision = (data.vision?true:false);
|
koboldcpp_has_vision = (data.vision?true:false);
|
||||||
koboldcpp_has_whisper = (data.transcribe?true:false);
|
koboldcpp_has_whisper = (data.transcribe?true:false);
|
||||||
let has_password = (data.protected?true:false);
|
let has_password = (data.protected?true:false);
|
||||||
|
let has_txt2img = (data.txt2img?true:false);
|
||||||
|
let no_model = (mdlname=="inactive");
|
||||||
|
|
||||||
//also check against kcpp's max true context length
|
//also check against kcpp's max true context length
|
||||||
fetch(apply_proxy_url(desiredkoboldendpoint + koboldcpp_truemaxctxlen_endpoint),
|
fetch(apply_proxy_url(desiredkoboldendpoint + koboldcpp_truemaxctxlen_endpoint),
|
||||||
|
@ -8256,8 +8234,7 @@ Current version indicated by LITEVER below.
|
||||||
let is_kai = !(tmpstory.prompt==null);
|
let is_kai = !(tmpstory.prompt==null);
|
||||||
if(is_kai)
|
if(is_kai)
|
||||||
{
|
{
|
||||||
let safe_to_overwrite = (gametext_arr.length == 0 && current_memory == "" && current_anote == "" && current_wi.length == 0 && redo_arr.length == 0);
|
if (localsettings.persist_session && !safe_to_overwrite()) {
|
||||||
if (localsettings.persist_session && !safe_to_overwrite) {
|
|
||||||
console.log("Preload story: Unsafe to overwrite");
|
console.log("Preload story: Unsafe to overwrite");
|
||||||
} else {
|
} else {
|
||||||
kai_json_load(tmpstory, false);
|
kai_json_load(tmpstory, false);
|
||||||
|
@ -8312,6 +8289,13 @@ Current version indicated by LITEVER below.
|
||||||
}
|
}
|
||||||
},false,false,true);
|
},false,false,true);
|
||||||
}
|
}
|
||||||
|
else if(localflag && has_txt2img && no_model && safe_to_overwrite())
|
||||||
|
{
|
||||||
|
msgboxYesNo("This KoboldCpp instance seems to be running an Image Generation model without any Text Generation model loaded.\n\nWould you like to launch StableUI (Dedicated Image Generation WebUI bundled with KoboldCpp)?\n\nIf unsure, select 'No'.","Launch StableUI?", ()=>{
|
||||||
|
go_to_stableui();
|
||||||
|
},()=>{
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
console.log("Unknown KoboldCpp Check Response: " + data);
|
console.log("Unknown KoboldCpp Check Response: " + data);
|
||||||
|
@ -15133,6 +15117,7 @@ Current version indicated by LITEVER below.
|
||||||
let foundimg = "";
|
let foundimg = "";
|
||||||
if(curr.msg && curr.msg!="")
|
if(curr.msg && curr.msg!="")
|
||||||
{
|
{
|
||||||
|
curr.msg = curr.msg.replace(bold_regex,"<b style='opacity:0.7'>$1</b>");
|
||||||
curr.msg = curr.msg.replace(italics_regex,"<em style='opacity:0.7'>$1</em>");
|
curr.msg = curr.msg.replace(italics_regex,"<em style='opacity:0.7'>$1</em>");
|
||||||
//convert the msg into images
|
//convert the msg into images
|
||||||
curr.msg = curr.msg.replace(/\[<\|p\|.+?\|p\|>\]/g, function (m) {
|
curr.msg = curr.msg.replace(/\[<\|p\|.+?\|p\|>\]/g, function (m) {
|
||||||
|
@ -16363,6 +16348,7 @@ Current version indicated by LITEVER below.
|
||||||
let styleRole = aestheticInstructUISettings.use_uniform_colors ? 'uniform' : role; // Uniform role is preferred if it's active on the settings.
|
let styleRole = aestheticInstructUISettings.use_uniform_colors ? 'uniform' : role; // Uniform role is preferred if it's active on the settings.
|
||||||
newbodystr = newbodystr.replace(new RegExp(`${contextDict[`${role}Open`]}([^]*?)${contextDict.closeTag}`, 'g'), (match, p) => {
|
newbodystr = newbodystr.replace(new RegExp(`${contextDict[`${role}Open`]}([^]*?)${contextDict.closeTag}`, 'g'), (match, p) => {
|
||||||
let replacedText = match.replace(/<[^>]*>/g, (htmlPart) => { internalHTMLparts.push(htmlPart); return `<internal_html_${internalHTMLparts.length - 1}>`; });
|
let replacedText = match.replace(/<[^>]*>/g, (htmlPart) => { internalHTMLparts.push(htmlPart); return `<internal_html_${internalHTMLparts.length - 1}>`; });
|
||||||
|
replacedText = replacedText.replace(bold_regex, wrapperSpan(styleRole, 'action')); // Apply the actions style to *actions*.
|
||||||
replacedText = replacedText.replace(italics_regex, wrapperSpan(styleRole, 'action')); // Apply the actions style to *actions*.
|
replacedText = replacedText.replace(italics_regex, wrapperSpan(styleRole, 'action')); // Apply the actions style to *actions*.
|
||||||
replacedText = replacedText.replace(/“(.*?)”/g, wrapperSpan(styleRole, 'speech')); // Apply the speech style to "speech".
|
replacedText = replacedText.replace(/“(.*?)”/g, wrapperSpan(styleRole, 'speech')); // Apply the speech style to "speech".
|
||||||
replacedText = replacedText.replace(/"(.*?)"/g, wrapperSpan(styleRole, 'speech')); // Apply the speech style to "speech".
|
replacedText = replacedText.replace(/"(.*?)"/g, wrapperSpan(styleRole, 'speech')); // Apply the speech style to "speech".
|
||||||
|
@ -16497,7 +16483,7 @@ Current version indicated by LITEVER below.
|
||||||
<div id="menuitems">
|
<div id="menuitems">
|
||||||
<div class="navcontainer">
|
<div class="navcontainer">
|
||||||
<nav class="navbar" id="navbar">
|
<nav class="navbar" id="navbar">
|
||||||
<button class="navbar-toggler" type="button" onclick="toggleTopNav()">
|
<button title="Main Menu Options" class="navbar-toggler mainnav" type="button" onclick="toggleTopNav()">
|
||||||
<span class="navbar-button-bar"></span>
|
<span class="navbar-button-bar"></span>
|
||||||
<span class="navbar-button-bar"></span>
|
<span class="navbar-button-bar"></span>
|
||||||
<span class="navbar-button-bar"></span>
|
<span class="navbar-button-bar"></span>
|
||||||
|
@ -16640,12 +16626,12 @@ Current version indicated by LITEVER below.
|
||||||
<div id="corpointerface" class="hidden">
|
<div id="corpointerface" class="hidden">
|
||||||
<div class="corpostyle">
|
<div class="corpostyle">
|
||||||
<div id="corpo_leftpannel" class="corpoleftpanel">
|
<div id="corpo_leftpannel" class="corpoleftpanel">
|
||||||
<button title="Hide Corpo Side Panel" class="corpo_leftpanel_close" onclick="show_corpo_leftpanel(false)">×</button>
|
<button title="Hide Corpo Side Panel" class="corpo_leftpanel_close mainnav" onclick="show_corpo_leftpanel(false)">×</button>
|
||||||
<p id="corpoleftpanelitems" class="corpoleftpanelitems">
|
<p id="corpoleftpanelitems" class="corpoleftpanelitems">
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<button title="Show Corpo Side Panel" class="corpo_leftpanel_open" onclick="show_corpo_leftpanel(true)"><div class="corpo_arrow_right"></div></button>
|
<button title="Show Corpo Side Panel" class="corpo_leftpanel_open mainnav" onclick="show_corpo_leftpanel(true)"><div class="corpo_arrow_right"></div></button>
|
||||||
<div class="corporightpanel">
|
<div class="corporightpanel">
|
||||||
<div id="corpostylemain" class="corpostylemain">
|
<div id="corpostylemain" class="corpostylemain">
|
||||||
<div id="corpo_body" class="corpostyleinner"></div>
|
<div id="corpo_body" class="corpostyleinner"></div>
|
||||||
|
@ -16688,13 +16674,8 @@ Current version indicated by LITEVER below.
|
||||||
Automatically select AI model <span class="helpicon">?
|
Automatically select AI model <span class="helpicon">?
|
||||||
<span class="helptext">This option picks a suitable AI model based on the selected scenario. If no text model is currently selected, an appropriate one will be automatically picked for you.</span>
|
<span class="helptext">This option picks a suitable AI model based on the selected scenario. If no text model is currently selected, an appropriate one will be automatically picked for you.</span>
|
||||||
</span>
|
</span>
|
||||||
<input type="checkbox" id="scenarioautopickai" onchange="togglescenarioallownsfw()" checked>
|
<input type="checkbox" id="scenarioautopickai" onchange="togglescenarioautopick()" checked>
|
||||||
<span id="scenarioallownsfwbox"><br>
|
|
||||||
Allow NSFW Models <span class="helpicon">?
|
|
||||||
<span class="helptext">If disabled, NSFW only models like Erebus will never be selected</span>
|
|
||||||
</span>
|
|
||||||
<input title="Allow NSFW Models" type="checkbox" id="scenarioallownsfw" checked>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="scenariogrid" class="justifyleft anotelabel scenariogrid">
|
<div id="scenariogrid" class="justifyleft anotelabel scenariogrid">
|
||||||
|
@ -17221,7 +17202,7 @@ Current version indicated by LITEVER below.
|
||||||
<input title="Context Size" inputmode="numeric" class="justifyright flex-push-right settingsmall widerinput" id="max_context_length" oninput="
|
<input title="Context Size" inputmode="numeric" class="justifyright flex-push-right settingsmall widerinput" id="max_context_length" oninput="
|
||||||
document.getElementById('max_context_length_slide').value = this.value;">
|
document.getElementById('max_context_length_slide').value = this.value;">
|
||||||
</div>
|
</div>
|
||||||
<div><input type="range" class="form-range airange" min="512" max="2048" step="8" id="max_context_length_slide" oninput="
|
<div><input title="Context Size Slider" type="range" class="form-range airange" min="512" max="2048" step="8" id="max_context_length_slide" oninput="
|
||||||
document.getElementById('max_context_length').value = this.value;"></div>
|
document.getElementById('max_context_length').value = this.value;"></div>
|
||||||
<div class="settingminmax">
|
<div class="settingminmax">
|
||||||
<div class="justifyleft">512</div>
|
<div class="justifyleft">512</div>
|
||||||
|
@ -17240,7 +17221,7 @@ Current version indicated by LITEVER below.
|
||||||
<input title="Max Output" inputmode="numeric" class="justifyright flex-push-right settingsmall" id="max_length" oninput="
|
<input title="Max Output" inputmode="numeric" class="justifyright flex-push-right settingsmall" id="max_length" oninput="
|
||||||
document.getElementById('max_length_slide').value = this.value;">
|
document.getElementById('max_length_slide').value = this.value;">
|
||||||
</div>
|
</div>
|
||||||
<div><input type="range" class="form-range airange" min="16" max="512" step="2" id="max_length_slide" oninput="
|
<div><input title="Max Output Slider" type="range" class="form-range airange" min="16" max="512" step="2" id="max_length_slide" oninput="
|
||||||
document.getElementById('max_length').value = this.value;"></div>
|
document.getElementById('max_length').value = this.value;"></div>
|
||||||
<div class="settingminmax">
|
<div class="settingminmax">
|
||||||
<div class="justifyleft">16</div>
|
<div class="justifyleft">16</div>
|
||||||
|
@ -17261,7 +17242,7 @@ Current version indicated by LITEVER below.
|
||||||
<input title="Temperature" inputmode="decimal" class="justifyright flex-push-right settingsmall" id="temperature" value=0.5
|
<input title="Temperature" inputmode="decimal" class="justifyright flex-push-right settingsmall" id="temperature" value=0.5
|
||||||
oninput="document.getElementById('temperature_slide').value = this.value;">
|
oninput="document.getElementById('temperature_slide').value = this.value;">
|
||||||
</div>
|
</div>
|
||||||
<div><input type="range" class="form-range airange" min="0.1" max="2" step="0.01"
|
<div><input title="Temperature Slider" type="range" class="form-range airange" min="0.1" max="2" step="0.01"
|
||||||
id="temperature_slide" oninput="
|
id="temperature_slide" oninput="
|
||||||
document.getElementById('temperature').value = this.value;"></div>
|
document.getElementById('temperature').value = this.value;"></div>
|
||||||
<div class="settingminmax">
|
<div class="settingminmax">
|
||||||
|
@ -17278,7 +17259,7 @@ Current version indicated by LITEVER below.
|
||||||
<input title="Repetition Penalty" inputmode="decimal" class="justifyright flex-push-right settingsmall" id="rep_pen" oninput="
|
<input title="Repetition Penalty" inputmode="decimal" class="justifyright flex-push-right settingsmall" id="rep_pen" oninput="
|
||||||
document.getElementById('rep_pen_slide').value = this.value;">
|
document.getElementById('rep_pen_slide').value = this.value;">
|
||||||
</div>
|
</div>
|
||||||
<div><input type="range" class="form-range airange" min="1" max="2" step="0.01"
|
<div><input title="Repetition Penalty Slider" type="range" class="form-range airange" min="1" max="2" step="0.01"
|
||||||
id="rep_pen_slide" oninput="document.getElementById('rep_pen').value = this.value;"></div>
|
id="rep_pen_slide" oninput="document.getElementById('rep_pen').value = this.value;"></div>
|
||||||
<div class="settingminmax">
|
<div class="settingminmax">
|
||||||
<div class="justifyleft">1</div>
|
<div class="justifyleft">1</div>
|
||||||
|
@ -17294,7 +17275,7 @@ Current version indicated by LITEVER below.
|
||||||
<input title="Top-P Sampling" inputmode="decimal" class="justifyright flex-push-right settingsmall" id="top_p" oninput="
|
<input title="Top-P Sampling" inputmode="decimal" class="justifyright flex-push-right settingsmall" id="top_p" oninput="
|
||||||
document.getElementById('top_p_slide').value = this.value;">
|
document.getElementById('top_p_slide').value = this.value;">
|
||||||
</div>
|
</div>
|
||||||
<div><input type="range" class="form-range airange" min="0" max="1" step="0.01" id="top_p_slide"
|
<div><input title="Top-P Sampling Slider" type="range" class="form-range airange" min="0" max="1" step="0.01" id="top_p_slide"
|
||||||
oninput="document.getElementById('top_p').value = this.value;"></div>
|
oninput="document.getElementById('top_p').value = this.value;"></div>
|
||||||
<div class="settingminmax">
|
<div class="settingminmax">
|
||||||
<div class="justifyleft">0</div>
|
<div class="justifyleft">0</div>
|
||||||
|
@ -17308,7 +17289,7 @@ Current version indicated by LITEVER below.
|
||||||
<input title="Top-K Sampling"inputmode="decimal" class="justifyright flex-push-right settingsmall" id="top_k" oninput="
|
<input title="Top-K Sampling"inputmode="decimal" class="justifyright flex-push-right settingsmall" id="top_k" oninput="
|
||||||
document.getElementById('top_k_slide').value = this.value;">
|
document.getElementById('top_k_slide').value = this.value;">
|
||||||
</div>
|
</div>
|
||||||
<div><input type="range" class="form-range airange" min="0" max="100" step="1" id="top_k_slide"
|
<div><input title="Top-K Sampling Slider" type="range" class="form-range airange" min="0" max="100" step="1" id="top_k_slide"
|
||||||
oninput="document.getElementById('top_k').value = this.value;"></div>
|
oninput="document.getElementById('top_k').value = this.value;"></div>
|
||||||
<div class="settingminmax">
|
<div class="settingminmax">
|
||||||
<div class="justifyleft">0</div>
|
<div class="justifyleft">0</div>
|
||||||
|
|
|
@ -799,7 +799,7 @@ maxhordelen = 350
|
||||||
modelbusy = threading.Lock()
|
modelbusy = threading.Lock()
|
||||||
requestsinqueue = 0
|
requestsinqueue = 0
|
||||||
defaultport = 5001
|
defaultport = 5001
|
||||||
KcppVersion = "1.70"
|
KcppVersion = "1.70.1"
|
||||||
showdebug = True
|
showdebug = True
|
||||||
showsamplerwarning = True
|
showsamplerwarning = True
|
||||||
showmaxctxwarning = True
|
showmaxctxwarning = True
|
||||||
|
|
15
koboldcpp.sh
15
koboldcpp.sh
|
@ -20,14 +20,23 @@ fi
|
||||||
KCPP_CUDA=$(<conda/envs/linux/cudaver)
|
KCPP_CUDA=$(<conda/envs/linux/cudaver)
|
||||||
KCPP_CUDAAPPEND=-cuda${KCPP_CUDA//.}$KCPP_APPEND
|
KCPP_CUDAAPPEND=-cuda${KCPP_CUDA//.}$KCPP_APPEND
|
||||||
|
|
||||||
bin/micromamba run -r conda -p conda/envs/linux make -j$(nproc) LLAMA_VULKAN=1 LLAMA_OPENBLAS=1 LLAMA_CLBLAST=1 LLAMA_CUBLAS=1 LLAMA_PORTABLE=1 LLAMA_ADD_CONDA_PATHS=1
|
LLAMA_NOAVX2_FLAG=""
|
||||||
|
if [ -n "$NOAVX2" ]; then
|
||||||
|
LLAMA_NOAVX2_FLAG="LLAMA_NOAVX2=1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
bin/micromamba run -r conda -p conda/envs/linux make -j$(nproc) LLAMA_VULKAN=1 LLAMA_OPENBLAS=1 LLAMA_CLBLAST=1 LLAMA_CUBLAS=1 LLAMA_PORTABLE=1 LLAMA_ADD_CONDA_PATHS=1 $LLAMA_NOAVX2_FLAG
|
||||||
|
|
||||||
if [[ $1 == "rebuild" ]]; then
|
if [[ $1 == "rebuild" ]]; then
|
||||||
echo Rebuild complete, you can now try to launch Koboldcpp.
|
echo Rebuild complete, you can now try to launch Koboldcpp.
|
||||||
elif [[ $1 == "dist" ]]; then
|
elif [[ $1 == "dist" ]]; then
|
||||||
bin/micromamba remove --no-rc -r conda -p conda/envs/linux --force ocl-icd -y
|
bin/micromamba remove --no-rc -r conda -p conda/envs/linux --force ocl-icd -y
|
||||||
bin/micromamba run -r conda -p conda/envs/linux pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './koboldcpp_cublas.so:.' --add-data './koboldcpp_vulkan.so:.' --add-data './koboldcpp_openblas.so:.' --add-data './koboldcpp_clblast.so:.' --add-data "./koboldcpp_failsafe.so:." --add-data "./koboldcpp_noavx2.so:." --add-data "./koboldcpp_clblast_noavx2.so:." --add-data "./koboldcpp_vulkan_noavx2.so:." --add-data "./koboldcpp_vulkan.so:." --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --clean --console koboldcpp.py -n "koboldcpp-linux-x64$KCPP_CUDAAPPEND"
|
if [ -n "$NOAVX2" ]; then
|
||||||
bin/micromamba run -r conda -p conda/envs/linux pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './koboldcpp_openblas.so:.' --add-data './koboldcpp_vulkan.so:.' --add-data './koboldcpp_clblast.so:.' --add-data "./koboldcpp_failsafe.so:." --add-data "./koboldcpp_noavx2.so:." --add-data "./koboldcpp_clblast_noavx2.so:." --add-data "./koboldcpp_vulkan_noavx2.so:." --add-data "./koboldcpp_vulkan.so:." --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --clean --console koboldcpp.py -n "koboldcpp-linux-x64-nocuda$KCPP_APPEND"
|
bin/micromamba run -r conda -p conda/envs/linux pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_cublas.so:.' --add-data './koboldcpp_failsafe.so:.' --add-data './koboldcpp_noavx2.so:.' --add-data './koboldcpp_clblast_noavx2.so:.' --add-data './koboldcpp_vulkan_noavx2.so:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --clean --console koboldcpp.py -n "koboldcpp-linux-x64$KCPP_CUDAAPPEND"
|
||||||
|
else
|
||||||
|
bin/micromamba run -r conda -p conda/envs/linux pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './koboldcpp_cublas.so:.' --add-data './koboldcpp_vulkan.so:.' --add-data './koboldcpp_openblas.so:.' --add-data './koboldcpp_clblast.so:.' --add-data './koboldcpp_failsafe.so:.' --add-data './koboldcpp_noavx2.so:.' --add-data './koboldcpp_clblast_noavx2.so:.' --add-data './koboldcpp_vulkan_noavx2.so:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --clean --console koboldcpp.py -n "koboldcpp-linux-x64$KCPP_CUDAAPPEND"
|
||||||
|
bin/micromamba run -r conda -p conda/envs/linux pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './koboldcpp_openblas.so:.' --add-data './koboldcpp_vulkan.so:.' --add-data './koboldcpp_clblast.so:.' --add-data './koboldcpp_failsafe.so:.' --add-data './koboldcpp_noavx2.so:.' --add-data './koboldcpp_clblast_noavx2.so:.' --add-data './koboldcpp_vulkan_noavx2.so:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --clean --console koboldcpp.py -n "koboldcpp-linux-x64-nocuda$KCPP_APPEND"
|
||||||
|
fi
|
||||||
bin/micromamba install --no-rc -r conda -p conda/envs/linux ocl-icd -c conda-forge -y
|
bin/micromamba install --no-rc -r conda -p conda/envs/linux ocl-icd -c conda-forge -y
|
||||||
else
|
else
|
||||||
bin/micromamba run -r conda -p conda/envs/linux python koboldcpp.py $*
|
bin/micromamba run -r conda -p conda/envs/linux python koboldcpp.py $*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue