How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf ibm-granite/granite-3b-code-instruct-2k-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf ibm-granite/granite-3b-code-instruct-2k-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf ibm-granite/granite-3b-code-instruct-2k-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf ibm-granite/granite-3b-code-instruct-2k-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases
# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf ibm-granite/granite-3b-code-instruct-2k-GGUF:Q4_K_M
# Run inference directly in the terminal:
./llama-cli -hf ibm-granite/granite-3b-code-instruct-2k-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf ibm-granite/granite-3b-code-instruct-2k-GGUF:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama-cli -hf ibm-granite/granite-3b-code-instruct-2k-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ibm-granite/granite-3b-code-instruct-2k-GGUF:Q4_K_M
Quick Links

⚠️ DEPRECATION WARNING ⚠️

⚠️ NOT RECOMMENDED FOR USE IN NEW PROJECTS ⚠️

New applications/projects should use the latest mainline Granite language model family, whose code capabilities supercede this model. This model is being made available strictly for historical/scientific purposes. Please see our Granite Collections for the latest Granite releases.


image/png

ibm-granite/granite-3b-code-instruct-2k-GGUF

This is the Q4_K_M converted version of the original ibm-granite/granite-3b-code-instruct-2k. Refer to the original model card for more details.

Use with llama.cpp

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp

# install
make

# run generation
./main -m granite-3b-code-instruct-2k-GGUF/granite-3b-code-instruct.Q4_K_M.gguf -n 128 -p "def generate_random(x: int):" --color
Downloads last month
361
GGUF
Model size
3B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ibm-granite/granite-3b-code-instruct-2k-GGUF

Quantized
(16)
this model

Datasets used to train ibm-granite/granite-3b-code-instruct-2k-GGUF

Evaluation results