File size: 1,748 Bytes
f57d7c6
 
 
 
 
6317bb3
 
f57d7c6
46c2bfc
f57d7c6
 
 
 
 
 
 
 
 
 
6317bb3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7243d06
f57d7c6
 
6317bb3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f57d7c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "view-in-github"
      },
      "source": []
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "cellView": "form",
        "id": "uJS9i_Dltv8Y"
      },
      "outputs": [],
      "source": [
        "#@title <b>v-- Enter your model below and then click this to start Koboldcpp</b>\r\n",
        "\r\n",
        "Model = \"https://huggingface.co/TheBloke/Airoboros-L2-13B-2.2-GGUF/resolve/main/airoboros-l2-13b-2.2.Q4_K_M.gguf\" #@param [\"\"]{allow-input: true}\r\n",
        "Layers = 43 #@param [43]{allow-input: true}\r\n",
        "\r\n",
        "%cd /content\r\n",
        "!git clone https://github.com/LostRuins/koboldcpp\r\n",
        "%cd /content/koboldcpp\r\n",
        "!make LLAMA_CUBLAS=1\r\n",
        "\r\n",
        "!wget $Model -O model.ggml\r\n",
        "!wget -c https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64\r\n",
        "!chmod +x cloudflared-linux-amd64\r\n",
        "!nohup ./cloudflared-linux-amd64 tunnel --url http://localhost:5001 &\r\n",
        "!sleep 10\r\n",
        "!cat nohup.out\r\n",
        "!python koboldcpp.py model.ggml --usecublas 0 mmq --gpulayers $Layers --hordeconfig concedo\r\n"
      ]
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "authorship_tag": "",
      "gpuType": "T4",
      "include_colab_link": true,
      "private_outputs": true,
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}