class

Llama::AdapterLora

Inherits Reference / Object

Wrapper for the llama_adapter_lora structure

This class represents a LoRA (Low-Rank Adaptation) adapter that can be applied to a model to modify its behavior without changing the original weights.

Constructors

new(model : Model, path : String)

Creates a new LoRA adapter from a file

Parameters:

  • model: The Model to load the adapter for
  • path: Path to the LoRA adapter file

Raises:

  • Llama::AdapterLora::Error if the adapter cannot be loaded
Source

Instance methods

finalize

Frees the resources associated with this adapter

Source
to_unsafe

Returns the raw pointer to the underlying llama_adapter_lora structure

Source

Nested types