10 Downloads Updated 3 days ago
ollama run mrutkows/granite4.1-switch:8b
Updated 3 days ago
3 days ago
b0900f26a8b4 · 6.4GB
📝 Read the launch blog: Granite Switch 4.1.1: Update models like you update software
Granite Switch 4.1.1 is a modular LLM that composes a base model, multiple adapters and an encoder together so that a single hosted endpoint can move between natural-language responses, general and specialized decisions, and speech-to-text. Adapters are activated on demand via control tokens in the chat template.
Granite Switch 4.1.1 is available in two sizes:
ibm/granite4.1-switch:8bibm/granite4.1-switch:30b (128K context)Both sizes embed the same components:
decision (aLoRA, general-purpose Decisions) and guardian-core (aLoRA, from granitelib-guardian-r1.0)ibm-granite/granite-speech-5.0-470m-turboctc (English, French, German, Spanish, Portuguese, Italian, Japanese)Granite Switch GGUFs unify four distinct capabilities in a single model file:
1. Base Language Model: Open-ended conversational generation, instruction following, and reasoning.
2. Decision aLoRA Adapter: Softmax probability classification over arbitrary questions, choices, or ranked levels.
3. Guardian Core aLoRA Adapter: Safety moderation across harm, bias, profanity, and unethical prompts.
4. Speech-to-Text Audio Encoder: Multilingual ASR (granite-speech-5.0-470m-turboctc) for direct voice transcription.
Current Ollama Runtime Limitations:
- Decision Mode Only: Ollama identifies graniteswitch architecture metadata as a Decision Model (Capability: decision). In Ollama, the model exclusively executes the decision evaluation pipeline via the --ask flag.
- No Open-Ended Chat in Ollama: Ollama’s /api/chat and /api/generate endpoints reject graniteswitch models (does not support chat / generate).
- No Audio Ingestion in Ollama: Ollama does not pass audio waveform inputs or inject adapter control tokens (adapter_name="speech"), so the embedded audio encoder cannot be invoked via ollama run.
Pass the context text via standard input and ask a binary question:
echo "The sky appears blue because molecules in Earth's atmosphere scatter sunlight in all directions. Blue light is scattered more than other colors because it travels as shorter, smaller waves." | ollama run mrutkows/granite4.1-switch:8b-q4_K_M --ask "Does the atmosphere scatter blue light?"
Output:
yes 100%
--choice)Classify context across multiple defined choices:
echo "The sky appears blue because molecules in Earth's atmosphere scatter sunlight in all directions. Red and yellow wavelengths pass straight through." | ollama run mrutkows/granite4.1-switch:8b-q4_K_M --ask "Which color is scattered most?" --choice blue="Blue light" --choice red="Red light" --choice yellow="Yellow light"
Output:
blue 100%
Start an interactive decision session without piping input, then submit multiple prompts sequentially:
ollama run mrutkows/granite4.1-switch:8b-q4_K_M \
--ask "What color is this fruit?" \
--choice red="Red" \
--choice yellow="Yellow" \
--choice orange="Orange" \
--choice green="Green"
Interactive Session Example:
>>> A ripe banana
yellow 95%
>>> A fresh juicy strawberry
red 100%
>>> A sweet juicy tangerine
orange 89%
>>> A crisp Granny Smith apple
green 97%
To use Granite Switch beyond Ollama’s decision mode — including full conversational generation, dynamic aLoRA adapter routing (decision, guardian-core), and multimodal speech-to-text — download the standalone GGUF files directly from Hugging Face or serve the model with vLLM / Transformers:
| Switch Component | Description |
|---|---|
| Guardian Core aLoRA | Detects safety risks: harm, jailbreaking, profanity, violence, sexual content, social bias, unethical behavior |
| Decision aLoRA | Given a state + a question with labelled options, returns a softmax probability distribution over the option labels in one forward pass |
| Granite Speech 5.0 TurboCTC Encoder | A multilingual ASR model for fast speech-to-text transcription |
Granite Switch uses coarse-grained expert switching — one adapter is active across all layers for a contiguous span of tokens. A lightweight switch layer detects control tokens in the input and produces per-position adapter indices that tell every decoder layer which LoRA weights to apply.
English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese (inherited from Granite 4.1). Speech input supports English, French, German, Spanish, Portuguese, Italian and Japanese.
This model inherits the safety profile of the base Granite 4.1 model. The embedded guardian-core adapter provides an additional safety layer but is not a substitute for application-level safety testing. Deployers should test adapter behavior on their specific use cases, apply appropriate content filtering for their domain, and treat the decision adapter’s option probabilities as a prior to inform a decision, not a certified classification, on domains it wasn’t trained for.