Skip to content

docs(iOS): add LoRA adapters usage section#51

Closed
iamstuffed wants to merge 1 commit into
mainfrom
docs/lora-adapters
Closed

docs(iOS): add LoRA adapters usage section#51
iamstuffed wants to merge 1 commit into
mainfrom
docs/lora-adapters

Conversation

@iamstuffed

Copy link
Copy Markdown
Contributor

Adds a LoRA Adapters section to the iOS examples README (see leap-android-sdk PR #274 for the API).

  • Load-at-init via LiquidInferenceEngineOptions(loraAdapters:)
  • Runtime swap/clear via setLoraAdapters([...]) / setLoraAdapters([])
  • Independent per-adapter scales (need not sum to 1)
  • Memory/caching lifecycle: adapters stay resident per loaded model until unload(); clearing only deactivates

Document the LoRA adapter API in the iOS examples README: load-at-init via
LiquidInferenceEngineOptions, runtime swap/clear via setLoraAdapters, independent
per-adapter scales (need not sum to 1), and the memory/caching lifecycle (adapters
stay resident per loaded model until unload; clearing only deactivates).
Copilot AI review requested due to automatic review settings June 29, 2026 09:09
@iamstuffed

Copy link
Copy Markdown
Contributor Author

Deferring until a LeapSDK release ships the LoRA adapter API — the examples pin an exact published SDK version, so this would reference an API not yet in any release. Will reopen/re-add after the version that includes leap-android-sdk #274 is published.

@iamstuffed iamstuffed closed this Jun 29, 2026
@iamstuffed iamstuffed deleted the docs/lora-adapters branch June 29, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation to the iOS examples README describing how to use LoRA (Low-Rank Adaptation) adapters with LeapSDK model runners.

Changes:

  • Documented loading LoRA adapters at model initialization via LiquidInferenceEngineOptions(loraAdapters:).
  • Documented runtime adapter replacement/clearing via setLoraAdapters([...]) / setLoraAdapters([]).
  • Added guidance on per-adapter scaling and adapter memory/caching behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread iOS/README.md
Comment on lines +237 to +238
> LoRA is supported on the llama.cpp backend (`.gguf` checkpoints). The ExecuTorch (`.bundle`) and
> LFM2-audio backends do not support adapter swaps.
Comment thread iOS/README.md
Comment on lines +240 to +248
**Load adapters when the model loads** (sideloaded GGUF via `LiquidInferenceEngineOptions`):

```swift
let options = LiquidInferenceEngineOptions(
bundlePath: modelURL.path,
loraAdapters: [LoraAdapterConfig(path: adapterURL.path, scale: 1.0)]
)
let runner = try await LiquidInferenceEngineRunner.create(options: options)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants