| Tutorial | Format | Description |
|---|---|---|
| Hello Adapter | Script | Minimal adapter invocation (HuggingFace) |
| Hello Mellea | Notebook | Mellea intrinsics intro (vLLM) |
| Guide | Description |
|---|---|
| Using Mellea with Granite Switch | Connect Mellea to a Granite Switch model |
| Bring Your Own Adapter | Train, compose, and use custom adapters |
Best for: Understanding how Granite Switch works at the control-token level
The HuggingFace examples show how adapters are activated via control tokens. This is useful for understanding the underlying mechanics, but for actual inference, use Mellea (Path 2), which provides constrained decoding, prompt formatting, and proper input/output processing.
- Prerequisites
- Hello Adapter — see control tokens in action
- Granite Switch with HuggingFace — detailed walkthrough
Best for: All inference use cases — development through production
Mellea is the correct way to invoke Granite Switch capabilities. It handles constrained decoding, prompt rewriting, and input/output processing automatically. Currently supports vLLM; HuggingFace support coming soon.
- Prerequisites
- Hello Mellea
- RAG Pipeline — full RAG with ChromaDB
Before running inference, you need a composed Granite Switch model. Options:
- Use pre-composed models from HuggingFace (recommended for getting started)
- Compose your own — see Compose Your Checkpoint
Best for: Custom adapter development
Interactive Jupyter tutorials in notebooks/:
| Notebook | Topics | Duration |
|---|---|---|
| 01_granite_switch_with_hf.ipynb | Compose + HuggingFace backend, adapter_name= invocation, Core + Guardian adapters in a multi-turn conversation |
20 min |
| 02_govt_rag_pipeline.ipynb | Full RAG pipeline, ChromaDB, Guardian | 30 min |
| 03_compose_granite_switch.ipynb | Compose a checkpoint from adapter libraries | 15 min |
| Resource | Description |
|---|---|
| Mellea | IBM's library for writing Generative Programs |
| Granite aLoRA Adapters | Official adapter libraries on HuggingFace |
| vLLM Documentation | High-performance inference |
| Granite Models | Base Granite models |
For technical details, see docs/:
- Supported Models — Model compatibility
- Git Workflow — Contribution guidelines