mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Remove device=0 because of incompatibility
Device=0 breaks some of the pytorch implementations, removed to restore hardware compatibility to 0.16 levels.
This commit is contained in:
@@ -638,7 +638,7 @@ if(not vars.model in ["InferKit", "Colab", "OAI", "ReadOnly"]):
|
|||||||
tokenizer = GPT2Tokenizer.from_pretrained(vars.model)
|
tokenizer = GPT2Tokenizer.from_pretrained(vars.model)
|
||||||
if(vars.hascuda):
|
if(vars.hascuda):
|
||||||
if(vars.usegpu):
|
if(vars.usegpu):
|
||||||
model = AutoModelForCausalLM.from_pretrained(vars.model, device=0)
|
model = AutoModelForCausalLM.from_pretrained(vars.model)
|
||||||
vars.modeldim = get_hidden_size_from_model(model)
|
vars.modeldim = get_hidden_size_from_model(model)
|
||||||
model = model.to(0)
|
model = model.to(0)
|
||||||
generator = model.generate
|
generator = model.generate
|
||||||
|
Reference in New Issue
Block a user