From 8d5a581d5d989fba6f93078a724a0e48f4ed2706 Mon Sep 17 00:00:00 2001 From: jojorne Date: Tue, 14 Mar 2023 04:04:01 -0300 Subject: [PATCH 1/3] Enable renaming deleting wi root folder by creating a new one --- koboldai_settings.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/koboldai_settings.py b/koboldai_settings.py index 95caec0c..a678e05e 100644 --- a/koboldai_settings.py +++ b/koboldai_settings.py @@ -2260,16 +2260,16 @@ class KoboldWorldInfo(object): self._socketio.emit("world_info_folder", {x: self.world_info_folder[x] for x in self.world_info_folder}, broadcast=True, room="UI_2") def delete_folder(self, folder): - if folder == "root": - raise Exception("removing the root folder is not supported") keys = [key for key in self.world_info] for key in keys: if self.world_info[key]['folder'] == folder: self.delete(key) if folder in self.world_info_folder: del self.world_info_folder[folder] + self.sync_world_info_to_old_format() if self._socketio is not None: self._socketio.emit("delete_world_info_folder", folder, broadcast=True, room="UI_2") + self._socketio.emit("world_info_folder", {x: self.world_info_folder[x] for x in self.world_info_folder}, broadcast=True, room="UI_2") logger.debug("Calcing AI Text from WI Folder Delete") ignore = self._koboldai_vars.calc_ai_text() @@ -2446,9 +2446,6 @@ class KoboldWorldInfo(object): self._socketio.emit("world_info_entry", self.world_info[uid], broadcast=True, room="UI_2") def delete(self, uid): - if self.world_info[uid]['folder'] == "root": - raise Exception("removing the root folder is not supported") - del self.world_info[uid] try: @@ -2470,8 +2467,6 @@ class KoboldWorldInfo(object): ignore = self._koboldai_vars.calc_ai_text() def rename_folder(self, old_folder, folder): - if old_folder == "root": - raise Exception("renaming the root folder is not supported") self.story_settings.gamesaved = False if folder in self.world_info_folder: i=0 @@ -2498,7 +2493,8 @@ class KoboldWorldInfo(object): self.story_settings.gamesaved = False self.sync_world_info_to_old_format() if self._socketio is not None: - self._socketio.emit("world_info_folder", {x: self.world_info_folder[x] for x in self.world_info_folder}, broadcast=True, room="UI_2") + self._socketio.emit("delete_world_info_folder", old_folder, broadcast=True, room="UI_2") + self.send_to_ui() def reorder(self, uid, before): self.add_item_to_folder(uid, self.world_info[before]['folder'], before=before) @@ -2576,6 +2572,11 @@ class KoboldWorldInfo(object): def sync_world_info_to_old_format(self): #Since the old UI uses world info entries for folders, we need to make some up + if "root" not in self.world_info_folder: + olf_world_info_folder = self.world_info_folder + self.world_info_folder = OrderedDict() + self.world_info_folder["root"] = [] + self.world_info_folder.update(olf_world_info_folder) folder_entries = {} i=-1 for folder in self.world_info_folder: From 8378ff9e2646c7b3d49546aad8c219361f88cf16 Mon Sep 17 00:00:00 2001 From: jojorne Date: Tue, 14 Mar 2023 04:20:32 -0300 Subject: [PATCH 2/3] Fix typo --- koboldai_settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koboldai_settings.py b/koboldai_settings.py index a678e05e..d1bc1e5d 100644 --- a/koboldai_settings.py +++ b/koboldai_settings.py @@ -2573,10 +2573,10 @@ class KoboldWorldInfo(object): def sync_world_info_to_old_format(self): #Since the old UI uses world info entries for folders, we need to make some up if "root" not in self.world_info_folder: - olf_world_info_folder = self.world_info_folder + old_world_info_folder = self.world_info_folder self.world_info_folder = OrderedDict() self.world_info_folder["root"] = [] - self.world_info_folder.update(olf_world_info_folder) + self.world_info_folder.update(old_world_info_folder) folder_entries = {} i=-1 for folder in self.world_info_folder: From 94eb8ff825979eba8d91b8cdea9f1fb048ea5dce Mon Sep 17 00:00:00 2001 From: henk717 Date: Sun, 19 Mar 2023 14:52:14 +0100 Subject: [PATCH 3/3] TPU Message --- colab/TPU.ipynb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/colab/TPU.ipynb b/colab/TPU.ipynb index 131b134a..e432b958 100644 --- a/colab/TPU.ipynb +++ b/colab/TPU.ipynb @@ -13,6 +13,19 @@ { "cell_type": "markdown", "source": [ + "# GOOGLE HAS BROKEN SUPPORT FOR MESH TRANSFORMERS JAX IN THEIR DRIVER, THIS MESSAGE WILL BE REMOVED ONCE THE NOTEBOOK WORKS AGAIN\n", + "---\n", + "Are you a developer familair with Jax? We could use some help.\n", + "Our Mesh Transformers Jax fork resides here (but unfortunately VE-Forbryderne has gone missing) : https://github.com/VE-FORBRYDERNE/mesh-transformer-jax\n", + "\n", + "This is combined with the TPU backend code you can find here: https://github.com/KoboldAI/KoboldAI-Client/blob/main/tpu_mtj_backend.py\n", + "\n", + "So far we know the driver initialization issues can be resolved when a newer version of Jax is used combined with a slight edit to tpu_mtj_backend.py to use Jax's built in code for driver intialization (Which is not present in the older version we currently use, hence that part being in our file).\n", + "\n", + "As far as we understand the issue is that xmap was broken in newer versions, and MTJ makes use of it. If someone can port this part of the code to be compatible with the newer Jax versions you can save this notebook!\n", + "\n", + "(Or Google, if you are reading this. Please reintroduce the old 0.1 compatibility since you broke an entire ecosystem of Mesh Transformers Jax users, which has historic value because it is the original implementation of GPT-J. There also do not seem to be alternatives that have the same amount of performance and model compatibility).\n", + "\n", "# Welcome to KoboldAI on Google Colab, TPU Edition!\n", "KoboldAI is a powerful and easy way to use a variety of AI based text generation experiences. You can use it to write stories, blog posts, play a text adventure game, use it like a chatbot and more! In some cases it might even help you with an assignment or programming task (But always make sure the information the AI mentions is correct, it loves to make stuff up).\n", "\n",