llama_apply_lora_from_file method

int llama_apply_lora_from_file(
  1. Pointer<llama_context> ctx,
  2. Pointer<Char> path_lora,
  3. double scale,
  4. Pointer<Char> path_base_model,
  5. int n_threads,
)

Apply a LoRA adapter to a loaded model path_base_model is the path to a higher quality model to use as a base for the layers modified by the adapter. Can be NULL to use the current loaded model. The model needs to be reloaded before applying a new adapter, otherwise the adapter will be applied on top of the previous one Returns 0 on success

Implementation

int llama_apply_lora_from_file(
  ffi.Pointer<llama_context> ctx,
  ffi.Pointer<ffi.Char> path_lora,
  double scale,
  ffi.Pointer<ffi.Char> path_base_model,
  int n_threads,
) {
  return _llama_apply_lora_from_file(
    ctx,
    path_lora,
    scale,
    path_base_model,
    n_threads,
  );
}