Views
No views yet




Presets and GPU Layers. Read the --help for more info about each settings.koboldcpp.exe --helpkoboldcpp-linux-x64-cuda1150 prebuilt PyInstaller binary on the releases page. Simply download and run the binary (You may have to chmod +x it first).curl -fLo koboldcpp https://github.com/LostRuins/koboldcpp/releases/latest/download/koboldcpp-linux-x64-cuda1150 && chmod +x koboldcpp./koboldcpp in the terminal (for CLI usage, run with --help).
Finally, obtain and load a GGUF model. See herechmod +x koboldcpp-mac-arm64 and run it with ./koboldcpp-mac-arm64..gguf format.convert-hf-to-gguf.py to convert them, then quantize_gguf.exe to quantize the result.--usecublas flag (Nvidia Only), or --usevulkan (Any GPU), make sure you select the correct .exe with CUDA support.--gpulayers to offload model layers to the GPU. The more layers you offload to VRAM, the faster generation speed will become. Experiment to determine number of layers to offload, and reduce by a few if you run out of memory.--contextsize (number) to increase context size, allowing the model to read more text. Note that you may also need to increase the max context in the KoboldAI Lite UI as well (click and edit the number text field).--noavx2 flag. You can also try turning off mmap with --nommap or reducing your --blasbatchssize (set -1 to avoid batching)--help flag, or check the wiki.git clone https://github.com/LostRuins/koboldcpp.git./koboldcpp.sh dist and run the generated binary. (Not recommended for systems that already have an existing installation of conda. Dependencies: curl, bzip2)./koboldcpp.sh # This launches the GUI for easy configuration and launching (X11 required).
./koboldcpp.sh --help # List all available terminal commands for using Koboldcpp, you can use koboldcpp.sh the same way as our python script and binaries.
./koboldcpp.sh rebuild # Automatically generates a new conda runtime and compiles a fresh copy of the libraries. Do this after updating Koboldcpp to keep everything functional.
./koboldcpp.sh dist # Generate your own precompiled binary (Due to the nature of Linux compiling these will only work on distributions equal or newer than your own.)git clone https://github.com/LostRuins/koboldcpp.gitmake.make LLAMA_VULKAN=1make LLAMA_CLBLAST=1cblas and clblast.libclblast-dev.LLAMA_CUBLAS=1, (or LLAMA_HIPBLAS=1 for AMD). You will need CUDA Toolkit installed. Some have also reported success with the CMake file, though that is more for windows.make LLAMA_CLBLAST=1 LLAMA_CUBLAS=1 LLAMA_VULKAN=1. (Note that LLAMA_CUBLAS=1 will not work on windows, you need visual studio)LLAMA_PORTABLE=1koboldcpp.py [ggml_model.gguf] [port]git clone https://github.com/LostRuins/koboldcpp.gitmake at the KoboldCpp source folder. This will create the .dll files for a pure CPU native build.make LLAMA_CLBLAST=1 LLAMA_VULKAN=1. (Note that LLAMA_CUBLAS=1 will not work on windows, you need visual studio)LLAMA_PORTABLE=1pip install PyInstaller). Then run the script make_pyinstaller.batkoboldcpp_cublas.dll generated into the same directory as the koboldcpp.py file. If you are bundling executables, you may need to include CUDA dynamic libraries (such as cublasLt64_11.dll and cublas64_11.dll) in order for the executable to work correctly on a different PC.git clone https://github.com/LostRuins/koboldcpp.gitmake.make LLAMA_METAL=1, note that MacOS metal libraries need to be installed.LLAMA_PORTABLE=1koboldcpp.py --model [ggml_model.gguf] (and add --gpulayers (number of layer) if you wish to offload layers to GPU).termux-change-repo and choose Mirror by BFSUpkg install wget git python (plus any other missing packages)apt install openssl (if needed)git clone https://github.com/LostRuins/koboldcpp.gitcd koboldcppmakeLLAMA_PORTABLE=1, this disables usage of ARM instrinsics.wget https://huggingface.co/concedo/KobbleTinyV2-1.1B-GGUF/resolve/main/KobbleTiny-Q4_K.ggufpython koboldcpp.py --model KobbleTiny-Q4_K.ggufhttp://localhost:5001 on your mobile browserpkg upkoboldcpp to your environment.systemPackages (or it can also be placed in home.packages).
--ropeconfig.make, you can rebuild the exe yourself with pyinstaller by using make_pyinstaller.bat/api (e.g. http://localhost:5001/api) and https://lite.koboldai.net/koboldcpp_api. An OpenAI compatible API is also provided at /v1 route (e.g. http://localhost:5001/v1)..bin models, though some newer features might be unavailable.