mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-01-28 16:20:25 +01:00
Use AutoModelForCausalLM for custom models with a model_type
This commit is contained in:
parent
18fa742b02
commit
231621e7c2
@ -487,7 +487,7 @@ if(not vars.model in ["InferKit", "Colab", "OAI", "ReadOnly"]):
|
||||
model_config = open(vars.custmodpth + "/config.json", "r")
|
||||
js = json.load(model_config)
|
||||
if("model_type" in js):
|
||||
model = vars.custmodpth
|
||||
model = AutoModelForCausalLM.from_pretrained(vars.custmodpth)
|
||||
else:
|
||||
model = GPTNeoForCausalLM.from_pretrained(vars.custmodpth)
|
||||
tokenizer = GPT2Tokenizer.from_pretrained(vars.custmodpth)
|
||||
|
Loading…
x
Reference in New Issue
Block a user