Skip to content
llmmodels
Chat LLMOpen weights

granite-8b-code-instruct-4k

by IBM · Apr 26, 2024

granite-8b-code-instruct-4k is an open-weight chat llm from IBM, released Apr 26, 2024. It has 8.1B parameters.

Provider
IBM
Released
Apr 26, 2024
Type
Chat LLM
Parameters
8.1B
Context window
—
Max output
—
Input
text
Output
text
Weights
Open weights
License
apache-2.0
Knowledge cutoff
—
Status
Open weights
HF downloads (30d)
1.1K

How to run granite-8b-code-instruct-4k

granite-8b-code-instruct-4k is an open-weight model published on Hugging Face as ibm-granite/granite-8b-code-instruct-4k. Run it locally with Ollama, LM Studio or llama.cpp (quantized GGUF builds), or serve it on GPUs with vLLM, SGLang or Hugging Face TGI. At 8.1B parameters it needs roughly 5 GB of memory at 4-bit quantization.

granite-8b-code-instruct-4k vs alternatives

Alternatives to granite-8b-code-instruct-4k
ModelProviderReleasedParamsContextInput $/1MOutput $/1MECI
Llama-3.1-8B-InstructopenMetaJul 20248B128K$0.02$0.04110.9
Llama 3-8BopenMetaApr 20248B———109.1
Gemma 7BopenGoogle DeepMindFeb 20248.5B———103.2
Gemma 2 9BopenGoogle DeepMindJun 20249.2B———112.4
Yi-9Bopen01.AIMar 20248.8B———102.2
Qwen/Qwen2.5-7B-InstructopenAlibaba (Qwen)Sep 20247.6B33K$0.05$0.05—
Mistral NemoopenMistral AIJul 202412B128K$0.029$0.03113.9
Qwen2.5-7BopenAlibaba (Qwen)Sep 20247.6B————

More models from IBM

All IBM models →
ModelReleasedParamsContextInput $/1MOutput $/1M
Granite 4.2 8BopenAug 20268.8B128K$0.06$0.15
granite-embedding-small-english-r2openJul 202548M———
granite-4.1-3bopenApr 20263.4B———
granite-embedding-97m-multilingual-r2openApr 202697M———
granite-speech-4.1-2b-naropenMar 20262.3B———
Granite-4.0-H-SmallopenOct 202532B128K$0.064$0.265
granite-embedding-311m-multilingual-r2openApr 2026312M———
granite-vision-4.1-4bopenApr 20264B———

Frequently asked questions

Who made granite-8b-code-instruct-4k?

granite-8b-code-instruct-4k was developed by IBM (United States). It was released on Apr 26, 2024.

Is granite-8b-code-instruct-4k open source?

Yes. granite-8b-code-instruct-4k's weights are publicly available under the apache-2.0 license on Hugging Face (ibm-granite/granite-8b-code-instruct-4k), so you can download and run it yourself.

How many parameters does granite-8b-code-instruct-4k have?

granite-8b-code-instruct-4k has 8.1B parameters.

Sources: huggingface · huggingface. Last updated 2026-11-22.