Fix ctransformers threads auto-detection (#3688)

This commit is contained in:
jllllll 2023-08-25 12:37:02 -05:00 committed by GitHub
parent 0bcecaa216
commit db42b365c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ class CtransformersModel:
config = AutoConfig.from_pretrained( config = AutoConfig.from_pretrained(
str(path), str(path),
threads=shared.args.threads, threads=shared.args.threads if shared.args.threads != 0 else -1,
gpu_layers=shared.args.n_gpu_layers, gpu_layers=shared.args.n_gpu_layers,
batch_size=shared.args.n_batch, batch_size=shared.args.n_batch,
context_length=shared.args.n_ctx, context_length=shared.args.n_ctx,