Instructions to use tanujrai/gemma-3-1b-it-Q4_0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tanujrai/gemma-3-1b-it-Q4_0 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 tanujrai/gemma-3-1b-it-Q4_0:Q4_0 # Run inference directly in the terminal: llama cli -hf tanujrai/gemma-3-1b-it-Q4_0:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tanujrai/gemma-3-1b-it-Q4_0:Q4_0 # Run inference directly in the terminal: llama cli -hf tanujrai/gemma-3-1b-it-Q4_0:Q4_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 tanujrai/gemma-3-1b-it-Q4_0:Q4_0 # Run inference directly in the terminal: ./llama-cli -hf tanujrai/gemma-3-1b-it-Q4_0:Q4_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 tanujrai/gemma-3-1b-it-Q4_0:Q4_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf tanujrai/gemma-3-1b-it-Q4_0:Q4_0
Use Docker
docker model run hf.co/tanujrai/gemma-3-1b-it-Q4_0:Q4_0
- LM Studio
- Jan
- vLLM
How to use tanujrai/gemma-3-1b-it-Q4_0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tanujrai/gemma-3-1b-it-Q4_0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tanujrai/gemma-3-1b-it-Q4_0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tanujrai/gemma-3-1b-it-Q4_0:Q4_0
- Ollama
How to use tanujrai/gemma-3-1b-it-Q4_0 with Ollama:
ollama run hf.co/tanujrai/gemma-3-1b-it-Q4_0:Q4_0
- Unsloth Desktop
- Docker Model Runner
How to use tanujrai/gemma-3-1b-it-Q4_0 with Docker Model Runner:
docker model run hf.co/tanujrai/gemma-3-1b-it-Q4_0:Q4_0
- Lemonade
How to use tanujrai/gemma-3-1b-it-Q4_0 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tanujrai/gemma-3-1b-it-Q4_0:Q4_0
Run and chat with the model
lemonade run user.gemma-3-1b-it-Q4_0-Q4_0
List all available models
lemonade list
- Atomic Chat
Gemma-3-1b-it Q4_0 Quantized Model
This is a Q4_0 quantized version of the google/gemma-3-1b-it model, converted to GGUF format and optimized for efficient inference. It was created using llama.cpp tools in Google Colab.
Model Details
- Base Model: google/gemma-3-1b-it
- Quantization: Q4_0 (4-bit quantization)
- Format: GGUF
- Size: ~1โ1.5 GB
- Converted Using:
llama.cpp(commit from April 2025) - License: Inherits the license from
google/gemma-3-1b-it
Usage
To use this model with llama.cpp:
./llama-cli -m gemma-3-1b-it-Q4_0.gguf --prompt "Hello, world!" --no-interactive
How It Was Created
- Downloaded
google/gemma-3-1b-itfrom Hugging Face. - Converted to GGUF using
convert_hf_to_gguf.py. - Quantized to Q4_0 using
llama-quantizefromllama.cpp. - Tested in Google Colab with
llama-cli.
Limitations
- Quantization may reduce accuracy compared to the original model.
- Requires
llama.cppor compatible software for inference.
Acknowledgments
- Based on the work of bartowski for GGUF quantization.
- Uses
llama.cppby Georgi Gerganov.
- Downloads last month
- 11
Hardware compatibility
Log In to add your hardware
4-bit