Granite Switch
A Python toolkit for composing pretrained LoRA adapter functions into one deployable model, so capabilities such as RAG, safety and factuality can be combined, swapped or upgraded like software libraries.
Granite Switch lets you choose adapter functions for tasks such as RAG, safety and factuality and compose them into a single model, deployed with one command. Each adapter function is a LoRA adapter trained to a specific input-output contract, with its output schema enforced at the token level, which is what makes them composable rather than general-purpose text generators.
It is built on Activated LoRA (aLoRA), which lets all adapter functions in a deployment share one KV cache and activate on demand, so one deployment serves many capabilities without added memory or latency. Independently developed adapter functions, whether IBM's or a user's own, can be swapped or upgraded without retraining. It installs with pip and deploys through vLLM for production or Hugging Face for prototyping, requiring Python 3.10+ and PyTorch 2.0+.