LoRAAdapterSelection

Helpers & Utilities · AiDotNet.LoRA

Shared helper for selecting the active multi-LoRA task across a network’s MultiLoRAAdapter layers. Centralizes the “switch every adapter layer to task X” primitive so the inference-session path (AiModelResult) and the serving batcher use identical logic — one shared base, many small adapters.

Methods

Method Summary
bool HasMultiLoRAAdapters(NeuralNetworkBase<T> model) Gets a value indicating whether model has any multi-LoRA adapter layers.
int SelectTask(NeuralNetworkBase<T> model, string task) Switches every MultiLoRAAdapter layer in model to the given task.