Instructions to use CQSystems/Google-Gemma-4-E2B-It-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use CQSystems/Google-Gemma-4-E2B-It-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="CQSystems/Google-Gemma-4-E2B-It-GGUF", filename="CQ-Gemma-4-E2B-Q8_0.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use CQSystems/Google-Gemma-4-E2B-It-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 CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
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 CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
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 CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
Use Docker
docker model run hf.co/CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
- LM Studio
- Jan
- Ollama
How to use CQSystems/Google-Gemma-4-E2B-It-GGUF with Ollama:
ollama run hf.co/CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
- Unsloth Studio
How to use CQSystems/Google-Gemma-4-E2B-It-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CQSystems/Google-Gemma-4-E2B-It-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CQSystems/Google-Gemma-4-E2B-It-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CQSystems/Google-Gemma-4-E2B-It-GGUF to start chatting
- Pi
How to use CQSystems/Google-Gemma-4-E2B-It-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use CQSystems/Google-Gemma-4-E2B-It-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 CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
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 CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use CQSystems/Google-Gemma-4-E2B-It-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
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 "CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0" \ --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"
- Docker Model Runner
How to use CQSystems/Google-Gemma-4-E2B-It-GGUF with Docker Model Runner:
docker model run hf.co/CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
- Lemonade
How to use CQSystems/Google-Gemma-4-E2B-It-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CQSystems/Google-Gemma-4-E2B-It-GGUF:Q8_0
Run and chat with the model
lemonade run user.Google-Gemma-4-E2B-It-GGUF-Q8_0
List all available models
lemonade list
CQ Systems: Google Gemma 4 E2B IT (GGUF)
This repository contains quantized GGUF formats of the Google Gemma 4 E2B Instruction-Tuned model, published and optimized by CQ Systems.
⚡ Mac Neo & Apple Silicon Compatibility
These files are specifically optimized for local inference on consumer and professional hardware, with a major focus on Apple Silicon.
Mac Neo Architecture Support:
The bF16 (bfloat16) derived quantizations in this repository are highly recommended for the latest Mac Neo hardware. By utilizing Mac Neo's advanced unified memory matrix and native bfloat16 processing capabilities, these models deliver blistering fast token generation for on-device reasoning and multimodal tasks, with significantly reduced thermal load.
📦 Available Files
We provide five different versions of the model, allowing you to scale based on your available unified memory (RAM/VRAM) and speed requirements.
| Filename | Size | Quantization | Recommendation / Notes |
|---|---|---|---|
| CQ-Gemma-4-E2B-bF16-Q4_K.gguf | 3.2 GB | Q4_K_M | 🏆 Recommended for Mac Neo / Apple Silicon. Derived from a bfloat16 baseline. Best balance of speed, size, and reasoning quality. Easily fits in 8GB unified memory. |
| CQ-Gemma-4-E2B-Q8_0.gguf | 4.6 GB | Q8_0 | High quality 8-bit integer quantization. Nearly indistinguishable from the baseline. Requires ~8GB+ RAM/VRAM. |
| CQ-Gemma-4-E2B-bF16-Q2_K.gguf | 2.8 GB | Q2_K | Ultra-compressed (bfloat16 base). Use only when memory is strictly constrained. Expect some perplexity degradation. |
| CQ-Gemma-4-E2B-f16-Q2_K.gguf | 2.8 GB | Q2_K | Ultra-compressed (float16 base). Alternative for older hardware that prefers standard f16 math over bf16. |
| CQ-Gemma-4-E2B-bf16.gguf | 8.7 GB | bF16 | Baseline uncompressed 16-bit brain-float. Highest fidelity, highest memory footprint. Useful for research or custom requantization. |
🚀 How to Use
Using llama.cpp
You can run this model directly in your terminal using the compiled llama.cpp CLI tool. Ensure you have built llama.cpp with Metal support for Macs.
# Basic chat launch with the recommended Mac Neo Q4_K model
./llama-cli -m CQ-Gemma-4-E2B-bF16-Q4_K.gguf \
-c 8192 \
-n 1024 \
-p "<|think|>\nAnalyze the system logs.\n<|channel>thought\n"
Using LM Studio / Ollama
- Download the .gguf file of your choice.
- LM Studio: Drag and drop the downloaded file into your LM Studio model folder, or use the local import feature.
- Ollama: Create a Modelfile with the line FROM ./CQ-Gemma-4-E2B-bF16-Q4_K.gguf, then run ollama create cq-gemma-e2b -f Modelfile.
(Note: While the base Gemma 4 E2B supports audio and image inputs natively, standard GGUF text-generation primarily supports text out-of-the-box. Multimodal vision/audio capabilities in GGUF require an accompanying mmproj encoder file).
🧠 About the Base Model: Gemma 4 E2B
Gemma 4 is a family of open models built by Google DeepMind. The E2B variant is the smallest and fastest in the family, purpose-built for efficient local execution on laptops, mobile devices, and edge hardware.
- Total Parameters: 2.3B effective (5.1B total with Per-Layer Embeddings). The use of PLE gives each decoder layer its own small embedding for every token, maximizing efficiency.
- Context Length: 128K tokens.
- Supported Modalities (Base Model): Text, Image, Audio.
- System Prompts: Gemma 4 uses standard system, assistant, and user roles natively.
Thinking Mode Configuration
Gemma 4 models are designed as highly capable reasoners. To enable the built-in reasoning capabilities, include the <|think|> token at the start of your system prompt.
When thinking is enabled, the model will output its internal reasoning followed by the final answer using this structure:
<|channel>thought\n[Internal reasoning]<channel|>[Final answer]
📜 License & Acknowledgements
- Base Model: Google DeepMind
- License: Gemma 4 License
- Quantization & Optimization: CQ Systems Team
For full benchmark details, evaluations, ethical considerations, and safety metrics, please refer to the original Google Gemma 4 Documentation.
- Downloads last month
- 158
2-bit
8-bit
16-bit