Blog

IBM Granite 4.1 8B Is Now Available in Puter.js

On this page

Puter.js now supports Granite 4.1 8B, IBM's latest dense, decoder-only language model built for enterprise workloads.

What is Granite 4.1 8B?

Granite 4.1 8B is the mid-size member of IBM's Granite 4.1 family, released April 30, 2026 under the Apache 2.0 license. It's designed for the kind of workloads enterprises actually run in production: tool calling, retrieval-augmented generation, code generation, summarization, and classification. The model ships with a 131K-token context window and native support for 12 languages including English, German, Spanish, French, Japanese, and Chinese.

Despite its compact 8B parameter count, the model consistently matches or outperforms IBM's previous-generation 32B Mixture-of-Experts flagship across benchmarks—scoring 69.0 on ArenaHard, 68.3 on BFCL V3 for tool calling, and 92.5 on GSM8K. Its dense architecture also makes it considerably easier to fine-tune for downstream tasks than MoE alternatives. The model implements OpenAI-compatible tool calling and supports fill-in-the-middle for code completion.

Examples

Basic Chat

puter.ai.chat("Explain why dense transformers are easier to fine-tune than MoE models", {
    model: "ibm-granite/granite-4.1-8b"
})

Tool Calling

puter.ai.chat("What's the weather in San Francisco?", {
    model: "ibm-granite/granite-4.1-8b",
    tools: [{
        type: "function",
        function: {
            name: "get_weather",
            description: "Get the current weather for a location",
            parameters: {
                type: "object",
                properties: {
                    location: { type: "string", description: "City name" }
                },
                required: ["location"]
            }
        }
    }]
})

Code Generation

puter.ai.chat(`Write a Python function that takes a list of log lines,
parses out timestamps and severity levels, and returns the
top 5 most frequent error messages from the last hour`, {
    model: "ibm-granite/granite-4.1-8b"
})

Multilingual Summarization

puter.ai.chat("Fasse diesen Quartalsbericht auf Deutsch in fünf Stichpunkten zusammen:\n\n" + reportText, {
    model: "ibm-granite/granite-4.1-8b"
})

Streaming Response

const response = await puter.ai.chat(
    "Draft an internal RFC for migrating a legacy auth service to OAuth 2.1",
    { model: "ibm-granite/granite-4.1-8b", stream: true }
);

for await (const part of response) {
    puter.print(part?.text);
}

Get Started Now

Just add one library to your project:

// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';

Or add one script tag to your HTML:

<script src="https://js.puter.com/v2/"></script>

No API keys or account needed. Start building with Granite 4.1 8B immediately.

Learn more:

Free, Serverless AI and Cloud

Start creating powerful web applications with Puter.js in seconds!

Get Started Now

Read the Docs Try the Playground