Skip to content

Commit 265ba38

Browse files
committed
Rename a file, add deprecation warning for --load-in-4bit
1 parent 3da73e4 commit 265ba38

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
File renamed without changes.

modules/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def load_model(model_name):
8989

9090
# Quantized model
9191
elif shared.args.gptq_bits > 0:
92-
from modules.quant_loader import load_quantized
92+
from modules.GPTQ_loader import load_quantized
9393

9494
model = load_quantized(model_name)
9595

modules/shared.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def str2bool(v):
6969
parser.add_argument('--cai-chat', action='store_true', help='Launch the web UI in chat mode with a style similar to Character.AI\'s. If the file img_bot.png or img_bot.jpg exists in the same folder as server.py, this image will be used as the bot\'s profile picture. Similarly, img_me.png or img_me.jpg will be used as your profile picture.')
7070
parser.add_argument('--cpu', action='store_true', help='Use the CPU to generate text.')
7171
parser.add_argument('--load-in-8bit', action='store_true', help='Load the model with 8-bit precision.')
72+
parser.add_argument('--load-in-4bit', action='store_true', help='DEPRECATED: use --gptq-bits 4 instead.')
7273
parser.add_argument('--gptq-bits', type=int, default=0, help='Load a pre-quantized model with specified precision. 2, 3, 4 and 8bit are supported. Currently only works with LLaMA and OPT.')
7374
parser.add_argument('--gptq-model-type', type=str, help='Model type of pre-quantized model. Currently only LLaMa and OPT are supported.')
7475
parser.add_argument('--bf16', action='store_true', help='Load the model with bfloat16 precision. Requires NVIDIA Ampere GPU.')
@@ -95,3 +96,8 @@ def str2bool(v):
9596
parser.add_argument('--auto-launch', action='store_true', default=False, help='Open the web UI in the default browser upon launch.')
9697
parser.add_argument('--verbose', action='store_true', help='Print the prompts to the terminal.')
9798
args = parser.parse_args()
99+
100+
# Provisional, this will be deleted later
101+
if args.load_in_4bit:
102+
print("Warning: --load-in-4bit is deprecated and will be removed. Use --gptq-bits 4 instead.\n")
103+
args.gptq_bits = 4

0 commit comments

Comments
 (0)