{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "ColabKobold Code", "provenance": [], "authorship_tag": "ABX9TyOuIHmyxj4U9dipAib4hfIi", "include_colab_link": true }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" }, "accelerator": "TPU" }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "view-in-github", "colab_type": "text" }, "source": [ "\"Open" ] }, { "cell_type": "markdown", "source": [ "# ColabKobold VSCode Edition\n", "This is a special edition of ColabKobold aimed at developers, it will not start a KoboldAI instance for you to play KoboldAI and instead will launch a fully functional copy of VSCode for easy development.\n", "\n", "Few things of note:\n", "1. Make sure the desired (or no) accelertor is selected on Colab, you do not want a TPU ban for not using it.\n", "1. The Version can be replaced with your github URL and appended with -b for the branch for example \"https://github.com/henk717/koboldai -b united\" dependencies will automatically be installed from requirements.txt or requirements_mtj.txt.\n", "1. With the args you can specify launch options for the KoboldAI Deployment Script, this way you can easily preinstall models to your development instance so you have a model to test with. To install TPU requirements specify the -m TPUMeshTransformerGPTJ argument.\n", "1. You will need an Ngrok auth token which you can obtain here : https://dashboard.ngrok.com/get-started/your-authtoken\n", "1. KoboldAI is installed in /content/koboldai-client opening this folder is enough to automatically get full git history and revision support. Also keep in mind that it mounts your Google Drive, be careful comitting directly from this instance.\n", "1. With Ctrl + Shift + ` you can get a terminal to launch KoboldAI with your own parameters, launching with --colab is recommended.\n", "\n", "# [If you are not a developer and are looking to use KoboldAI click here](https://henk.tech/colabkobold)" ], "metadata": { "id": "hMRnGz42Xsy3" } }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "40B1QvI3Xv02" }, "outputs": [], "source": [ "#@title VSCode Server\n", "Version = \"United\" #@param [\"Official\", \"United\"] {allow-input: true}\n", "Args = \"-m TPUMeshTransformerGPTJ -a https://api.wandb.ai/files/ve-forbryderne/skein/files/gpt-j-6b-skein-jax/aria2.txt\" #@param {type:\"string\"}\n", "Authtoken = \"\" #@param {type:\"string\"}\n", "\n", "from google.colab import drive\n", "drive.mount('/content/drive/')\n", "\n", "!wget https://henk.tech/ckds -O - | bash /dev/stdin -g $Version -i only $Args\n", "\n", "!pip install colabcode\n", "from colabcode import ColabCode\n", "ColabCode(authtoken=Authtoken)" ] } ] }