Instructions to use chappedjord/cranberry-12b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use chappedjord/cranberry-12b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-12b-it") model = PeftModel.from_pretrained(base_model, "chappedjord/cranberry-12b") - Notebooks
- Google Colab
- Kaggle
Cranberry-12B (Sovereign Systems & Formal Verification Model)
Total Model Parameters: 12 Billion (12B)
Cranberry 12B is a full 12-Billion parameter sovereign inference model based on Google Gemma 4 12B.
This repository contains both the standalone quantized base GGUF weights (gemma-4-12b-it-Q4_K_M.gguf, ~6.8 GB) and the specialized systems LoRA adapter (cranberry_12b_adapter.gguf, ~250 MB). When executed together, they form a complete 12B systems reasoning engine.
| Parameter Category | Count | Storage Footprint | Target Layers |
|---|---|---|---|
| Base Model Architecture | 12,000,000,000 (12B) | ~6.8 GB (Q4_K_M) | Google Gemma 4 12B Instruction-Tuned |
| Active LoRA Invariant Interceptors | 65,601,536 (65.6M) | ~250 MB | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Total Effective Model Capacity | 12.06 Billion (12B) | Fits 12GB VRAM | Full Dual-Channel Reasoning Engine |
Sovereign Systems & Formal Verification Inference Engine
Preventative Value Labs (PVL) Protocol
1. Overview & Dual-Channel Architecture
Cranberry 12B is the domain-specialized sovereign inference engine of the PVL Network. It is fine-tuned specifically for:
- Systems C/C++ Memory Safety: Zero-copy bounds enforcement, pointer arithmetic validation, and memory leak elimination.
- EVM Smart Contract Invariant Checking: Reentrancy protection, integer bounds checking, access control enforcement.
- Dual-Channel Output (Explanation + Pure Patch):
- Internal Reasoning Channel (
<|channel>thought ... <channel|>): Formal mathematical invariant audits and boundary checks. - User Response Channel: Human-friendly explanations of the root cause, vulnerability analysis, and compile-ready patches.
- Internal Reasoning Channel (
- Economic Negentropy Law (PVL Rule 8): Users pay for total decoded output tokens from escrow, but only the verified patch ($T_{\text{fix}}$) earns preventative PoEV rewards ($T_{\text{payload}} = T_{\text{prompt}} + T_{\text{fix}}$). Zero unbacked inflation for explanatory prose.
2. Included Files in this Bundle
| File | Size | Purpose |
|---|---|---|
gemma-4-12b-it-Q4_K_M.gguf |
~6.8 GB | Standalone Google Gemma 4 12B Instruction-Tuned base GGUF weights (12B parameters). |
cranberry_12b_adapter.gguf |
~250 MB | Quantized GGUF LoRA adapter for llama.cpp, llama-server, and Ollama. |
adapter_model.safetensors |
~250 MB | FP16/BF16 PEFT LoRA weights for PyTorch & Hugging Face Transformers. |
adapter_config.json |
1.3 KB | PEFT LoRA architectural configuration (Rank=16, Alpha=16, 7 target modules). |
Modelfile |
1.1 KB | Ready-to-import configuration file for Ollama. |
run_llama_server.bat |
1.0 KB | One-click Windows launcher for high-throughput continuous batching. |
run_llama_server.sh |
0.8 KB | One-click Linux/macOS launcher. |
run_inference.py |
2.1 KB | Self-contained Python script to load and run inference via transformers + peft. |
tokenizer.json |
30.7 MB | Gemma tokenizer vocabulary and BPE merges. |
tokenizer_config.json |
7.2 KB | Special tokens and turn separators (<start_of_turn>, <end_of_turn>). |
chat_template.jinja |
19.3 KB | Jinja2 template formatting prompts into canonical Gemma multi-turn structure. |
3. License & Attribution
This model and its associated weights, configurations, and verification harnesses are distributed under the Apache License 2.0.
- Commercial Use: Permitted without restriction.
- Modification & Distribution: Permitted under standard Apache 2.0 terms.
- Attribution: Base architecture and weights derived from Google Gemma 4 12B; fine-tuned, audited, and verified by Preventative Value Labs (PVL).
4. How to Run
Method 1: llama.cpp / llama-server (Continuous Batching)
Both the base model and adapter are included directly in this repository:
llama-server -m gemma-4-12b-it-Q4_K_M.gguf --lora cranberry_12b_adapter.gguf -c 8192 -ngl 99 -np 4 -cb
Or double-click run_llama_server.bat on Windows.
Method 2: Ollama
Ensure Ollama is installed, then create and run the model:
ollama create cranberry-12b -f Modelfile
ollama run cranberry-12b
Method 3: Python (Transformers + PEFT)
Install dependencies:
pip install torch transformers peft accelerate
Run the test script:
python run_inference.py
Method 4: PVL Sovereign Node
In the PVL Sovereign Node application:
- Select Worker Mode.
- Select Cranberry-12B from the model dropdown.
- The launcher will automatically bind
cranberry_12b_adapter.ggufto the continuous batching inference engine and begin earning PoEV rewards for verified patches.
5. Hardware Requirements
- RAM/VRAM: Fits comfortably inside 12 GB VRAM (e.g. NVIDIA GeForce RTX 3060 12GB, RTX 4070) with 4-slot concurrent continuous batching.
- CPU Inference: Supported via AVX2/AVX-512 quantization fallback.
- Downloads last month
- 136
4-bit