MONKEY
Browse files- Scripts/kobold-server.sh +12 -10
Scripts/kobold-server.sh
CHANGED
@@ -10,7 +10,6 @@
|
|
10 |
# if you get a conda error try this: `conda install conda-forge::libstdcxx-ng`
|
11 |
eval "$(conda shell.bash hook)"
|
12 |
conda activate kobold
|
13 |
-
python -V
|
14 |
|
15 |
# USER variables
|
16 |
# CHANGE
|
@@ -21,6 +20,11 @@ API_HOST=192.168.1.20
|
|
21 |
BLAS_THREADS=16
|
22 |
THREADS=8
|
23 |
|
|
|
|
|
|
|
|
|
|
|
24 |
# refer to https://github.com/LostRuins/koboldcpp?tab=readme-ov-file#osx-and-linux-manual-compiling for dependencies
|
25 |
|
26 |
# CD to koboldcpp dir
|
@@ -28,21 +32,19 @@ cd $KOBOLD_DIR
|
|
28 |
|
29 |
# edit make flags to fit your needs
|
30 |
echo "Git pull & build?"
|
31 |
-
KOBOLD_BUILD=$(gum choose "
|
32 |
|
33 |
-
if [ "$KOBOLD_BUILD" = "
|
34 |
-
|
35 |
-
|
36 |
-
make clean
|
37 |
-
make -j8 LLAMA_NO_LLAMAFILE=0 LLAMA_CUDA=1 LLAMA_CUBLAS=1 LLAMA_OPENBLAS=1 LLAMA_FAST=1 LLAMA_NO_CCACHE=1 LLAMA_CUDA_MMV_Y=2 LLAMA_CUDA_DMMV_X=64 LLAMA_CUDA_DMMV_F16=1 LLAMA_CUDA_F16=1 LLAMA_NATIVE=1 LLAMA_LTO=1 LLAMA_AVX=1 LLAMA_AVX2=1 LLAMA_FMA=1 LLAMA_F16C=1
|
38 |
echo "Rebuild completed"
|
39 |
-
elif [ "$KOBOLD_BUILD" = "
|
40 |
echo "Skipping rebuild."
|
41 |
fi
|
42 |
|
43 |
# lists models
|
44 |
echo "Select Model"
|
45 |
-
MODEL=$(gum choose $(ls $MODEL_FOLDER_DIR))
|
46 |
# uncomment if you use sharded models. It will take the first file in a dir and load it.
|
47 |
#SHARDED_MODEL=$(ls -p $MODEL_FOLDER_DIR/$MODEL | grep -v / | head -1)
|
48 |
#MODEL=$MODEL/$SHARDED_MODEL
|
@@ -53,7 +55,7 @@ LAYERS=$(gum input --placeholder "99")
|
|
53 |
echo "$LAYERS layers have been offloaded"
|
54 |
|
55 |
echo "Context Size"
|
56 |
-
CONTEXT=$(gum choose "4096" "8192" "12288" "16384" "32768")
|
57 |
echo "Using a context size of $CONTEXT"
|
58 |
|
59 |
# combined user flags
|
|
|
10 |
# if you get a conda error try this: `conda install conda-forge::libstdcxx-ng`
|
11 |
eval "$(conda shell.bash hook)"
|
12 |
conda activate kobold
|
|
|
13 |
|
14 |
# USER variables
|
15 |
# CHANGE
|
|
|
20 |
BLAS_THREADS=16
|
21 |
THREADS=8
|
22 |
|
23 |
+
gum style \
|
24 |
+
--foreground 212 --border-foreground 212 --border double \
|
25 |
+
--align center --width 100 --margin "1 2" --padding "2 4" --bold \
|
26 |
+
'Beep...Boop... Script created by Virt-io'
|
27 |
+
|
28 |
# refer to https://github.com/LostRuins/koboldcpp?tab=readme-ov-file#osx-and-linux-manual-compiling for dependencies
|
29 |
|
30 |
# CD to koboldcpp dir
|
|
|
32 |
|
33 |
# edit make flags to fit your needs
|
34 |
echo "Git pull & build?"
|
35 |
+
KOBOLD_BUILD=$(gum choose --selected.bold --selected.underline "NO" "YES")
|
36 |
|
37 |
+
if [ "$KOBOLD_BUILD" = "YES" ]; then
|
38 |
+
gum spin --spinner monkey --title "Pulling latest changes..." -- git pull && make clean
|
39 |
+
gum spin --show-output --spinner monkey --title "Re-building Koboldcpp..." -- make -j8 LLAMA_NO_LLAMAFILE=0 LLAMA_CUDA=1 LLAMA_CUBLAS=1 LLAMA_OPENBLAS=1 LLAMA_FAST=1 LLAMA_NO_CCACHE=1 LLAMA_CUDA_MMV_Y=2 LLAMA_CUDA_DMMV_X=64 LLAMA_CUDA_DMMV_F16=1 LLAMA_CUDA_F16=1 LLAMA_NATIVE=1 LLAMA_LTO=1 LLAMA_AVX=1 LLAMA_AVX2=1 LLAMA_FMA=1 LLAMA_F16C=1
|
|
|
|
|
40 |
echo "Rebuild completed"
|
41 |
+
elif [ "$KOBOLD_BUILD" = "NO" ]; then
|
42 |
echo "Skipping rebuild."
|
43 |
fi
|
44 |
|
45 |
# lists models
|
46 |
echo "Select Model"
|
47 |
+
MODEL=$(gum choose --selected.bold --selected.underline $(ls $MODEL_FOLDER_DIR))
|
48 |
# uncomment if you use sharded models. It will take the first file in a dir and load it.
|
49 |
#SHARDED_MODEL=$(ls -p $MODEL_FOLDER_DIR/$MODEL | grep -v / | head -1)
|
50 |
#MODEL=$MODEL/$SHARDED_MODEL
|
|
|
55 |
echo "$LAYERS layers have been offloaded"
|
56 |
|
57 |
echo "Context Size"
|
58 |
+
CONTEXT=$(gum choose --selected.bold --selected.underline "4096" "8192" "12288" "16384" "32768")
|
59 |
echo "Using a context size of $CONTEXT"
|
60 |
|
61 |
# combined user flags
|