|
3 | 3 | {
|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {
|
6 |
| - "colab_type": "text", |
7 |
| - "id": "view-in-github" |
| 6 | + "id": "view-in-github", |
| 7 | + "colab_type": "text" |
8 | 8 | },
|
9 | 9 | "source": [
|
10 | 10 | "<a href=\"https://colab.research.google.com/github/LostRuins/koboldcpp/blob/concedo/colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
11 | 11 | ]
|
12 | 12 | },
|
13 | 13 | {
|
14 | 14 | "cell_type": "markdown",
|
15 |
| - "metadata": {}, |
| 15 | + "metadata": { |
| 16 | + "id": "2FCn5tmpn3UV" |
| 17 | + }, |
16 | 18 | "source": [
|
17 |
| - "## Welcome to the Official KoboldCpp Colab Notebook\r\n", |
18 |
| - "It's really easy to get started. Just press the two **Play** buttons below, and then connect to the **Cloudflare URL** shown at the end. \r\n", |
19 |
| - "You can select a model from the dropdown, or enter a **custom URL** to a GGUF model (Example: `https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter-GGUF/resolve/main/LLaMA2-13B-Tiefighter.Q4_K_M.gguf`)" |
| 19 | + "## Welcome to the Official KoboldCpp Colab Notebook\n", |
| 20 | + "It's really easy to get started. Just press the two **Play** buttons below, and then connect to the **Cloudflare URL** shown at the end.\n", |
| 21 | + "You can select a model from the dropdown, or enter a **custom URL** to a GGUF model (Example: `https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter-GGUF/resolve/main/LLaMA2-13B-Tiefighter.Q4_K_M.gguf`)\n", |
| 22 | + "\n", |
| 23 | + "**Keep this page open and occationally check for captcha's so that your AI is not shut down**" |
20 | 24 | ]
|
21 | 25 | },
|
22 | 26 | {
|
23 | 27 | "cell_type": "code",
|
24 | 28 | "execution_count": null,
|
25 |
| - "metadata": {}, |
| 29 | + "metadata": { |
| 30 | + "id": "QNaj3u0jn3UW" |
| 31 | + }, |
26 | 32 | "outputs": [],
|
27 | 33 | "source": [
|
28 |
| - "#@title <-- Tap this if you play on Mobile { display-mode: \"form\" }\r\n", |
29 |
| - "%%html\r\n", |
30 |
| - "<b>Press play on the music player to keep the tab alive, then start KoboldCpp below</b><br/>\r\n", |
| 34 | + "#@title <-- Tap this if you play on Mobile { display-mode: \"form\" }\n", |
| 35 | + "%%html\n", |
| 36 | + "<b>Press play on the music player to keep the tab alive, then start KoboldCpp below</b><br/>\n", |
31 | 37 | "<audio src=\"https://raw.githubusercontent.com/KoboldAI/KoboldAI-Client/main/colab/silence.m4a\" controls>"
|
32 | 38 | ]
|
33 | 39 | },
|
|
40 | 46 | },
|
41 | 47 | "outputs": [],
|
42 | 48 | "source": [
|
43 |
| - "#@title <b>v-- Enter your model below and then click this to start Koboldcpp</b>\r\n", |
44 |
| - "\r\n", |
45 |
| - "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", |
46 |
| - "Layers = 43 #@param [43]{allow-input: true}\r\n", |
47 |
| - "ContextSize = 4096 #@param [4096] {allow-input: true}\r\n", |
48 |
| - "\r\n", |
49 |
| - "%cd /content\r\n", |
50 |
| - "!git clone https://github.com/LostRuins/koboldcpp\r\n", |
51 |
| - "%cd /content/koboldcpp\r\n", |
52 |
| - "kvers = !(cat koboldcpp.py | grep 'KcppVersion = ' | cut -d '\"' -f2)\r\n", |
53 |
| - "kvers = kvers[0]\r\n", |
54 |
| - "!echo Finding prebuilt binary for {kvers}\r\n", |
55 |
| - "!wget -O dlfile.tmp -c https://kcppcolab.concedo.workers.dev/?{kvers} && mv dlfile.tmp koboldcpp_cublas.so\r\n", |
56 |
| - "!test -f koboldcpp_cublas.so && echo Prebuilt Binary Exists || echo Prebuilt Binary Does Not Exist\r\n", |
57 |
| - "!test -f koboldcpp_cublas.so && echo Build Skipped || make koboldcpp_cublas LLAMA_CUBLAS=1\r\n", |
58 |
| - "!cp koboldcpp_cublas.so koboldcpp_cublas.dat\r\n", |
59 |
| - "!wget $Model -O model.ggml\r\n", |
60 |
| - "!python koboldcpp.py model.ggml --usecublas 0 mmq --multiuser --gpulayers $Layers --contextsize $ContextSize --hordeconfig concedo 1 1 --remotetunnel\r\n" |
| 49 | + "#@title <b>v-- Enter your model below and then click this to start Koboldcpp</b>\n", |
| 50 | + "\n", |
| 51 | + "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", |
| 52 | + "Layers = 43 #@param [43]{allow-input: true}\n", |
| 53 | + "ContextSize = 4096 #@param [4096] {allow-input: true}\n", |
| 54 | + "\n", |
| 55 | + "import os\n", |
| 56 | + "if not os.path.isfile(\"/opt/bin/nvidia-smi\"):\n", |
| 57 | + " 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", |
| 58 | + "\n", |
| 59 | + "%cd /content\n", |
| 60 | + "!git clone https://github.com/LostRuins/koboldcpp\n", |
| 61 | + "%cd /content/koboldcpp\n", |
| 62 | + "kvers = !(cat koboldcpp.py | grep 'KcppVersion = ' | cut -d '\"' -f2)\n", |
| 63 | + "kvers = kvers[0]\n", |
| 64 | + "!echo Finding prebuilt binary for {kvers}\n", |
| 65 | + "!wget -O dlfile.tmp -c https://kcppcolab.concedo.workers.dev/?{kvers} && mv dlfile.tmp koboldcpp_cublas.so\n", |
| 66 | + "!test -f koboldcpp_cublas.so && echo Prebuilt Binary Exists || echo Prebuilt Binary Does Not Exist\n", |
| 67 | + "!test -f koboldcpp_cublas.so && echo Build Skipped || make koboldcpp_cublas LLAMA_CUBLAS=1\n", |
| 68 | + "!cp koboldcpp_cublas.so koboldcpp_cublas.dat\n", |
| 69 | + "!apt install aria2 -y\n", |
| 70 | + "!aria2c -x 10 -o model.ggml --allow-overwrite=true --file-allocation=none $Model\n", |
| 71 | + "!python koboldcpp.py model.ggml --usecublas 0 mmq --multiuser --gpulayers $Layers --contextsize $ContextSize --hordeconfig concedo 1 1 --remotetunnel\n" |
61 | 72 | ]
|
62 | 73 | }
|
63 | 74 | ],
|
64 | 75 | "metadata": {
|
65 | 76 | "accelerator": "GPU",
|
66 | 77 | "colab": {
|
67 |
| - "authorship_tag": "", |
68 | 78 | "gpuType": "T4",
|
69 |
| - "include_colab_link": true, |
70 | 79 | "private_outputs": true,
|
71 |
| - "provenance": [] |
| 80 | + "provenance": [], |
| 81 | + "cell_execution_strategy": "setup", |
| 82 | + "include_colab_link": true |
72 | 83 | },
|
73 | 84 | "kernelspec": {
|
74 | 85 | "display_name": "Python 3",
|
|
0 commit comments