> ## 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.

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

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

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

## The namespace

```ts theme={null}
lora.apply(adapterId: string, scale?: number): Promise<void>
lora.remove(adapterId: string | null): Promise<void>
lora.removeAll(): Promise<void>
lora.list(): Promise<LoraState>
```

## 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

```ts 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.

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

Adapters are small compared with the base model, often a few megabytes, which makes them a
practical way to ship several behaviours in a browser without several downloads.
