Instructions to use PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED") config = load_config("PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED"
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 "PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Hermes Agent
How to use PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED"
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 PINKlab/Gemma-4-26B-A4B-JANG_2L-RESTORED
Run Hermes
hermes
- Atomic Chat
Gemma-4-26B-A4B-JANG_2L-SAFE
9.9 GB mixed-precision quantized Gemma 4 26B MoE derivative with selected safety-related tensors restored from the original Google release.
Experimental derivative release. Despite the repository name, this model is not presented as fully safety-validated. It is a partial safety-restoration experiment built on top of a community JANG/CRACK derivative.
Compatibility
| Runtime | Status |
|---|---|
| vMLX (1.3.26+) | ✅ Recommended — native JANG format support |
| mlx_vlm.server | ❌ Not compatible — requires uniform quantization, JANG uses mixed-precision (2/6/8-bit) |
| mlx-lm | ❌ Not compatible — same reason as mlx_vlm |
Important: This model uses JANG v2.0 mixed-precision quantization (2/6/8-bit per layer). Standard MLX tools (mlx-lm, mlx_vlm) only support uniform bit-width and cannot load this format. Use vMLX or compatible inference engines with JANG support.
Why this exists
dealignai created an excellent mixed-precision quantization (JANG_2L) that fits the 26B MoE model into 9.9 GB. However, their release removes safety guardrails (CRACK).
This model partially restores safer behavior by replacing the 11 modified tensors with originals from
google/gemma-4-26b-a4b-it, quantized to matching 8-bit precision.
Same size. Same quantization profile. Experimental safety restoration.
Specs
| Base Model | google/gemma-4-26b-a4b-it |
| Architecture | MoE — 70.2B total, ~4B active per token |
| Attention | Hybrid: 25 sliding-window + 5 full-attention layers |
| Model Size | ~9.9 GB |
| Avg Bits | 2.51 bits/weight |
| Context | 262,144 tokens |
| Multimodal | Vision + Text |
| Safety | Partial restoration experiment; not fully safety-validated |
| Format | MLX safetensors (JANG v2.0) |
JANG_2L Mixed-Precision Quantization
| Tier | Components | Bits |
|---|---|---|
| CRITICAL | Attention (Q/K/V/O), router, shared MLP, embeddings | 8 |
| IMPORTANT | Gate projection, up projection | 6 |
| COMPRESS | Expert MLP (down proj), switch MLP | 2 |
This approach protects the most sensitive pathways while aggressively compressing the 128 MoE experts, achieving excellent quality at 2.51 average bits.
Safety Restoration Details
The CRACK variant removed refusal vectors from o_proj weights in layers 15-25
(11 tensors, using MPOA method at strength 8.0).
This repository attempts a partial restoration:
- Fetched original BF16
o_projweights fromgoogle/gemma-4-26b-a4b-it - Quantized to 8-bit (group_size=64) matching the JANG CRITICAL tier
- Swapped into the JANG_2L model, replacing abliterated tensors
- Removed
crack_surgeryconfig
All other weights are identical to the CRACK version (they were never modified).
Safety disclaimer
- This is a modified derivative of a community CRACK release, not an official Google safety release.
- Only the 11 documented
o_projtensors were restored; no comprehensive red-team or policy eval is included in this repository. - Use this model as a research / experimentation artifact, not as proof of production-ready safety.
Requirements
- Apple Silicon Mac with 16+ GB unified memory
- vMLX 1.3.26+ (required — standard mlx-lm/mlx_vlm cannot load mixed-precision JANG format)
Usage with vMLX
Download and load in vMLX — it auto-detects the Gemma 4 architecture and JANG format.
Credits
- JANG quantization method: dealignai — innovative mixed-precision approach
- Base model: Google Gemma Team
- Safety restoration & release: PINKlab
License
Gemma License — permits modification and redistribution. This is a modified derivative of Google's Gemma 4. Original license terms apply.
- Downloads last month
- 12
Quantized