Rewrite history to fix bad vulkan shader commits without increasing repo size

added dpe colab (+8 squashed commit)

Squashed commit:

[b8362da4] updated lite

[ed6c037d] move nsigma into the regular sampler stack

[ac5f61c6] relative filepath fixed

[05fe96ab] export template

[ed0a5a3e] nix_example.md: refactor (#1401)

* nix_example.md: add override example

* nix_example.md: drop graphics example, already basic nixos knowledge

* nix_example.md: format

* nix_example.md: Vulkan is disabled on macOS

Disabled in: 1ccd253acc

* nix_examples.md: nixpkgs.config.cuda{Arches -> Capabilities}

Fixes: https://github.com/LostRuins/koboldcpp/issues/1367

[675c62f7] AutoGuess: Phi 4 (mini) (#1402)

[4bf56982] phrasing

[b8c0df04] Add Rep Pen to Top N Sigma sampler chain (#1397)

- place after nsigma and before xtc (+3 squashed commit)

Squashed commit:

[87c52b97] disable VMM from HIP

[ee8906f3] edit description

[e85c0e69] Remove Unnecessary Rep Counting (#1394)

* stop counting reps

* fix range-based initializer

* strike that - reverse it
This commit is contained in:
Concedo 2025-03-05 00:02:20 +08:00
parent 50eae1ffeb
commit 6b7d2349a7
114 changed files with 6666 additions and 2642 deletions

View file

@ -49,7 +49,7 @@ logit_bias_max = 512
dry_seq_break_max = 128
# global vars
KcppVersion = "1.85"
KcppVersion = "1.85.1"
showdebug = True
kcpp_instance = None #global running instance
global_memory = {"tunnel_url": "", "restart_target":"", "input_to_exit":False, "load_complete":False}
@ -3198,7 +3198,7 @@ def show_gui():
if not args.model_param and not args.sdmodel and not args.whispermodel and not args.ttsmodel and not args.nomodel:
global exitcounter
exitcounter = 999
exit_with_error(2,"No ggml model or kcpps file was selected. Exiting.")
exit_with_error(2,"No gguf model or kcpps file was selected. Exiting.")
return
#dummy line to get darkdetect imported in pyinstaller
@ -4012,24 +4012,7 @@ def show_gui():
savdict = json.loads(json.dumps(args.__dict__))
file_type = [("KoboldCpp LaunchTemplate", "*.kcppt")]
#remove blacklisted fields
savdict["istemplate"] = True
savdict["gpulayers"] = -1
savdict["threads"] = -1
savdict["hordekey"] = ""
savdict["hordeworkername"] = ""
savdict["sdthreads"] = 0
savdict["password"] = None
savdict["usemmap"] = False
savdict["usemlock"] = False
savdict["debugmode"] = 0
savdict["ssl"] = None
savdict["useclblast"] = None
savdict["usecublas"] = None
savdict["usevulkan"] = None
savdict["tensor_split"] = None
savdict["draftgpusplit"] = None
savdict["config"] = None
savdict["ttsthreads"] = 0
savdict = convert_args_to_template(savdict)
filename = asksaveasfilename(filetypes=file_type, defaultextension=file_type)
if not filename:
return
@ -4923,11 +4906,36 @@ def load_config_cli(filename):
else:
setattr(args, key, value)
if args.istemplate:
print("\nA .kcppt template was selected from CLI - automatically selecting your backend...")
auto_set_backend_cli()
print("\nA .kcppt template was selected from CLI...")
if (args.usecublas is None) and (args.usevulkan is None) and (args.useclblast is None):
print("Automatically selecting your backend...")
auto_set_backend_cli()
def save_config_cli(filename):
def convert_args_to_template(savdict):
savdict["istemplate"] = True
savdict["gpulayers"] = -1
savdict["threads"] = -1
savdict["hordekey"] = ""
savdict["hordeworkername"] = ""
savdict["sdthreads"] = 0
savdict["password"] = None
savdict["usemmap"] = False
savdict["usemlock"] = False
savdict["debugmode"] = 0
savdict["ssl"] = None
savdict["useclblast"] = None
savdict["usecublas"] = None
savdict["usevulkan"] = None
savdict["tensor_split"] = None
savdict["draftgpusplit"] = None
savdict["config"] = None
savdict["ttsthreads"] = 0
return savdict
def save_config_cli(filename, template):
savdict = json.loads(json.dumps(args.__dict__))
if template:
savdict = convert_args_to_template(savdict)
if filename is None:
return
filenamestr = str(filename).strip()
@ -5103,7 +5111,10 @@ def main(launch_args):
return
if args.exportconfig and args.exportconfig!="":
save_config_cli(args.exportconfig)
save_config_cli(args.exportconfig,False)
return
if args.exporttemplate and args.exporttemplate!="":
save_config_cli(args.exporttemplate,True)
return
if args.config and len(args.config)==1: #handle initial config loading for launch
@ -5399,7 +5410,9 @@ def kcpp_main_process(launch_args, g_memory=None, gui_launcher=False):
has_multiplayer = True
if args.savedatafile and isinstance(args.savedatafile, str):
filepath = args.savedatafile
filepath = os.path.abspath(args.savedatafile) # Ensure it's an absolute path
if not filepath.endswith(".jsondb"):
filepath += ".jsondb"
try:
with open(filepath, 'r+', encoding='utf-8', errors='ignore') as f:
loaded = json.load(f)
@ -5926,7 +5939,7 @@ if __name__ == '__main__':
advparser.add_argument("--highpriority", help="Experimental flag. If set, increases the process CPU priority, potentially speeding up generation. Use caution.", action='store_true')
advparser.add_argument("--foreground", help="Windows only. Sends the terminal to the foreground every time a new prompt is generated. This helps avoid some idle slowdown issues.", action='store_true')
advparser.add_argument("--preloadstory", metavar=('[savefile]'), help="Configures a prepared story json save file to be hosted on the server, which frontends (such as KoboldAI Lite) can access over the API.", default="")
advparser.add_argument("--savedatafile", metavar=('[savefile]'), help="If enabled, creates or opens a persistent database file on the server, that allows users to save and load their data remotely.", default="")
advparser.add_argument("--savedatafile", metavar=('[savefile]'), help="If enabled, creates or opens a persistent database file on the server, that allows users to save and load their data remotely. A new file is created if it does not exist.", default="")
advparser.add_argument("--quiet", help="Enable quiet mode, which hides generation inputs and outputs in the terminal. Quiet mode is automatically enabled when running a horde worker.", action='store_true')
advparser.add_argument("--ssl", help="Allows all content to be served over SSL instead. A valid UNENCRYPTED SSL cert and key .pem files must be provided", metavar=('[cert_pem]', '[key_pem]'), nargs='+')
advparser.add_argument("--nocertify", help="Allows insecure SSL connections. Use this if you have cert errors and need to bypass certificate restrictions.", action='store_true')
@ -5945,6 +5958,7 @@ if __name__ == '__main__':
advparser.add_argument("--smartcontext", help="Reserving a portion of context to try processing less frequently. Outdated. Not recommended.", action='store_true')
advparser.add_argument("--unpack", help="Extracts the file contents of the KoboldCpp binary into a target directory.", metavar=('destination'), type=str, default="")
advparser.add_argument("--exportconfig", help="Exports the current selected arguments as a .kcpps settings file", metavar=('[filename]'), type=str, default="")
advparser.add_argument("--exporttemplate", help="Exports the current selected arguments as a .kcppt template file", metavar=('[filename]'), type=str, default="")
advparser.add_argument("--nomodel", help="Allows you to launch the GUI alone, without selecting any model.", action='store_true')
advparser.add_argument("--moeexperts", metavar=('[num of experts]'), help="How many experts to use for MoE models (default=follow gguf)", type=int, default=-1)
compatgroup2 = parser.add_mutually_exclusive_group()