Update GPTQ_Loader.py

Correcting decoder layer for renamed class.
This commit is contained in:
askmyteapot 2023-03-17 18:34:13 +10:00 committed by GitHub
parent ee164d1821
commit 53b6a66beb
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,7 @@ def load_quantized(model_name):
max_memory[i] = f"{shared.args.gpu_memory[i]}GiB" max_memory[i] = f"{shared.args.gpu_memory[i]}GiB"
max_memory['cpu'] = f"{shared.args.cpu_memory or '99'}GiB" max_memory['cpu'] = f"{shared.args.cpu_memory or '99'}GiB"
device_map = accelerate.infer_auto_device_map(model, max_memory=max_memory, no_split_module_classes=["LLaMADecoderLayer"]) device_map = accelerate.infer_auto_device_map(model, max_memory=max_memory, no_split_module_classes=["LlamaDecoderLayer"])
model = accelerate.dispatch_model(model, device_map=device_map) model = accelerate.dispatch_model(model, device_map=device_map)
# Single GPU # Single GPU