GR

granite-8b-code-instruct

GraniteGGUF by ibm-graniteUpdated 2026-04-25
Download on Hugging Face
Parameters8.05B
Context4K
Layers36
Architecturellama
Smallest quant4.9 GB
Quick answer

granite-8b-code-instruct needs about 6.6 GB of memory at Q4_K_M (a 4.9 GB file) with an 8K context window, so it fits on a 8 GB GPU.

Granite‑8B‑Code‑Instruct – a code‑centric LLM for instruction following

Granite‑8B‑Code‑Instruct is a 8.05‑billion‑parameter decoder‑only model focused on code generation and instruction compliance. It is trained on 4 trillion code tokens and 500 billion mixed‑domain tokens. The model is provided in a Q4_K_M GGUF file for efficient inference.

Good at

  • Code generation
  • Instruction following
  • Code explanation

Limits

  • No vision support
  • Limited to 4 k context
  • Not recommended for new projects

Best for

  • Generating code snippets
  • Fixing bugs via instructions
  • Creating unit tests

Who it’s for. Developers and researchers needing a historical reference model for code tasks. It is suitable for academic studies or legacy system compatibility, not for production deployments.

Quants & memory

QuantFileEst. memoryvs VRAMResultDownload
Q4_K_M4.9 GB 6.0 GB
Fits Get file →

For 8 GB VRAM, use the Q4_K_M quantized file (4.88 GB). It requires approximately 6.6 GB of VRAM at 8 k context. For 4 GB VRAM, a lower‑precision quant would be needed, but no such file is provided here.

What GPU do you need for granite-8b-code-instruct?

These figures add the file size, an fp16 KV cache at an 8K context window (worked out from this model’s own header) and about 0.5 GB for the runtime. They are estimates, so leave a little headroom, and expect to use less context or a smaller quant if you are right at the limit.

  • 4 GB VRAM: no quant fits at an 8K context.
  • 6 GB VRAM: no quant fits at an 8K context.
  • 8 GB VRAM: the best quant that fits is Q4_K_M (4.9 GB file, about 6.6 GB in use).

Which granite-8b-code-instruct quant should you choose?

Q4_K_M is the usual starting point for granite-8b-code-instruct: it balances file size and quality well. Here it is a 4.9 GB file.

New to quant names? Read GGUF quantization explained.

Specifications

Architecture from the GGUF header

Architecturellama
Parameters8.05B
Layers36
Trained context4,096 tokens
KV cache (fp16)144 KB per token

Source

Quantized byibm-granite
FamilyGranite
Licenseapache-2.0
Downloads (HF)3,372
Last updated2026-04-25

Frequently asked questions about granite-8b-code-instruct

How much VRAM does granite-8b-code-instruct need?

About 6.6 GB at Q4_K_M with an 8K context window. That is the 4.9 GB file, plus the KV cache and roughly 0.5 GB of runtime overhead. Smaller quants need less and longer context needs more.

Can I run granite-8b-code-instruct on an 8 GB GPU?

Yes, with Q4_K_M: the 4.9 GB file needs about 6.6 GB at 8K context. Larger quants in this repository do not fit in 8 GB.

What is the file size of granite-8b-code-instruct GGUF?

It depends on the quant: Q4_K_M is 4.9 GB.

What context length does granite-8b-code-instruct support?

The GGUF header lists a trained context length of 4,096 tokens (4K). The KV cache grows with the context you use: about 1.2 GB at 8K and 0.6 GB at 4K.

Where can I download granite-8b-code-instruct GGUF?

The files are on Hugging Face in the ibm-granite/granite-8b-code-instruct-4k-GGUF repository. The download buttons on this page open the file on Hugging Face. ggufmodels.com does not host any model files.

What license does granite-8b-code-instruct use?

Hugging Face lists the license as apache-2.0. Licenses can differ between the quantized files and the original model, so check the repository and the base model before commercial use.

Can I run Granite‑8B‑Code‑Instruct on 8 GB VRAM?

Yes, the Q4_K_M file is 4.88 GB and needs about 6.6 GB of VRAM at 8 k context.

Is this model suitable for new production projects?

No, the model has a deprecation warning and is not recommended for new projects.

What context length does this model support?

It supports a maximum of 4 k tokens.

Other GGUFs of granite-8b-code-base-4k

Similar models

Browse all →

More from ibm-granite

All by ibm-granite →

More Granite models

All Granite →

Other small models

All small models →