LLM Reference

Granite Code Models by IBM Research

4 models2024Up to 8k ctxFrom $0.6/1M input

About

The IBM Granite Code model family, a subset of the Granite 3.0 series, is designed to enhance enterprise-level coding tasks by leveraging generative AI. These models prioritize efficient code generation, debugging, and explanation, helping developers save time on repetitive and complex tasks. Covering over 116 programming languages, including legacy ones like COBOL, the models aim to modernize and simplify software development. Key functionalities include code completion, refactoring, error explanation, and translating legacy code to modern languages, enabling faster development cycles and seamless integration into enterprise workflows​ IBM Developer​IBM TechXchange Community​IBM Research. Granite Code models also address challenges in enterprise adoption of generative AI by being resource-efficient and privacy-conscious. With various model sizes, they cater to a broad range of applications, from lightweight on-device deployments to more intensive cloud-based use cases. IBM emphasizes trust and compliance, training the models on permissively licensed datasets and adhering to strict AI ethics principles, which ensure enterprise-grade safety and robustness​ IBM Developer​IBM TechXchange Community. Further distinguishing the Granite Code models is their open-source approach, promoting collaboration and innovation. IBM's decision to open-source these models reflects a commitment to fostering a community-driven ecosystem. By integrating advanced techniques like speculative decoding, these models achieve superior performance on benchmarks like HumanEval and RepoBench, excelling in tasks like code synthesis and debugging. This capability positions Granite as a leading solution for AI-assisted enterprise software development​ IBM TechXchange Community

Current Variants

Use-when guidance is derived from seed capabilities, context, release, and replacement fields.

2 in view2 retired

Use when the workload needs 8k context and 20B parameters.

2024-058k context20B parameters

Use when the workload needs 8k context and 3B parameters.

2024-058k context3B parameters

Release Timeline

1 release group
2024-05
2 current · 2 retired
Granite 20B Code
8k context20B parameters
Current
Granite 34B Code
8k context34B parameters
Archived
Granite 3B Code
8k context3B parameters
Current
Granite 8B Code
8k context8B parameters
Archived

Specifications(4 models)

Granite Code model specifications comparison
ModelReleasedContextParameters
Granite 20B Code2024-058k20B
Granite 3B Code2024-058k3B

Available From(3 providers)

Pricing

Granite Code model pricing by provider
ModelProviderInput / 1MOutput / 1MType
Granite 20B CodeIBM watsonx$0.6$0.6Serverless
Granite 3B CodeIBM watsonx$0.6$0.6Serverless

Frequently Asked Questions

What is Granite Code used for?
Granite Code is used for coding. The family description and listed model capabilities point to those workloads as the best fit.
How does Granite Code compare to Granite 4?
Granite Code by IBM Research is strongest where you need coding, while Granite 4 by IBM Research is the closest related family to check for audio. Granite Code has 4 listed variants and reaches up to 8k context, while Granite 4 reaches up to 131k context, so compare the specs and pricing tables before choosing a production model.
Which Granite Code model should I use?
For the lowest listed input price, start with Granite 34B Code through IBM watsonx at $0.6/1M input tokens. For the most capable/latest local choice, evaluate Granite 20B Code with 8k context.

Models(4)