MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / llama_set_adapters_lora

Function llama_set_adapters_lora

llama_cpp/llama_cpp.py:2177–2185  ·  view source on GitHub ↗

Set LoRA adapters on the context if they differ from the current adapters.

(
    ctx: llama_context_p,
    adapters: Optional[CtypesArray[llama_adapter_lora_p_ctypes]],
    n_adapters: int,
    scales: Optional[CtypesArray[ctypes.c_float]],
    /,
)

Source from the content-addressed store, hash-verified

2175 ctypes.c_int32,
2176)
2177def llama_set_adapters_lora(
2178 ctx: llama_context_p,
2179 adapters: Optional[CtypesArray[llama_adapter_lora_p_ctypes]],
2180 n_adapters: int,
2181 scales: Optional[CtypesArray[ctypes.c_float]],
2182 /,
2183) -> int:
2184 """Set LoRA adapters on the context if they differ from the current adapters."""
2185 ...
2186
2187
2188# Deprecated compatibility wrapper for the renamed llama_set_adapters_lora().

Callers 1

llama_set_adapter_loraFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…