Instructions to use jstarks/Granite-4.2-8B-Weight-Space-Programming 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 jstarks/Granite-4.2-8B-Weight-Space-Programming 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 jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M # Run inference directly in the terminal: llama cli -hf jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M # Run inference directly in the terminal: llama cli -hf jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M
Use Docker
docker model run hf.co/jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use jstarks/Granite-4.2-8B-Weight-Space-Programming with Ollama:
ollama run hf.co/jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M
- Unsloth Desktop
- Pi
How to use jstarks/Granite-4.2-8B-Weight-Space-Programming with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jstarks/Granite-4.2-8B-Weight-Space-Programming: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use jstarks/Granite-4.2-8B-Weight-Space-Programming with Docker Model Runner:
docker model run hf.co/jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M
- Lemonade
How to use jstarks/Granite-4.2-8B-Weight-Space-Programming with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M
Run and chat with the model
lemonade run user.Granite-4.2-8B-Weight-Space-Programming-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use jstarks/Granite-4.2-8B-Weight-Space-Programming with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jstarks/Granite-4.2-8B-Weight-Space-Programming: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:9931/v1 hermes config set model.default jstarks/Granite-4.2-8B-Weight-Space-Programming:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jstarks/Granite-4.2-8B-Weight-Space-Programming with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jstarks/Granite-4.2-8B-Weight-Space-Programming: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:9931/v1 \ --custom-model-id "jstarks/Granite-4.2-8B-Weight-Space-Programming: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-8B Weight-Space Programming (Granite-4.2-8B-WSP-Q4_K_M)
Standalone Weight-Space Programming (WSP) enhancement of IBM's ibm-granite/granite-4.2-8b (Apache-2.0), built via streaming GGUF layer-wise calibration (layers 34..39) with SVD right-nullspace preservation (1,176 singular modes over 2,910 preservation vectors per layer) and zero-requantization GGUF baking.
- Standalone Baked GGUF:
Granite-4.2-8B-WSP-Q4_K_M.gguf(5.3262 GiB) โ357untouched tensors preserved bit-for-bit in their original quantization types +6modified tailffn_downlayers (blk.{34..39}) stored in losslessF16(scale=0.50). - Standalone LoRA Adapter:
adapters/granite_42_8b_wsp_r32.gguf(6.19 MiB, rank32, recommended scale0.50on basegranite-4.2-8b-Q4_K_M.gguf).
Verified Benchmark Results (llama.cpp on RTX 4070 Ti, -c 8192 -ctk q8_0 -ctv q8_0 --jinja)
Non-Thinking Mode (enable_thinking=False, max_tokens=1024)
| Suite | Tasks | Base Q4_K_M |
WSP LoRA (s=0.50) |
Baked Granite-4.2-8B-WSP-Q4_K_M (loras=[]) |
|---|---|---|---|---|
S1_THINK (Math Closure) |
3 | 2/3 (66.7%) |
3/3 (100.0%) |
2/3 (66.7%) |
S2_RESTRAINT (No-Tool & Anti-Sycophancy) |
4 | 2/4 (50.0%) |
4/4 (100.0%) |
4/4 (100.0%) |
S3_ROUTER (Tool Routing) |
5 | 5/5 (100.0%) |
5/5 (100.0%) |
5/5 (100.0%) |
S4_CODE (Algorithmic Python) |
2 | 1/2 (50.0%) |
2/2 (100.0%) |
2/2 (100.0%) |
S5_TURN2_JSON (Turn-2 Strict JSON) |
3 | 2/3 (66.7%) |
2/3 (66.7%) |
2/3 (66.7%) |
S6_HANDOFF (Escalation Gate) |
4 | 4/4 (100.0%) |
4/4 (100.0%) |
4/4 (100.0%) |
S7_INJ_GUARD (Prompt-Injection Guard) |
3 | 1/3 (33.3%) |
1/3 (33.3%) |
1/3 (33.3%) |
S8_GROUNDING (Abstention & null Fields) |
3 | 0/3 (0.0%) |
2/3 (66.7%) |
2/3 (66.7%) |
S9_ERR_RECOV (Tool Error Self-Correction) |
3 | 3/3 (100.0%) |
3/3 (100.0%) |
3/3 (100.0%) |
WSP Holdout Subtotal |
30 | 20/30 (66.7%) |
26/30 (86.7%) |
25/30 (83.3%) |
EST_GSM8K |
20 | 19/20 (95.0%) |
18/20 (90.0%) |
18/20 (90.0%) |
EST_HUMANEVAL |
15 | 14/15 (93.3%) |
14/15 (93.3%) |
13/15 (86.7%) |
EST_BFCL_IRR (Irrelevant Tools Abstention) |
15 | 10/15 (66.7%) |
14/15 (93.3%) |
14/15 (93.3%) |
EST_NL2BASH |
20 | 19/20 (95.0%) |
19/20 (95.0%) |
19/20 (95.0%) |
Established Subtotal |
70 | 62/70 (88.6%) |
65/70 (92.9%) |
64/70 (91.4%) |
Total agent100 |
100 | 82/100 (82.0%) |
91/100 (91.0%) |
89/100 (89.0%) |
Length Cutoffs (1024 tok) |
100 | 10 |
3 (-70%) |
3 (-70%) |
| Wall Time / Mean Throughput | 100 | 349.6s (76.8 tok/s) |
235.5s (78.0 tok/s) |
266.7s (73.8 tok/s) |
Targeted low_effort Thinking Probe (enable_thinking=True, low_effort=True, 53 Tasks)
S7_INJ_GUARD:2/3->3/3(100.0%) on both WSP LoRA (s=0.50) and BakedGranite-4.2-8B-WSP-Q4_K_M(eliminates untrusted<tool_response>write_filehijacking).S1_THINK,S4_CODE,S5_TURN2_JSON:100.0%(0cutoffs).
Quickstart (llama.cpp / Ollama)
llama-server -m Granite-4.2-8B-WSP-Q4_K_M.gguf -c 8192 -ctk q8_0 -ctv q8_0 -ngl 99 --jinja
Using the standalone adapter on IBM's official GGUF at recommended scale 0.50:
llama-server -m granite-4.2-8b-Q4_K_M.gguf --lora adapters/granite_42_8b_wsp_r32.gguf:0.50 -c 8192 -ctk q8_0 -ctv q8_0 -ngl 99 --jinja
Provenance & Method
All calibration prompts in scripts/build_granite_wsp.py are strictly disjoint from the agent100 holdouts (HOLDOUT_S1..S9 and established_datasets_cache.json). Reproducible evaluation logs and scripts are included under results/ and scripts/.
Base model & license: ibm-granite/granite-4.2-8b (Apache-2.0).
- Downloads last month
- -
4-bit
Model tree for jstarks/Granite-4.2-8B-Weight-Space-Programming
Base model
ibm-granite/granite-4.1-8b-base