Skip to content

Commit 205a0b8

Browse files
committed
fix kokoro replacement, add 4096 batch size option
1 parent d2c9fdd commit 205a0b8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

koboldcpp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4501,8 +4501,8 @@ def hide_tooltip(event):
45014501

45024502
tabcontent = {}
45034503
# slider data
4504-
blasbatchsize_values = ["-1", "16", "32", "64", "128", "256", "512", "1024", "2048"]
4505-
blasbatchsize_text = ["Don't Batch BLAS", "16","32","64","128","256","512","1024","2048"]
4504+
blasbatchsize_values = ["-1","16","32","64","128","256","512","1024","2048","4096"]
4505+
blasbatchsize_text = ["Don't Batch BLAS","16","32","64","128","256","512","1024","2048","4096"]
45064506
contextsize_text = ["256", "512", "1024", "2048", "3072", "4096", "6144", "8192", "10240", "12288", "14336", "16384", "20480", "24576", "28672", "32768", "40960", "49152", "57344", "65536", "81920", "98304", "114688", "131072"]
45074507
antirunopts = [opt.replace("Use ", "") for lib, opt in lib_option_pairs if opt not in runopts]
45084508
quantkv_text = ["F16 (Off)","8-Bit","4-Bit"]
@@ -7572,7 +7572,7 @@ def range_checker(arg: str):
75727572
advparser.add_argument("--version", help="Prints version and exits.", action='store_true')
75737573
advparser.add_argument("--analyze", metavar=('[filename]'), help="Reads the metadata, weight types and tensor names in any GGUF file.", default="")
75747574
advparser.add_argument("--maingpu", help="Only used in a multi-gpu setup. Sets the index of the main GPU that will be used.",metavar=('[Device ID]'), type=int, default=-1)
7575-
advparser.add_argument("--blasbatchsize", help="Sets the batch size used in BLAS processing (default 512). Setting it to -1 disables BLAS mode, but keeps other benefits like GPU offload.", type=int,choices=[-1,16,32,64,128,256,512,1024,2048], default=512)
7575+
advparser.add_argument("--blasbatchsize", help="Sets the batch size used in BLAS processing (default 512). Setting it to -1 disables BLAS mode, but keeps other benefits like GPU offload.", type=int,choices=[-1,16,32,64,128,256,512,1024,2048,4096], default=512)
75767576
advparser.add_argument("--blasthreads", help="Use a different number of threads during BLAS if specified. Otherwise, has the same value as --threads",metavar=('[threads]'), type=int, default=0)
75777577
advparser.add_argument("--lora", help="GGUF models only, applies a lora file on top of model.", metavar=('[lora_filename]'), nargs='+')
75787578
advparser.add_argument("--loramult", metavar=('[amount]'), help="Multiplier for the Text LORA model to be applied.", type=float, default=1.0)

otherarch/ttscpp/src/kokoro_model.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,7 @@ int kokoro_runner::generate(std::string prompt, struct tts_response * response,
14241424
// We preserve the other punctuation for cleaner chunking pre-tokenization
14251425
prompt = replace_any(prompt, ";:", "--");
14261426
prompt = replace_any(prompt, "\n", ". ");
1427+
kokoro_str_replace_all(prompt,"","'");
14271428
kokoro_str_replace_all(prompt," - "," -- ");
14281429
kokoro_str_replace_all(prompt,"he's ","he is ");
14291430
kokoro_str_replace_all(prompt,"'s ","s ");

0 commit comments

Comments
 (0)