Instructions to use tinyopsec/granite-4.2-3b-Heretic-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tinyopsec/granite-4.2-3b-Heretic-GGUF with 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 tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf tinyopsec/granite-4.2-3b-Heretic-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 tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf tinyopsec/granite-4.2-3b-Heretic-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 tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf tinyopsec/granite-4.2-3b-Heretic-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 tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M
Use Docker
docker model run hf.co/tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use tinyopsec/granite-4.2-3b-Heretic-GGUF with Ollama:
ollama run hf.co/tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use tinyopsec/granite-4.2-3b-Heretic-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use tinyopsec/granite-4.2-3b-Heretic-GGUF with Docker Model Runner:
docker model run hf.co/tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M
- Lemonade
How to use tinyopsec/granite-4.2-3b-Heretic-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.granite-4.2-3b-Heretic-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use tinyopsec/granite-4.2-3b-Heretic-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use tinyopsec/granite-4.2-3b-Heretic-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "tinyopsec/granite-4.2-3b-Heretic-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Granite 4.2 3B Heretic — GGUF
GGUF quantized versions of tinyopsec/granite-4.2-3b-Heretic — a representation-edited derivative of IBM Granite 4.2 3B.
These files are ready for CPU and GPU inference with llama.cpp, Ollama, LM Studio, Jan, and other GGUF-compatible runtimes.
Available Quantizations
| File | Quant | Size | Notes |
|---|---|---|---|
granite-4.2-3b-Heretic-Q5_K_M.gguf |
Q5_K_M | 2.61 GB | Recommended — solid quality/size trade-off |
granite-4.2-3b-Heretic-Q6_K.gguf |
Q6_K | 3.01 GB | Higher fidelity, slightly larger |
granite-4.2-3b-Heretic-Q8_0.gguf |
Q8_0 | 3.89 GB | Near-lossless, largest quantized option |
granite-4.2-3b-Heretic-F16.gguf |
F16 | 7.32 GB | Full precision, use with GPU only |
If you are unsure which to pick, start with Q5_K_M.
Quickstart
llama.cpp
# macOS / Linux
curl -LsSf https://llama.app/install.sh | sh
# Run a chat session directly in the terminal
llama cli -hf tinyopsec/granite-4.2-3b-Heretic-GGUF:Q5_K_M
# Or start an OpenAI-compatible local server
llama serve -hf tinyopsec/granite-4.2-3b-Heretic-GGUF:Q5_K_M
:: Windows (WinGet)
winget install llama.cpp
llama cli -hf tinyopsec/granite-4.2-3b-Heretic-GGUF:Q5_K_M
Manual run with a downloaded file:
./llama-cli \
-m granite-4.2-3b-Heretic-Q5_K_M.gguf \
-p "Explain the trade-offs between CPU and GPU inference for LLMs." \
-n 512
Ollama
ollama run hf.co/tinyopsec/granite-4.2-3b-Heretic-GGUF:Q5_K_M
LM Studio
Open LM Studio → Search → paste tinyopsec/granite-4.2-3b-Heretic-GGUF → download the desired quant.
Docker
docker model run hf.co/tinyopsec/granite-4.2-3b-Heretic-GGUF:Q5_K_M
Python — llama-cpp-python
from llama_cpp import Llama
llm = Llama(
model_path="granite-4.2-3b-Heretic-Q5_K_M.gguf",
n_ctx=8192,
n_threads=8,
verbose=False,
)
output = llm(
"What are the key differences between supervised and reinforcement learning?",
max_tokens=512,
temperature=0.7,
top_p=0.95,
echo=False,
)
print(output["choices"][0]["text"])
For a chat interface with the model's built-in template:
from llama_cpp import Llama
llm = Llama(
model_path="granite-4.2-3b-Heretic-Q5_K_M.gguf",
n_ctx=8192,
chat_format="chatml",
verbose=False,
)
response = llm.create_chat_completion(
messages=[
{"role": "user", "content": "Explain chain-of-thought prompting."},
],
temperature=1.0,
top_p=0.95,
max_tokens=1024,
)
print(response["choices"][0]["message"]["content"])
Thinking Mode
The base model supports built-in chain-of-thought reasoning through <think>...</think> tags. This behaviour carries over to the GGUF files when you use a compatible runtime that preserves special tokens.
With llama.cpp you can prompt the model to reason explicitly:
<|im_start|>user
How many prime numbers are there between 1 and 50?<|im_end|>
<|im_start|>assistant
<think>
The model will then complete its reasoning trace before emitting a final answer.
Model Details
| Property | Value |
|---|---|
| Source model | tinyopsec/granite-4.2-3b-Heretic |
| Base model | ibm-granite/granite-4.2-3b |
| Architecture | GraniteForCausalLM (dense decoder-only, GQA) |
| Parameters | ~3 billion |
| Context length | 128K tokens native |
| Reasoning | Built-in <think>...</think> chain-of-thought |
| Languages | EN, DE, ES, FR, JA, PT, AR, CS, IT, KO, NL, ZH |
| Editing method | Heretic representation editing |
| License | Apache 2.0 |
About the Source Model
granite-4.2-3b-Heretic is a representation-edited version of IBM Granite 4.2 3B produced with the Heretic workflow. The purpose of the edit is research and experimentation with model behaviour, refusal patterns, and instruction-following trade-offs. The weights are modified; this is not an official IBM release.
For full details on the editing methodology, intended use, limitations, and evaluation guidance, refer to the source model card:
For the original base model documentation:
Important Limitations
This model has not been comprehensively evaluated after representation editing and may differ from the base model in refusal behaviour, factual accuracy, coding performance, and output stability. Outputs should be reviewed by a human before use in any consequential application.
The model should not be relied upon as an autonomous authority or used as a substitute for professional medical, legal, or financial judgment.
License
Released under the Apache License 2.0, subject to the license and acceptable-use conditions of the base IBM Granite 4.2 3B model.
- Downloads last month
- 153
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for tinyopsec/granite-4.2-3b-Heretic-GGUF
Base model
ibm-granite/granite-4.1-3b-base