llama.adapter

Undocumented in source.

Members

Functions

loadAdapterLora
LlamaAdapterLora loadAdapterLora(LlamaModel model, string path)

Load a LoRA adapter from a GGUF file. Check if (adapter) after loading.

setAdaptersLora
int setAdaptersLora(LlamaContext ctx, llama_adapter_lora*[] adapters, float[] scales)

Apply a set of LoRA adapters to a context. adapters is a slice of raw C pointers (use adapter.ptr on each LlamaAdapterLora). scales must have the same length as adapters. Pass an empty slice to clear all adapters. Returns 0 on success.

Structs

LlamaAdapterLora
struct LlamaAdapterLora

A LoRA adapter loaded from a GGUF file. Freed automatically on destruction; you may also call free() early. The associated model must remain alive for the adapter's lifetime.

Meta