> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runanywhere.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LoRA Adapters

> Layer an adapter onto the loaded base model

A LoRA adapter specialises a base model without swapping it out. Apply one, generate, remove
it. The base model stays loaded throughout, so switching behaviour costs far less than
switching models.

```dart theme={null}
await RunAnywhere.lora.apply('legal-summarizer');

final result = await RunAnywhere.llm.generate('Summarize this clause: …');

await RunAnywhere.lora.remove('legal-summarizer');
```

## The namespace

```dart theme={null}
Future<void> apply(String adapterId, {double? scale})
Future<void> remove([String? adapterId])
Future<void> removeAll()
```

## Scale

`scale` controls how strongly the adapter pulls the base model. Leave it unset for the
adapter's own default.

Lower values blend the adapter with base behaviour; higher values commit to it. If output
degrades after applying an adapter, scale is the first thing to turn down.

## Removing

```dart theme={null}
await RunAnywhere.lora.remove('legal-summarizer');
await RunAnywhere.lora.removeAll();
```

Removal is keyed by adapter id.

## Switching adapters

Adapters stack. Remove before applying another, or two of them fight and the output is worse
than either alone.

## The base model has to support it

An adapter is trained against a specific base model. Applying one to a different base either
fails or produces nonsense. Check the model's `supportsLora` flag before offering adapters in
your interface.

`remove` takes a **positional optional** adapter id. Omit it to remove the current adapter:

```dart theme={null}
await RunAnywhere.lora.remove();
```

Flutter exposes the short form only. Catalog management is available on the Swift and Electron
SDKs.
