Skip to content

Commit

Permalink
cleanup, up ver (+1 squashed commits)
Browse files Browse the repository at this point in the history
Squashed commits:

[1ea303d] cleanup , up ver (+1 squashed commits)

Squashed commits:

[79f09b2] cleanup
  • Loading branch information
LostRuins committed Nov 5, 2023
1 parent e2e5fe5 commit ea81eae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"!test -f koboldcpp_cublas.so && echo Build Skipped || make koboldcpp_cublas LLAMA_CUBLAS=1\r\n",
"!cp koboldcpp_cublas.so koboldcpp_cublas.dat\r\n",
"!apt install aria2 -y\r\n",
"!aria2c -x 10 -o model.ggml --summary-interval=3 --download-result=full --allow-overwrite=true --file-allocation=none $Model\r\n",
"!aria2c -x 10 -o model.ggml --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $Model\r\n",
"!python koboldcpp.py model.ggml --usecublas 0 mmq --multiuser --gpulayers $Layers --contextsize $ContextSize --hordeconfig concedo 1 1 --remotetunnel\r\n"
]
}
Expand Down
9 changes: 3 additions & 6 deletions koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def bring_terminal_to_foreground():
modelbusy = threading.Lock()
requestsinqueue = 0
defaultport = 5001
KcppVersion = "1.48"
KcppVersion = "1.48.1"
showdebug = True
showsamplerwarning = True
showmaxctxwarning = True
Expand Down Expand Up @@ -1140,21 +1140,18 @@ def auto_gpu_heuristics():
MaxMemory[0] = max(int(FetchedCUdeviceMem[idx]),MaxMemory[0])
else:
MaxMemory[0] = max(int(FetchedCUdeviceMem[idx])*1024*1024,MaxMemory[0])
pass

#autopick cublas if suitable
#autopick cublas if suitable, requires at least 3.5GB VRAM to auto pick
global exitcounter
if exitcounter < 100 and MaxMemory[0]>3500000000 and CUDevicesNames[0]!="" and "Use CuBLAS" or "Use hipBLAS (ROCM)" in runopts and runopts_var.get()=="Use OpenBLAS":
if exitcounter < 100 and MaxMemory[0]>3500000000 and CUDevicesNames[0]!="" and ("Use CuBLAS" in runopts or "Use hipBLAS (ROCM)" in runopts) and runopts_var.get()=="Use OpenBLAS":
if "Use CuBLAS" in runopts:
runopts_var.set("Use CuBLAS")
pass
elif "Use hipBLAS (ROCM)" in runopts:
runopts_var.set("Use hipBLAS (ROCM)")

changed_gpu_choice_var()
return


def autoset_gpu_layers(filepath): #shitty algo to determine how many layers to use
try:
global gui_layers_untouched
Expand Down

0 comments on commit ea81eae

Please sign in to comment.