|
73 | 73 | "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", |
74 | 74 | "TTSCommand = \"\"\n", |
75 | 75 | "#@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", |
76 | 80 | "#@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", |
77 | 81 | "AllowSaveToGoogleDrive = False #@param {type:\"boolean\"}\n", |
78 | 82 | "SavGdriveCommand = \"\"\n", |
|
124 | 128 | " TTSCommand = \"--ttsmodel ttsmodel.bin --ttswavtokenizer ttswavtok.bin --ttsgpu\"\n", |
125 | 129 | "else:\n", |
126 | 130 | " TTSCommand = \"\"\n", |
| 131 | + "if EmbeddingsModel and LoadEmbeddingsModel:\n", |
| 132 | + " ECommand = \"--embeddingsmodel emodel.bin\"\n", |
| 133 | + "else:\n", |
| 134 | + " ECommand = \"\"\n", |
127 | 135 | "if FlashAttention:\n", |
128 | 136 | " FACommand = \"--flashattention\"\n", |
129 | 137 | "else:\n", |
|
152 | 160 | "if TTSCommand:\n", |
153 | 161 | " !aria2c -x 10 -o ttsmodel.bin --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $TTSModel\n", |
154 | 162 | " !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", |
155 | 165 | "\n", |
156 | 166 | "if MakeLocalTunnelFallback:\n", |
157 | 167 | " import urllib\n", |
|
165 | 175 | " print(f\"Please open the above link, and input the password '{ltpw}'\\nYour KoboldCpp will start shortly...\")\n", |
166 | 176 | " print(\"=================\")\n", |
167 | 177 | " !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" |
169 | 179 | ] |
170 | 180 | } |
171 | 181 | ], |
|
0 commit comments