Add parameter to Colab for not using google drive (data would be ephemeral)

This commit is contained in:
ebolam 2022-10-19 11:05:17 -04:00
parent f8be854e09
commit 73865ba066
2 changed files with 14 additions and 2 deletions

View File

@ -70,10 +70,16 @@
"Model = \"Nerys 2.7B\" #@param [\"Nerys 2.7B\", \"AID 2.7B\", \"Erebus 2.7B\", \"Janeway 2.7B\", \"Picard 2.7B\", \"Horni LN 2.7B\", \"Horni 2.7B\", \"Shinen 2.7B\", \"OPT 2.7B\", \"Fairseq Dense 2.7B\", \"Neo 2.7B\"] {allow-input: true}\n", "Model = \"Nerys 2.7B\" #@param [\"Nerys 2.7B\", \"AID 2.7B\", \"Erebus 2.7B\", \"Janeway 2.7B\", \"Picard 2.7B\", \"Horni LN 2.7B\", \"Horni 2.7B\", \"Shinen 2.7B\", \"OPT 2.7B\", \"Fairseq Dense 2.7B\", \"Neo 2.7B\"] {allow-input: true}\n",
"Version = \"Official\" #@param [\"Official\", \"United\"] {allow-input: true}\n", "Version = \"Official\" #@param [\"Official\", \"United\"] {allow-input: true}\n",
"Provider = \"Localtunnel\" #@param [\"Localtunnel\", \"Cloudflare\"]\n", "Provider = \"Localtunnel\" #@param [\"Localtunnel\", \"Cloudflare\"]\n",
"use_google_drive = True #@param {type:\"boolean\"}\n",
"\n", "\n",
"!nvidia-smi\n", "!nvidia-smi\n",
"from google.colab import drive\n", "from google.colab import drive\n",
"drive.mount('/content/drive/')\n", "if use_google_drive:\n",
" drive.mount('/content/drive/')\n",
"else:\n",
" import os\n",
" os.mkdir(\"/content/drive\")\n",
" os.mkdir(\"/content/drive/MyDrive/\")\n",
"\n", "\n",
"if Model == \"Nerys 2.7B\":\n", "if Model == \"Nerys 2.7B\":\n",
" Model = \"KoboldAI/fairseq-dense-2.7B-Nerys\"\n", " Model = \"KoboldAI/fairseq-dense-2.7B-Nerys\"\n",

View File

@ -69,6 +69,7 @@
"Model = \"Nerys 13B V2\" #@param [\"Nerys 13B V2\", \"Erebus 13B\", \"Janeway 13B\", \"Shinen 13B\", \"Skein 20B\", \"Erebus 20B\", \"Skein 6B\", \"Janeway 6B\", \"Adventure 6B\", \"Shinen 6B\", \"Lit V2 6B\", \"Lit 6B\", \"NeoX 20B\", \"OPT 13B\", \"Fairseq Dense 13B\", \"GPT-J-6B\"] {allow-input: true}\n", "Model = \"Nerys 13B V2\" #@param [\"Nerys 13B V2\", \"Erebus 13B\", \"Janeway 13B\", \"Shinen 13B\", \"Skein 20B\", \"Erebus 20B\", \"Skein 6B\", \"Janeway 6B\", \"Adventure 6B\", \"Shinen 6B\", \"Lit V2 6B\", \"Lit 6B\", \"NeoX 20B\", \"OPT 13B\", \"Fairseq Dense 13B\", \"GPT-J-6B\"] {allow-input: true}\n",
"Version = \"Official\" #@param [\"Official\", \"United\"] {allow-input: true}\n", "Version = \"Official\" #@param [\"Official\", \"United\"] {allow-input: true}\n",
"Provider = \"Localtunnel\" #@param [\"Localtunnel\", \"Cloudflare\"]\n", "Provider = \"Localtunnel\" #@param [\"Localtunnel\", \"Cloudflare\"]\n",
"use_google_drive = True #@param {type:\"boolean\"}\n",
"\n", "\n",
"import os\n", "import os\n",
"try:\n", "try:\n",
@ -79,7 +80,12 @@
" raise RuntimeError(\"⚠You can not run this notebook without the TPU accelerator, go to Runtime->Sessions, terminate your session and then try again.⚠️\")\n", " raise RuntimeError(\"⚠You can not run this notebook without the TPU accelerator, go to Runtime->Sessions, terminate your session and then try again.⚠️\")\n",
"print('Now we will need your Google Drive to store settings and saves, you must login with the same account you used for Colab.')\n", "print('Now we will need your Google Drive to store settings and saves, you must login with the same account you used for Colab.')\n",
"from google.colab import drive\n", "from google.colab import drive\n",
"drive.mount('/content/drive/')\n", "if use_google_drive:\n",
" drive.mount('/content/drive/')\n",
"else:\n",
" import os\n",
" os.mkdir(\"/content/drive\")\n",
" os.mkdir(\"/content/drive/MyDrive/\")\n",
"\n", "\n",
"if Model == \"Janeway 13B\":\n", "if Model == \"Janeway 13B\":\n",
" Model = \"KoboldAI/fairseq-dense-13B-Janeway\"\n", " Model = \"KoboldAI/fairseq-dense-13B-Janeway\"\n",