llama_lora_remove: Remove a LoRA adapter from context

View source: R/llama.R

llama_lora_removeR Documentation

Remove a LoRA adapter from context

Description

Deactivates a specific LoRA adapter from the context.

Usage

llama_lora_remove(ctx, lora)

Arguments

ctx

Context handle returned by [llama_new_context]

lora

LoRA adapter handle to remove

Value

An integer scalar: 0 on success, -1 if the adapter was not applied to this context.

Examples

## Not run: 
# Remove a specific adapter while keeping others active
llama_lora_remove(ctx, lora)
result <- llama_generate(ctx, "Without adapter: ", max_new_tokens = 20L)

## End(Not run)

llamaR documentation built on May 28, 2026, 1:06 a.m.