| llama_lora_load | R Documentation |
Loads a LoRA (Low-Rank Adaptation) adapter file that can be applied to modify the model's behavior without changing the base weights.
llama_lora_load(model, path)
model |
Model handle returned by [llama_load_model] |
path |
Path to the LoRA adapter file (.gguf or .bin) |
An external pointer (class externalptr) wrapping the loaded
LoRA (Low-Rank Adaptation) adapter. Pass this handle to
llama_lora_apply to activate the adapter.
## Not run:
model <- llama_load_model("base-model.gguf")
lora <- llama_lora_load(model, "fine-tuned-adapter.gguf")
ctx <- llama_new_context(model)
llama_lora_apply(ctx, lora, scale = 1.0)
# Now generation uses the LoRA-modified model
result <- llama_generate(ctx, "Hello")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.