Instructions to use Open4bits/gemma-3-270m-it-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Open4bits/gemma-3-270m-it-gguf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Open4bits/gemma-3-270m-it-gguf")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Open4bits/gemma-3-270m-it-gguf", dtype="auto") - llama-cpp-python
How to use Open4bits/gemma-3-270m-it-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Open4bits/gemma-3-270m-it-gguf", filename="gemma-3-270m-it-IQ3_M-imat.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 Open4bits/gemma-3-270m-it-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Open4bits/gemma-3-270m-it-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Open4bits/gemma-3-270m-it-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Open4bits/gemma-3-270m-it-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Open4bits/gemma-3-270m-it-gguf:Q4_K_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 Open4bits/gemma-3-270m-it-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Open4bits/gemma-3-270m-it-gguf:Q4_K_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 Open4bits/gemma-3-270m-it-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Open4bits/gemma-3-270m-it-gguf:Q4_K_M
Use Docker
docker model run hf.co/Open4bits/gemma-3-270m-it-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Open4bits/gemma-3-270m-it-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Open4bits/gemma-3-270m-it-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Open4bits/gemma-3-270m-it-gguf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Open4bits/gemma-3-270m-it-gguf:Q4_K_M
- SGLang
How to use Open4bits/gemma-3-270m-it-gguf with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Open4bits/gemma-3-270m-it-gguf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Open4bits/gemma-3-270m-it-gguf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Open4bits/gemma-3-270m-it-gguf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Open4bits/gemma-3-270m-it-gguf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Open4bits/gemma-3-270m-it-gguf with Ollama:
ollama run hf.co/Open4bits/gemma-3-270m-it-gguf:Q4_K_M
- Unsloth Studio new
How to use Open4bits/gemma-3-270m-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 Open4bits/gemma-3-270m-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 Open4bits/gemma-3-270m-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 Open4bits/gemma-3-270m-it-gguf to start chatting
- Docker Model Runner
How to use Open4bits/gemma-3-270m-it-gguf with Docker Model Runner:
docker model run hf.co/Open4bits/gemma-3-270m-it-gguf:Q4_K_M
- Lemonade
How to use Open4bits/gemma-3-270m-it-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Open4bits/gemma-3-270m-it-gguf:Q4_K_M
Run and chat with the model
lemonade run user.gemma-3-270m-it-gguf-Q4_K_M
List all available models
lemonade list
gemma-3-270m-gguf
This repository contains GGUF-formatted, quantized versions of Gemma 3 270M (base model), prepared and published by Open4Bits for efficient local inference on low-resource systems.
Open4Bits is a model distribution and optimization initiative under ArkAILabs, which is run and operated by ArkDevLabs. Through Open4Bits, ArkAI Labs publishes quantized, optimized, and deployment-ready models in GGUF and other inference-friendly formats.
About Open4Bits
Open4Bits focuses on making modern language models usable on real-world hardware.
Through Open4Bits, ArkAI Labs publishes:
- Quantized language models
- GGUF models for local inference
- Optimized formats for CPU-friendly deployment
- Lightweight variants for low-resource systems
The goal is to enable practical AI usage without requiring high-end GPUs.
Available Models
| File | Quantization | Notes |
|---|---|---|
gemma-3-270m-IQ4_NL.gguf |
IQ4_NL | Ultra-light, fastest, lowest memory usage |
gemma-3-270m-IQ4_XS.gguf |
IQ4_XS | Slightly higher quality than IQ4_NL |
gemma-3-270m-Q4_0.gguf |
Q4_0 | Legacy 4-bit quantization |
gemma-3-270m-Q4_1.gguf |
Q4_1 | Legacy 4-bit with improved accuracy |
gemma-3-270m-Q4_K_S.gguf |
Q4_K_S | Modern K-quant (small) |
gemma-3-270m-Q4_K_M.gguf |
Q4_K_M | Modern K-quant (medium, recommended) |
gemma-3-270m-Q5_0.gguf |
Q5_0 | Legacy 5-bit quantization |
gemma-3-270m-Q5_1.gguf |
Q5_1 | Legacy 5-bit with improved accuracy |
gemma-3-270m-Q5_K_S.gguf |
Q5_K_S | Modern K-quant (small, higher quality) |
gemma-3-270m-Q5_K_M.gguf |
Q5_K_M | Modern K-quant (medium, high quality) |
gemma-3-270m-Q8_0.gguf |
Q8_0 | Near-baseline quality (reference) |
Recommended Variants
- Q4_K_M – Recommended for most users (best balance of quality, speed, and memory)
- Q5_K_M – Higher quality for users who can afford additional memory usage
- Q8_0 – Near-baseline reference for evaluation and comparison
Quantization Overview
IQ4 Variants
- Extremely small and fast
- Suitable for very limited hardware
- Noticeable quality reduction compared to K-quant variants
Q4_0 / Q4_1
- Older quantization formats
- Included for compatibility and comparison
- Generally inferior to modern K-quant variants
K-Quant Variants (Q4_K_S, Q4_K_M, Q5_K_S, Q5_K_M)
- Newer, higher-quality quantization methods
- Better accuracy per bit
- Standard choice for GGUF deployments
Q8_0
- Near-baseline (FP16-like) quality
- Highest memory usage among provided variants
- Intended for reference, testing, and debugging
Usage with llama.cpp
./main -m gemma-3-270m-Q4_K_M.gguf \
-p "Explain what GGUF quantization is." \
-n 128
Usage with Ollama
Create a Modelfile:
FROM ./gemma-3-270m-Q4_K_M.gguf
Then run:
ollama create gemma-270m -f Modelfile
ollama run gemma-270m
System Requirements (Approximate)
| Quantization | Memory Requirement |
|---|---|
| IQ4_NL / IQ4_XS | ~300–400 MB |
| Q4_0 / Q4_1 | ~450–500 MB |
| Q4_K_S | ~500 MB |
| Q4_K_M | ~550–600 MB |
| Q5_K_S | ~600–650 MB |
| Q5_K_M | ~650–750 MB |
| Q8_0 | ~900 MB – 1 GB |
Actual memory usage depends on context length and runtime configuration.
Intended Use and Limitations
This model is a small, lightweight base language model optimized for low-resource inference.
It is suitable for:
- Token generation and experimentation
- Embedding-style or downstream fine-tuning use
- Educational and demonstration purposes
- Lightweight local inference
Limitations:
- Not instruction-tuned
- Not designed for complex reasoning tasks
- Not suitable for advanced code generation
- May hallucinate or produce incomplete outputs for complex prompts
License
This repository follows the original Gemma model license.
Users are responsible for complying with all upstream license terms and usage restrictions.
Credits
- Original model: Google (Gemma)
- Quantization and GGUF packaging: Open4Bits (ArkAI Labs, operated by ArkDevLabs)
- Tooling: llama.cpp
Support
Open4Bits is an initiative under ArkAI Labs, operated by ArkDevLabs, focused on open and accessible AI.
If you find these models useful, please consider supporting the work by:
- Liking the model on Hugging Face
- Sharing feedback or reporting issues
- Using Open4Bits models in your projects and research
Organization Links
- Open4Bits on Hugging Face: https://huggingface.co/Open4Bits
- ArkAI Labs on Hugging Face: https://huggingface.co/ArkAiLab-Adl
- ArkDevLabs Website: https://arkdevlabs.com
- Downloads last month
- 279
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
32-bit