ctransformers: add mlock and no-mmap options (#3649)
This commit is contained in:
parent
2da38e89e6
commit
e042bf8624
3 changed files with 7 additions and 3 deletions
|
|
@ -19,7 +19,9 @@ class CtransformersModel:
|
|||
gpu_layers=shared.args.n_gpu_layers,
|
||||
batch_size=shared.args.n_batch,
|
||||
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(
|
||||
|
|
|
|||
|
|
@ -101,7 +101,9 @@ loaders_and_params = OrderedDict({
|
|||
'n_gpu_layers',
|
||||
'n_batch',
|
||||
'threads',
|
||||
'model_type'
|
||||
'model_type',
|
||||
'no_mmap',
|
||||
'mlock'
|
||||
]
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue