Granite-4.0-H-Small
IBM's Apache-2.0 open-weight hybrid Mamba-2 and Transformer MoE model with 32B total and 9B active parameters, reducing long-context memory overhead for enterprise RAG, structured extraction, and function calling.
What you can do
- Low-KV-memory long-document extraction
- Enterprise workflow function calling
- Code completion and multilingual QA
Input & output
- Input
- Multilingual text prompts, RAG documents, code snippets, and tool schemas up to 128K+ tokens
- Output
- Structured enterprise answers, tool-call JSON payloads, summaries, and code completions
Try a prompt like this
Extract all SLA penalty clauses, notice periods, and liability caps from the attached vendor contract text and return them as a validated JSON array.
Things to know
Requires ~64GB VRAM in BF16 for all 32B weights, or ~20GB–34GB in INT4/FP8 quantization on a single 24GB–48GB GPU; requires Mamba-2 compatible vLLM or transformers runtimes, Apache 2.0 licensed.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/chat/completions- Model repo ID
ibm-granite/granite-4.0-h-small
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
response = client.chat.completions.create(
model="ibm-granite/granite-4.0-h-small",
messages=[{"role": "user", "content": "Extract all SLA penalty clauses, notice periods, and liability caps from the attached vendor contract text and return them as a validated JSON array."}],
)
print(response.choices[0].message.content)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide