Granite Code Models by IBM Research
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 DeveloperIBM TechXchange CommunityIBM 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 DeveloperIBM 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.
Use when the workload needs 8k context and 20B parameters.
Use when the workload needs 8k context and 3B parameters.
| Model | Use when | Released | Signals | Status |
|---|---|---|---|---|
| Granite 20B Code | Use when the workload needs 8k context and 20B parameters. | 2024-05 | 8k context20B parameters | Current |
| Granite 3B Code | Use when the workload needs 8k context and 3B parameters. | 2024-05 | 8k context3B parameters | Current |
Release Timeline
1 release groupSpecifications(4 models)
| Model | Released | Context | Parameters |
|---|---|---|---|
| Granite 20B Code | 2024-05 | 8k | 20B |
| Granite 3B Code | 2024-05 | 8k | 3B |
Available From(3 providers)
Pricing
| Model | Provider | Input / 1M | Output / 1M | Type |
|---|---|---|---|---|
| Granite 20B Code | IBM watsonx | $0.6 | $0.6 | Serverless |
| Granite 3B Code | IBM watsonx | $0.6 | $0.6 | Serverless |
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.






