gptj 8bit

This commit is contained in:
Sotirios Anagnostidis
2023-01-05 00:33:16 +01:00
parent b7aef29a48
commit dfaa00dccc
5 changed files with 215 additions and 5 deletions
@@ -0,0 +1,8 @@
from transformers import AutoModelForCausalLM
from .gptj import get_model as get_gptj_model
def get_specific_model(model_name, cache_dir, quantization):
if "gpt-j" in model_name.lower():
return get_gptj_model(model_name, cache_dir, quantization)
else:
return AutoModelForCausalLM.from_pretrained(conf.model_name, cache_dir=conf.cache_dir)