Introducing Granite Libraries and Project Granite Switch - IBM ResearchTry out everything today:<br>Granite Switch: Compose adapter functions into a deployable model<br>Granite Libraries: Browse and download adapter functions for RAG, safety, and core capabilities<br>Mellea: Call adapter functions as typed Python functions<br>Granite 4.1 models: The base models that power it all
It wasn’t that long ago that the state of the art in AI was generating you an image that sort of looked like the thing you’d asked for. In the interceding years, we’ve seen a Cambrian explosion of capabilities, with AI that can now generate flawless text, run mission-critical enterprise workflows, or orchestrate agents to run entire apps autonomously.
But even with all these advances, the ways we build and interact with AI models is quite different than any other piece of software. Enterprise users want their models to be as accurate and efficient as possible, but getting there is often out of reach for most developers. One reason is that up until now, it’s been incredibly difficult to break AI models down into the same kinds of plug-and-play building blocks we use for traditional software.
A modern software application is made up of smaller, self-contained pieces that work together, rather like an object composed of many LEGO bricks, instead of one giant block of clay. When something breaks, an engineer can find the offending module, fix it, test it, and redeploy — without touching the rest of the codebase. Capabilities are separated behind various interfaces, and part of the app can be developed by different teams, tested against their specifications, and replaced as needed. The application may serve one purpose, but its internals are not an undifferentiated mass.
Today's LLMs are modern marvels, able to answer questions about the capitals of countries as easily as they can decipher an earnings report. But every capability is diffused across the entire collection of parameter weights. To change the way the model reacts to a given situation, you either need to retrain the whole thing, or write extremely detailed and accurate prompts. None of these are quick solutions, and none of them allow multiple teams to work together to improve AI models just like they improve software systems.
IBM Research has been working on technologies that bring the rigor and modularity of software engineering to LLMs through an approach called generative computing.
“Models are just code with data, just a lot more data than code,” said Luis Lastras, IBM Research’s director of language and multimodal models. “We haven’t learned the lessons of software for LLMs — we can build pieces separately.”
IBM is launching a set of coordinated tools that bring us closer to the vision of generative computing. The idea of software modularity was the spark for Granite Libraries , a collection of adapters that can customize AI models for specialized tasks. It enables a model to quickly execute targeted tasks without having to retrain the entire model. The core idea is the “adapter function,” which has a defined input and output, like a function in a software library.
An adapter function in this context is a small model adapter that’s trained to generate a different type of output than a traditional model. Instead of producing open-ended text, these adapter functions carry out a specific task, whether that’s scoring a document for relevance, rewriting a query, detecting a hallucination, or making a safety decision.
The team is also introducing Project Granite Switch , a toolkit for existing model architectures that enables them to dynamically manage the specialized components found in Granite Libraries. Coupled with the recently released models in Granite 4.1, and Mellea, IBM’s open-source library for generative computing, developers now have a tool that turns unpredictable text generation into a reliable, deterministic programming function.
Introducing Granite Libraries
Granite Libraries is designed to bring the same kind of customization to AI models that has made software so powerful.
IBM has released three libraries designed to support common enterprise workflows. The RAG Library includes adapters for key retrieval-augmented generation tasks such as query rewriting, answerability assessment, hallucination detection, and citation generation. The Core Library provides foundational capabilities, including requirement checks, certainty scoring, and contextual attribution. Rounding out the release, the Guardian Library enables models to perform in-line safety, factuality and policy checks directly, without a separate guardrail model. These Granite Libraries are available for all Granite 4.1 models.
Because these libraries are modular and independently trained, enterprises can adopt them as needed and add more capabilities incrementally, a bit like how software dependencies are managed today.
Each adapter function is trained to be an expert at one task. The requirement...