From 1433b7c0eabcc797dac8e68e9acc3043b9a28e12 Mon Sep 17 00:00:00 2001 From: mrq Date: Thu, 23 Feb 2023 07:28:27 +0000 Subject: [PATCH] working Embedding override --- codes/torch_intermediary/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codes/torch_intermediary/__init__.py b/codes/torch_intermediary/__init__.py index 70556a2c..d220cd3b 100644 --- a/codes/torch_intermediary/__init__.py +++ b/codes/torch_intermediary/__init__.py @@ -18,11 +18,11 @@ OVERRIDE_ADAM = False # True OVERRIDE_ADAMW = False # True """ -USE_STABLE_EMBEDDING = True +USE_STABLE_EMBEDDING = False try: import bitsandbytes as bnb OVERRIDE_LINEAR = False - OVERRIDE_EMBEDDING = False + OVERRIDE_EMBEDDING = True OVERRIDE_ADAM = True OVERRIDE_ADAMW = True except Exception as e: @@ -40,7 +40,7 @@ if OVERRIDE_EMBEDDING: if USE_STABLE_EMBEDDING: from bitsandbytes.nn import StableEmbedding as Embedding else: - from bitsandbytes.nn import Embedding as Embedding + from bitsandbytes.nn.modules import Embedding as Embedding else: from torch.nn import Embedding