diff --git a/colab.ipynb b/colab.ipynb index 00ec94461..0f77f5ee0 100644 --- a/colab.ipynb +++ b/colab.ipynb @@ -3,8 +3,8 @@ { "cell_type": "markdown", "metadata": { - "id": "view-in-github", - "colab_type": "text" + "colab_type": "text", + "id": "view-in-github" }, "source": [ "\"Open" @@ -46,40 +46,40 @@ }, "outputs": [], "source": [ - "#@title v-- Enter your model below and then click this to start Koboldcpp\n", - "\n", - "Model = \"https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter-GGUF/resolve/main/LLaMA2-13B-Tiefighter.Q4_K_M.gguf\" #@param [\"https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter-GGUF/resolve/main/LLaMA2-13B-Tiefighter.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/MythoMax-L2-13B-GGUF/resolve/main/mythomax-l2-13b.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/ReMM-SLERP-L2-13B-GGUF/resolve/main/remm-slerp-l2-13b.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/Xwin-LM-13B-v0.2-GGUF/resolve/main/xwin-lm-13b-v0.2.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/Stheno-L2-13B-GGUF/resolve/main/stheno-l2-13b.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_S.gguf\"]{allow-input: true}\n", - "Layers = 43 #@param [43]{allow-input: true}\n", - "ContextSize = 4096 #@param [4096] {allow-input: true}\n", - "\n", - "import os\n", - "if not os.path.isfile(\"/opt/bin/nvidia-smi\"):\n", - " raise RuntimeError(\"⚠️Colab did not give you a GPU due to usage limits, this can take a few hours before they let you back in. Check out https://lite.koboldai.net for a free alternative (that does not provide an API link but can load KoboldAI saves and chat cards) or subscribe to Colab Pro for immediate access.⚠️\")\n", - "\n", - "%cd /content\n", - "!git clone https://github.com/LostRuins/koboldcpp\n", - "%cd /content/koboldcpp\n", - "kvers = !(cat koboldcpp.py | grep 'KcppVersion = ' | cut -d '\"' -f2)\n", - "kvers = kvers[0]\n", - "!echo Finding prebuilt binary for {kvers}\n", - "!wget -O dlfile.tmp -c https://kcppcolab.concedo.workers.dev/?{kvers} && mv dlfile.tmp koboldcpp_cublas.so\n", - "!test -f koboldcpp_cublas.so && echo Prebuilt Binary Exists || echo Prebuilt Binary Does Not Exist\n", - "!test -f koboldcpp_cublas.so && echo Build Skipped || make koboldcpp_cublas LLAMA_CUBLAS=1\n", - "!cp koboldcpp_cublas.so koboldcpp_cublas.dat\n", - "!apt install aria2 -y\n", - "!aria2c -x 10 -o model.ggml --allow-overwrite=true --file-allocation=none $Model\n", - "!python koboldcpp.py model.ggml --usecublas 0 mmq --multiuser --gpulayers $Layers --contextsize $ContextSize --hordeconfig concedo 1 1 --remotetunnel\n" + "#@title v-- Enter your model below and then click this to start Koboldcpp\r\n", + "\r\n", + "Model = \"https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter-GGUF/resolve/main/LLaMA2-13B-Tiefighter.Q4_K_M.gguf\" #@param [\"https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter-GGUF/resolve/main/LLaMA2-13B-Tiefighter.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/MythoMax-L2-13B-GGUF/resolve/main/mythomax-l2-13b.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/ReMM-SLERP-L2-13B-GGUF/resolve/main/remm-slerp-l2-13b.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/Xwin-LM-13B-v0.2-GGUF/resolve/main/xwin-lm-13b-v0.2.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/Stheno-L2-13B-GGUF/resolve/main/stheno-l2-13b.Q4_K_M.gguf\",\"https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_S.gguf\"]{allow-input: true}\r\n", + "Layers = 43 #@param [43]{allow-input: true}\r\n", + "ContextSize = 4096 #@param [4096] {allow-input: true}\r\n", + "\r\n", + "import os\r\n", + "if not os.path.isfile(\"/opt/bin/nvidia-smi\"):\r\n", + " raise RuntimeError(\"⚠️Colab did not give you a GPU due to usage limits, this can take a few hours before they let you back in. Check out https://lite.koboldai.net for a free alternative (that does not provide an API link but can load KoboldAI saves and chat cards) or subscribe to Colab Pro for immediate access.⚠️\")\r\n", + "\r\n", + "%cd /content\r\n", + "!git clone https://github.com/LostRuins/koboldcpp\r\n", + "%cd /content/koboldcpp\r\n", + "kvers = !(cat koboldcpp.py | grep 'KcppVersion = ' | cut -d '\"' -f2)\r\n", + "kvers = kvers[0]\r\n", + "!echo Finding prebuilt binary for {kvers}\r\n", + "!wget -O dlfile.tmp https://kcppcolab.concedo.workers.dev/?{kvers} && mv dlfile.tmp koboldcpp_cublas.so\r\n", + "!test -f koboldcpp_cublas.so && echo Prebuilt Binary Exists || echo Prebuilt Binary Does Not Exist\r\n", + "!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 --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" ] } ], "metadata": { "accelerator": "GPU", "colab": { - "gpuType": "T4", - "private_outputs": true, - "provenance": [], "cell_execution_strategy": "setup", - "include_colab_link": true + "gpuType": "T4", + "include_colab_link": true, + "private_outputs": true, + "provenance": [] }, "kernelspec": { "display_name": "Python 3", @@ -91,4 +91,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file