Back to directory

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

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

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.