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

```swift theme={null}
try await RunAnywhere.lora.apply(adapterId: "legal-summarizer")

let result = try await RunAnywhere.llm.generate(prompt: "Summarize this clause: …")

try await RunAnywhere.lora.remove(adapterId: "legal-summarizer")
```

## The namespace

```swift theme={null}
func apply(adapterId: String, scale: Float? = nil) async throws
func remove(adapterId: String) async throws
func removeAll() async throws
func list() async throws -> 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

```swift theme={null}
try await RunAnywhere.lora.remove(adapterId: "legal-summarizer")
try 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.

## Catalog management

Swift carries the full catalog surface beyond the four short-form methods:

```swift theme={null}
try await RunAnywhere.lora.register(entry)
try await RunAnywhere.lora.listCatalog()
try await RunAnywhere.lora.queryCatalog(query)
try await RunAnywhere.lora.adaptersForModel("qwen3-0.6b")
try await RunAnywhere.lora.allRegistered()
await RunAnywhere.lora.checkCompatibility(config)
try await RunAnywhere.lora.state()
```

`adaptersForModel` is the one to build an interface around: it answers "what can I apply to
what is loaded right now".
