---
title: gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF
canonical_url: "https://www.modelscope.ai/models/Deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF"
md_url: "https://www.modelscope.ai/models/Deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF.md"
repository: Deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF
last_updated: 2026-06-29
license: gemma
pipeline_tag: text-generation
tasks:
  - text-generation
base_model:
  - deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-mlx-4bit
base_model_relation: quantized
library_name:
  - gguf
  - pytorch
frameworks:
  - pytorch
language:
  - en
downloads: 37
stars: 0
tags:
  - gguf
  - gemma4
  - quantized
  - multimodal
  - vision
  - reasoning
  - chain-of-thought
  - opus
  - claude-code
  - sft
  - fused
  - ravenx
  - tool-calling
  - function-calling
  - ollama
  - lmstudio
  - llama-cpp
  - conversational
---

# gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF

> gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF - An open-source model by Deadbydawn101 on ModelScope. Gemma 4 E4B — Opus Reasoning + Claude Code | GGUF

Deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF is a text-generation model on ModelScope. licensed under gemma. derived from deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-mlx-4bit.

- **Repository**: Deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF
- **License**: gemma
- **Tasks**: text-generation
- **Base model**: deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-mlx-4bit
- **Tags**: gguf, gemma4, quantized, multimodal, vision, reasoning, chain-of-thought, opus, claude-code, sft, fused, ravenx, tool-calling, function-calling, ollama, lmstudio, llama-cpp, conversational
- **Downloads**: 37
- **Stars**: 0
- **Last updated**: 2026-06-29

Source: https://www.modelscope.ai/models/Deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF

---

<div align="center">

# Gemma 4 E4B — Opus Reasoning + Claude Code | GGUF

> **GGUF version of our Opus 4.6 reasoning model. Ollama ✅ LM Studio ✅ llama.cpp ✅ Reasoning baked in — no adapter needed.**

### Built by [RavenX AI](https://github.com/DeadByDawn101) · GGUF converted from [MLX source](https://huggingface.co/deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-mlx-4bit)

[![Ollama](https://img.shields.io/badge/Ollama-ready-blue)](https://ollama.com)
[![LM Studio](https://img.shields.io/badge/LM_Studio-ready-green)](https://lmstudio.ai)
[![llama.cpp](https://img.shields.io/badge/llama.cpp-compatible-orange)](https://github.com/ggml-org/llama.cpp)
[![License](https://img.shields.io/badge/license-Gemma-green)](https://ai.google.dev/gemma/docs/gemma_4_license)

</div>

---

## What is this?

This is the **GGUF version** of [`gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-mlx-4bit`](https://huggingface.co/deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-mlx-4bit) — Gemma 4 E4B with Opus 4.6 reasoning and Claude Code LoRA **fused directly into the weights**.

No adapter needed, no extra config — just load and run with Claude-style `<think>` reasoning baked in.

> **Looking for the Apple Silicon MLX version?** → [MLX 4-bit model](https://huggingface.co/deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-mlx-4bit) (optimized for Metal GPU)

---

## Available Quantizations

| Quantization | Size | Use case |
|:---:|:---:|---|
| `Q4_K_M` | 2.7 GB | **Recommended** — best balance of quality and speed |
| `Q5_K_M` | 3.1 GB | Higher quality, slightly more RAM |
| `Q8_0` | 4.5 GB | Near-lossless, needs more RAM |
| `F16` | 8.3 GB | Full precision GGUF |

> Sizes will be updated once conversion is complete.

---

## 🦙 Ollama — One Command

```bash
ollama run hf.co/deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF
```

### With a custom system prompt
Create a `Modelfile`:
```
FROM hf.co/deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF

SYSTEM "You are a helpful assistant with tool-use capabilities. Think through problems step by step using <think> tags."

PARAMETER temperature 0.7
PARAMETER num_ctx 8192
```

```bash
ollama create ravenx-gemma4 -f Modelfile
ollama run ravenx-gemma4
```

### OpenAI-compatible API
```bash
curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hf.co/deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF",
    "messages": [{"role": "user", "content": "Explain why RSA encryption is hard to break."}]
  }'
```

---

## 💻 LM Studio

1. Open LM Studio
2. Search for `deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF`
3. Download any quantization (Q4_K_M recommended)
4. Load and chat — reasoning is baked in

---

## 🔧 llama.cpp

### CLI
```bash
llama-cli \
  -hf deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF \
  -p "Explain why RSA encryption is hard to break." \
  -n 1024
```

### Server (OpenAI-compatible)
```bash
llama-server \
  -hf deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF \
  --port 8080

# Use with any OpenAI client
curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-GGUF",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

---

## What's different from the base Gemma 4

| | Base Gemma 4 E4B | This model |
|--|:--:|:--:|
| `<think>` tag reasoning | ❌ | ✅ baked in |
| Claude-style structured answers | ❌ | ✅ |
| Tool-use patterns | ❌ | ✅ |
| Requires adapter | — | ❌ no adapter needed |
| Vision support | ✅ | ✅ |
| Ollama / LM Studio / llama.cpp | ✅ | ✅ |

---

## 🧪 Live Demos — Try It Now

<div align="center">

| Space | What to try |
|---|---|
| 🔥 [**Agentic Tool Calling Demo**](https://huggingface.co/spaces/deadbydawn101/gemma4-agentic-tool-calling-demo) | Live agentic loop — tool calling, `<think>` reasoning, calculator, web search |
| 🐳 [**OpenClaw Sandbox Demo**](https://huggingface.co/spaces/deadbydawn101/openclaw-agent-sandbox-demo) | OpenClaw-style orchestration, Docker runtime, sandbox/approval modes |

</div>

---

## 🧩 Agent Stack Compatibility

This model is built to sit inside a **real agent stack**, not just a chat box.

| Layer | Role |
|---|---|
| **Gemma 4 E4B Opus Reasoning + Claude Code** | Reasoning + tool-use baked into weights |
| **Gemini CLI** | Coding agent + tool orchestration |
| **OpenHarness** | Harness runtime, tool loop, swarm, hooks, memory |
| **OpenClaw** | Orchestration, sessions, skills, messaging |
| **Hermes skill** | Agent behavior for concise, terminal-first execution |

→ [Gemini CLI fork](https://github.com/DeadByDawn101/gemini-cli) · [TurboQuant-MLX](https://github.com/DeadByDawn101/turboquant-mlx) · [RavenX Inference Harness](https://github.com/DeadByDawn101/ravenx-inference-harness)

---

## How it was made

### Training data
| Source | Examples |
|--------|--------:|
| Crownelius/Opus-4.6-Reasoning-2100x-formatted | 2,054 |
| Claude Code tool-use patterns | 140 files |
| **Total** | **2,163** |

### Training
```
Base:      deadbydawn101/gemma-4-E4B-mlx-4bit
Method:    SFT completions-only (mlx_vlm.lora)
Rank:      8 · Alpha: 16 · LR: 1e-5 · Iters: 1,000
Hardware:  Apple M4 Max 128GB · Peak mem: 7.876 GB

Final loss: ~3.5e-7
```

### Fusion + GGUF Conversion
1. All **378 LoRA pairs** merged via weight arithmetic into base weights
2. De-quantized from MLX 4-bit to FP16
3. Converted to GGUF using `llama.cpp/convert_hf_to_gguf.py`
4. Quantized to multiple GGUF formats using `llama-quantize`

---

## Related Models

| Model | Format | Size | Notes |
|-------|:------:|:----:|-------|
| [MLX 4-bit (source)](https://huggingface.co/deadbydawn101/gemma-4-E4B-Agentic-Opus-Reasoning-GeminiCLI-mlx-4bit) | MLX | ~10.5 GB | Apple Silicon optimized, Metal GPU |
| **This model (GGUF)** | GGUF | varies | Ollama, LM Studio, llama.cpp |
| [Base model (4-bit)](https://huggingface.co/deadbydawn101/gemma-4-E4B-mlx-4bit) | MLX | 4.86 GB | Base model (use with adapter) |
| [LoRA adapter only](https://huggingface.co/deadbydawn101/gemma-4-E4B-opus-reasoning-claude-code-lora) | Safetensors | 658 MB | Adapter-only |
| [2B abliterated](https://huggingface.co/deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit) | MLX | 3.34 GB | 2B abliterated |
| [21B MoE REAP](https://huggingface.co/deadbydawn101/gemma-4-21b-REAP-Tool-Calling-mlx-4bit) | MLX | 12 GB | 21B MoE REAP |

---

## License

[Gemma Terms of Use](https://ai.google.dev/gemma/docs/gemma_4_license)

---

<div align="center">
Built with 🖤 by <a href="https://github.com/DeadByDawn101">RavenX AI</a> · <a href="https://github.com/DeadByDawn101/turboquant-mlx">TurboQuant-MLX</a> · <a href="https://github.com/DeadByDawn101/gemini-cli">Gemini CLI</a>
</div>
