prompt_tuner.py now uses lazy loader and accelerate

This commit is contained in:
vfbd
2022-08-22 19:29:20 -04:00
parent 584056b6d5
commit 3d5c83fc23
3 changed files with 424 additions and 27 deletions

View File

@@ -22,6 +22,7 @@ except ImportError:
HAS_ACCELERATE = False
vars = None
args = None
num_shards: Optional[int] = None
current_shard = 0
from_pretrained_model_name = ""
@@ -35,6 +36,8 @@ named_buffers: Optional[List[tuple]] = None
default_sampler_order = [0, 1, 2, 3, 4, 5]
emit = None
#==================================================================#
# Decorator to prevent a function's actions from being run until
# at least x seconds have passed without the function being called