ctransformers: add mlock and no-mmap options (#3649)

This commit is contained in:
cal066 2023-08-22 19:51:34 +00:00 committed by GitHub
parent 2da38e89e6
commit e042bf8624
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View file

@ -19,7 +19,9 @@ class CtransformersModel:
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,
stream=True stream=True,
mmap=not shared.args.no_mmap,
mlock=shared.args.mlock
) )
self.model = AutoModelForCausalLM.from_pretrained( self.model = AutoModelForCausalLM.from_pretrained(

View file

@ -101,7 +101,9 @@ loaders_and_params = OrderedDict({
'n_gpu_layers', 'n_gpu_layers',
'n_batch', 'n_batch',
'threads', 'threads',
'model_type' 'model_type',
'no_mmap',
'mlock'
] ]
}) })

View file

@ -42,4 +42,4 @@ https://github.com/jllllll/GPTQ-for-LLaMa-CUDA/releases/download/0.1.0/gptq_for_
https://github.com/jllllll/GPTQ-for-LLaMa-CUDA/releases/download/0.1.0/gptq_for_llama-0.1.0+cu117-cp310-cp310-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/jllllll/GPTQ-for-LLaMa-CUDA/releases/download/0.1.0/gptq_for_llama-0.1.0+cu117-cp310-cp310-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64"
# ctransformers # ctransformers
https://github.com/jllllll/ctransformers-cuBLAS-wheels/releases/download/AVX2/ctransformers-0.2.22+cu117-py3-none-any.whl https://github.com/jllllll/ctransformers-cuBLAS-wheels/releases/download/AVX2/ctransformers-0.2.23+cu117-py3-none-any.whl