This commit is contained in:
Sotirios Anagnostidis
2023-01-06 21:29:38 +01:00
parent 88ee3b3264
commit 148244455c
3 changed files with 21 additions and 20 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ def get_model(model_name, cache_dir, quantization):
if quantization is None:
model = AutoModelForCausalLM.from_pretrained(model_name, cache_dir=cache_dir)
elif quantization == "8bit":
print("Loading 8-bit model")
raise ValueError("Loading 8-bit model. Bitsandbytes does not behave so far...")
transformers.models.gptj.modeling_gptj.GPTJBlock = GPTJBlock
model = AutoModelForCausalLM.from_pretrained(model_name, cache_dir=cache_dir)
add_adapters(model)