Enable NUMA feature for llama_cpp_python (#4040)
This commit is contained in:
parent
87ea2d96fd
commit
7e6ff8d1f0
7 changed files with 21 additions and 12 deletions
|
@ -172,6 +172,7 @@ class LlamacppHF(PreTrainedModel):
|
|||
@classmethod
|
||||
def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.PathLike]], *model_args, **kwargs):
|
||||
assert len(model_args) == 0 and len(kwargs) == 0, "extra args is currently not supported"
|
||||
|
||||
if isinstance(pretrained_model_name_or_path, str):
|
||||
pretrained_model_name_or_path = Path(pretrained_model_name_or_path)
|
||||
|
||||
|
@ -198,6 +199,7 @@ class LlamacppHF(PreTrainedModel):
|
|||
'use_mlock': shared.args.mlock,
|
||||
'mul_mat_q': shared.args.mul_mat_q,
|
||||
'low_vram': shared.args.low_vram,
|
||||
'numa': shared.args.numa,
|
||||
'n_gpu_layers': shared.args.n_gpu_layers,
|
||||
'rope_freq_base': RoPE.get_rope_freq_base(shared.args.alpha_value, shared.args.rope_freq_base),
|
||||
'tensor_split': tensor_split_list,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue