[!NOTE] This repository contains models that have been converted to the GGUF format with various quantizations from an IBM Granite base model.
Please reference the base model's full model card here: https://huggingface.co/ibm-granite/granite-4.0-h-350m-base
The examples below use the Q8_0 quantization (granite-4.0-h-350m-base-Q8_0.gguf). Other quantizations in this repository work the same way; only the file name changes. See the llama.cpp documentation for complete usage and options, including the llama cli and llama serve flag references.
example: llama cli
Start an interactive chat:
llama cli -m granite-4.0-h-350m-base-Q8_0.gguf
Or run a single prompt and exit:
llama cli -m granite-4.0-h-350m-base-Q8_0.gguf -p "Explain what a GGUF file is in two sentences." --single-turn
example: llama serve using OpenAI API
llama serve -m granite-4.0-h-350m-base-Q8_0.gguf \
--port 8080
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "user", "content": "Explain what a GGUF file is in two sentences." }
]
}'
The response is a JSON message with the generated text in the choices[0].message.content field.
Set the context length explicitly with -c / --ctx-size. While this model can support arbitrarily long context since it does not use positional embeddings, it was trained on text up to 32k, so we recommend limiting context to 32768 at runtime.
llama cli -m granite-4.0-h-350m-base-Q8_0.gguf -c 32768
llama serve -m granite-4.0-h-350m-base-Q8_0.gguf -c 32768 --port 8080
b117985.20.2