Skip to content

Commit 59c02aa

Browse files
committed
embeddings model colab
1 parent 34ddd87 commit 59c02aa

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

colab.ipynb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@
7373
"WavTokModel = \"https://huggingface.co/koboldcpp/tts/resolve/main/WavTokenizer-Large-75-Q4_0.gguf\" #@param [\"https://huggingface.co/koboldcpp/tts/resolve/main/WavTokenizer-Large-75-Q4_0.gguf\"]{allow-input: true}\n",
7474
"TTSCommand = \"\"\n",
7575
"#@markdown <hr>\n",
76+
"LoadEmbeddingsModel = False #@param {type:\"boolean\"}\n",
77+
"EmbeddingsModel = \"https://huggingface.co/yixuan-chia/snowflake-arctic-embed-s-GGUF/resolve/main/snowflake-arctic-embed-s-Q4_0.gguf\" #@param [\"https://huggingface.co/yixuan-chia/snowflake-arctic-embed-s-GGUF/resolve/main/snowflake-arctic-embed-s-Q4_0.gguf\"]{allow-input: true}\n",
78+
"ECommand = \"\"\n",
79+
"#@markdown <hr>\n",
7680
"#@markdown This enables saving stories directly to your google drive. You will have to grant permissions, and then you can access the saves from the \"KoboldCpp Server Storage\" option.\n",
7781
"AllowSaveToGoogleDrive = False #@param {type:\"boolean\"}\n",
7882
"SavGdriveCommand = \"\"\n",
@@ -124,6 +128,10 @@
124128
" TTSCommand = \"--ttsmodel ttsmodel.bin --ttswavtokenizer ttswavtok.bin --ttsgpu\"\n",
125129
"else:\n",
126130
" TTSCommand = \"\"\n",
131+
"if EmbeddingsModel and LoadEmbeddingsModel:\n",
132+
" ECommand = \"--embeddingsmodel emodel.bin\"\n",
133+
"else:\n",
134+
" ECommand = \"\"\n",
127135
"if FlashAttention:\n",
128136
" FACommand = \"--flashattention\"\n",
129137
"else:\n",
@@ -152,6 +160,8 @@
152160
"if TTSCommand:\n",
153161
" !aria2c -x 10 -o ttsmodel.bin --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $TTSModel\n",
154162
" !aria2c -x 10 -o ttswavtok.bin --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $WavTokModel\n",
163+
"if ECommand:\n",
164+
" !aria2c -x 10 -o emodel.bin --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $EmbeddingsModel\n",
155165
"\n",
156166
"if MakeLocalTunnelFallback:\n",
157167
" import urllib\n",
@@ -165,7 +175,7 @@
165175
" print(f\"Please open the above link, and input the password '{ltpw}'\\nYour KoboldCpp will start shortly...\")\n",
166176
" print(\"=================\")\n",
167177
" !sleep 10\n",
168-
"!./koboldcpp_linux model.gguf --usecublas 0 mmq --chatcompletionsadapter AutoGuess --multiuser --gpulayers $Layers --contextsize $ContextSize --websearch --quiet --remotetunnel $FACommand $MPCommand $VCommand $SCommand $WCommand $TTSCommand $SavGdriveCommand\n"
178+
"!./koboldcpp_linux model.gguf --usecublas 0 mmq --chatcompletionsadapter AutoGuess --multiuser --gpulayers $Layers --contextsize $ContextSize --websearch --quiet --remotetunnel $FACommand $MPCommand $VCommand $SCommand $WCommand $TTSCommand $ECommand $SavGdriveCommand\n"
169179
]
170180
}
171181
],

0 commit comments

Comments
 (0)