From 7d120f2794b21ea02a12a026472bfc730701f344 Mon Sep 17 00:00:00 2001 From: teddybear082 <87204721+teddybear082@users.noreply.github.com> Date: Tue, 24 Oct 2023 05:13:01 -0400 Subject: [PATCH] Add context size parameter to google colab notebook (#489) -add configurable context size to parameters along with models and layers for ease of use -this can already be done with a simple edit by experienced llm users but new users may not know this is a parameter they should set. Co-authored-by: LostRuins <39025047+LostRuins@users.noreply.github.com> --- colab.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/colab.ipynb b/colab.ipynb index f91d6a2cd..b7806d7ef 100644 --- a/colab.ipynb +++ b/colab.ipynb @@ -44,6 +44,7 @@ "\r\n", "Model = \"https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter-GGUF/resolve/main/LLaMA2-13B-Tiefighter.Q4_K_M.gguf\" #@param [\"\"]{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", "%cd /content\r\n", "!git clone https://github.com/LostRuins/koboldcpp\r\n", @@ -58,11 +59,10 @@ "!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", - "!rm nohup.out\r\n", "!nohup ./cloudflared-linux-amd64 tunnel --url http://localhost:5001 &\r\n", "!sleep 8\r\n", "!cat nohup.out\r\n", - "!python koboldcpp.py model.ggml --usecublas 0 mmq --multiuser --gpulayers $Layers --contextsize 4096 --hordeconfig concedo 1 1 --onready \"echo Connect to the link below && cat nohup.out | grep trycloudflare.com\"\r\n" + "!python koboldcpp.py model.ggml --usecublas 0 mmq --multiuser --gpulayers $Layers --contextsize $ContextSize --hordeconfig concedo 1 1 --onready \"echo Connect to the link below && cat nohup.out | grep trycloudflare.com && rm nohup.out\"\r\n" ] } ],