Instructions to use SandLogicTechnologies/gemma-4-E2B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use SandLogicTechnologies/gemma-4-E2B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="SandLogicTechnologies/gemma-4-E2B-GGUF", filename="gemma-4-E2B-IQ3_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use SandLogicTechnologies/gemma-4-E2B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M # Run inference directly in the terminal: llama-cli -hf SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M # Run inference directly in the terminal: llama-cli -hf SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M
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 SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M # Run inference directly in the terminal: ./llama-cli -hf SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M
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 SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M
Use Docker
docker model run hf.co/SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M
- LM Studio
- Jan
- vLLM
How to use SandLogicTechnologies/gemma-4-E2B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SandLogicTechnologies/gemma-4-E2B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SandLogicTechnologies/gemma-4-E2B-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M
- Ollama
How to use SandLogicTechnologies/gemma-4-E2B-GGUF with Ollama:
ollama run hf.co/SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M
- Unsloth Studio new
How to use SandLogicTechnologies/gemma-4-E2B-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 SandLogicTechnologies/gemma-4-E2B-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 SandLogicTechnologies/gemma-4-E2B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for SandLogicTechnologies/gemma-4-E2B-GGUF to start chatting
- Docker Model Runner
How to use SandLogicTechnologies/gemma-4-E2B-GGUF with Docker Model Runner:
docker model run hf.co/SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M
- Lemonade
How to use SandLogicTechnologies/gemma-4-E2B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SandLogicTechnologies/gemma-4-E2B-GGUF:IQ3_M
Run and chat with the model
lemonade run user.gemma-4-E2B-GGUF-IQ3_M
List all available models
lemonade list
gemma-4-E2B
gemma-4-E2B is a multimodal model from the gemma family, designed to handle reasoning tasks across both visual and textual inputs. It is part of a family of models optimized for efficiency, making it suitable for deployment across a wide range of environments including edge devices and local systems.
The model supports multimodal interactions, enabling it to process text and image inputs and generate text outputs. It is optimized for conversational AI, coding, reasoning, and agentic workflows, while maintaining a strong balance between performance and efficiency.
gemma-4-E2B is particularly effective in scenarios involving multi-step reasoning, lightweight deployments, and multilingual communication, while remaining practical for on-device and resource-constrained use cases.
Model Overview
- Model Name: gemma-4-E2B
- Architecture: Decoder-only Transformer with multimodal extensions
- Parameter Count: 2B parameters
- Context Window: 128k tokens
- Modalities: Text, Image (multimodal input support)
- Primary Languages: English (with multilingual generalization)
- Developer: Google
- License: Apache 2.0
Quantization Details
This repository provides various GGUF quantized versions of the gemma-4-E2B model, optimized for efficient local inference using llama.cpp. Below are the details of the available I-Matrix (IQ) formats.
Quantization Formats (I-Quants)
IQ3_M
- Size reduction of approx 66.33% (2.92 GB) compared to 16-bit (8.67 GB)
- IQ3_M is an aggressive low-bit quantization format designed for scenarios where memory constraints are the primary limitation.
- It compresses model weights down to approximately 3 bits while still attempting to preserve the most important parameters through importance-aware scaling.
- This format is particularly useful when deploying models on highly constrained environments such as edge devices or low-memory systems.
- However, due to the reduced precision, there is a noticeable drop in output quality, especially for reasoning-heavy prompts or long-context tasks, and reconstruction overhead may affect performance depending on the hardware.
IQ4_XS
- Size reduction of approx 64.47% (3.08 GB) compared to 16-bit (8.67 GB)
- IQ4_XS represents a balanced approach between compression and quality.
- It uses a 4-bit representation combined with importance-aware quantization, allowing it to retain significantly more useful information than lower-bit formats while still keeping the model size relatively small.
- This format is often considered a sweet spot for most users, as it delivers strong performance across a wide range of tasks without requiring excessive memory. It performs well in conversational scenarios, general reasoning, and code-related tasks.
- One characteristic of IQ4_XS is that prompt processing may be slightly slower compared to traditional quantization methods due to the added complexity of importance-based reconstruction. However, once generation begins, performance is generally stable and efficient.
IQ4_NL
- Size reduction of approx 63.78% (3.14 GB) compared to 16-bit (8.67 GB)
- IQ4_NL is a more advanced 4-bit quantization format that incorporates non-linear weight mapping in addition to importance-based scaling.
- This allows it to better approximate the original distribution of model weights, particularly in regions where linear quantization would introduce larger errors.
- As a result, IQ4_NL typically provides higher fidelity outputs compared to other 4-bit formats, making it well-suited for tasks that require better reasoning, structured responses, or nuanced language generation.
- The trade-off is a modest increase in model size and computational complexity during dequantization. On some systems, this can lead to slightly slower inference speeds compared to simpler formats, but the quality improvements are often noticeable.
Training Overview
Pretraining
The model is trained on a large-scale dataset combining diverse textual corpora and multimodal data sources, enabling it to understand both language and visual information in a unified manner.
Training objectives include:
- Cross-modal representation learning
- Large-scale language modeling
- Visual-text alignment
- Contextual reasoning across long sequences
Alignment and Optimization
Post-training steps refine the model for real-world usability and instruction-following:
- Instruction tuning for conversational tasks
- Reinforcement learning and alignment techniques
- Optimization for reasoning and agentic workflows
- Improved multimodal grounding and response consistency
Core Capabilities
Multimodal understanding Processes text and image inputs to generate context-aware responses.
Efficient reasoning performance Handles multi-step logical tasks while remaining optimized for smaller-scale deployment.
Agentic and coding capabilities Supports structured workflows, tool usage patterns, and code-related tasks.
Long-context processing Maintains coherence across extended inputs and conversations.
Multilingual support Capable of handling a wide range of languages and mixed-language inputs.
Deployment flexibility Designed to run effectively across edge devices, local systems, and standard hardware setups.
Example Usage
llama.cpp
./llama-cli \
-m SandlogicTechnologies/gemma-4-E2B_IQ4_NL.gguf /
-p "Explain the concept of attention in transformer models."
Recommended Use Cases
- Lightweight conversational AI systems
- On-device AI applications and edge deployments
- Coding assistants and developer tools
- Multimodal question answering (text + image)
- Educational tools and tutoring systems
- Document analysis and summarization
- Prototyping intelligent applications with limited hardware
Acknowledgments
These quantized models are based on the original work by the Google development team.
Special thanks to:
The Google team for developing and releasing the gemma-4-E2B model.
Georgi Gerganov and the
llama.cppopen-source community for enabling efficient quantization and inference via the GGUF format.
Contact
For any inquiries or support, please contact us at support@sandlogic.com or visit our Website.
- Downloads last month
- 163
3-bit
4-bit
Model tree for SandLogicTechnologies/gemma-4-E2B-GGUF
Base model
google/gemma-4-E2B