From 7717168676cd8866307ee574a42c69a691c8ecad Mon Sep 17 00:00:00 2001 From: Gnome Ann <> Date: Fri, 20 Aug 2021 10:52:57 -0400 Subject: [PATCH] Only allow --breakmodel if it's supported --- aiserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aiserver.py b/aiserver.py index 263b863b..a8f65445 100644 --- a/aiserver.py +++ b/aiserver.py @@ -205,7 +205,7 @@ if(not vars.model in ["InferKit", "Colab", "OAI", "ReadOnly"]): if(args.cpu): vars.usegpu = False vars.breakmodel = False - if(args.breakmodel): + if(vars.bmsupported and args.breakmodel): vars.usegpu = False vars.breakmodel = True elif(vars.hascuda): @@ -387,7 +387,7 @@ if(not vars.model in ["InferKit", "Colab", "OAI", "ReadOnly"]): model.transformer.wte.to(breakmodel.gpu_device) model.transformer.ln_f.to(breakmodel.gpu_device) gc.collect() - if(args.breakmodel): + if(vars.bmsupported and args.breakmodel): breakmodel.ram_blocks = max(0, min(n_layers, args.breakmodel)) else: print(colors.CYAN + "\nHow many layers would you like to put into system RAM?") @@ -435,7 +435,7 @@ if(not vars.model in ["InferKit", "Colab", "OAI", "ReadOnly"]): model.transformer.wte.to(breakmodel.gpu_device) model.transformer.ln_f.to(breakmodel.gpu_device) gc.collect() - if(args.breakmodel): + if(vars.bmsupported and args.breakmodel): breakmodel.ram_blocks = max(0, min(n_layers, args.breakmodel)) else: print(colors.CYAN + "\nHow many layers would you like to put into system RAM?")