How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ibm-granite/granite-3b-code-base-2k-GGUF"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "ibm-granite/granite-3b-code-base-2k-GGUF",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Use Docker
docker model run hf.co/ibm-granite/granite-3b-code-base-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-base-2k-GGUF

This is the Q4_K_M converted version of the original ibm-granite/granite-3b-code-base-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-base-2k-GGUF/granite-3b-code-base.Q4_K_M.gguf -n 128 -p "def generate_random(x: int):" --color
Downloads last month
133
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

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

Evaluation results