Instructions to use RichardErkhov/unsloth_-_gemma-2b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use RichardErkhov/unsloth_-_gemma-2b-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="RichardErkhov/unsloth_-_gemma-2b-gguf", filename="gemma-2b.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 RichardErkhov/unsloth_-_gemma-2b-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf RichardErkhov/unsloth_-_gemma-2b-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf RichardErkhov/unsloth_-_gemma-2b-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 RichardErkhov/unsloth_-_gemma-2b-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf RichardErkhov/unsloth_-_gemma-2b-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 RichardErkhov/unsloth_-_gemma-2b-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf RichardErkhov/unsloth_-_gemma-2b-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 RichardErkhov/unsloth_-_gemma-2b-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf RichardErkhov/unsloth_-_gemma-2b-gguf:Q4_K_M
Use Docker
docker model run hf.co/RichardErkhov/unsloth_-_gemma-2b-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use RichardErkhov/unsloth_-_gemma-2b-gguf with Ollama:
ollama run hf.co/RichardErkhov/unsloth_-_gemma-2b-gguf:Q4_K_M
- Unsloth Studio new
How to use RichardErkhov/unsloth_-_gemma-2b-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 RichardErkhov/unsloth_-_gemma-2b-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 RichardErkhov/unsloth_-_gemma-2b-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for RichardErkhov/unsloth_-_gemma-2b-gguf to start chatting
- Docker Model Runner
How to use RichardErkhov/unsloth_-_gemma-2b-gguf with Docker Model Runner:
docker model run hf.co/RichardErkhov/unsloth_-_gemma-2b-gguf:Q4_K_M
- Lemonade
How to use RichardErkhov/unsloth_-_gemma-2b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RichardErkhov/unsloth_-_gemma-2b-gguf:Q4_K_M
Run and chat with the model
lemonade run user.unsloth_-_gemma-2b-gguf-Q4_K_M
List all available models
lemonade list
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Quantization made by Richard Erkhov.
gemma-2b - GGUF
- Model creator: https://huggingface.co/unsloth/
- Original model: https://huggingface.co/unsloth/gemma-2b/
| Name | Quant method | Size |
|---|---|---|
| gemma-2b.Q2_K.gguf | Q2_K | 1.08GB |
| gemma-2b.IQ3_XS.gguf | IQ3_XS | 1.16GB |
| gemma-2b.IQ3_S.gguf | IQ3_S | 1.2GB |
| gemma-2b.Q3_K_S.gguf | Q3_K_S | 1.2GB |
| gemma-2b.IQ3_M.gguf | IQ3_M | 1.22GB |
| gemma-2b.Q3_K.gguf | Q3_K | 1.29GB |
| gemma-2b.Q3_K_M.gguf | Q3_K_M | 1.29GB |
| gemma-2b.Q3_K_L.gguf | Q3_K_L | 1.36GB |
| gemma-2b.IQ4_XS.gguf | IQ4_XS | 1.4GB |
| gemma-2b.Q4_0.gguf | Q4_0 | 1.44GB |
| gemma-2b.IQ4_NL.gguf | IQ4_NL | 1.45GB |
| gemma-2b.Q4_K_S.gguf | Q4_K_S | 1.45GB |
| gemma-2b.Q4_K.gguf | Q4_K | 1.52GB |
| gemma-2b.Q4_K_M.gguf | Q4_K_M | 1.52GB |
| gemma-2b.Q4_1.gguf | Q4_1 | 1.56GB |
| gemma-2b.Q5_0.gguf | Q5_0 | 1.68GB |
| gemma-2b.Q5_K_S.gguf | Q5_K_S | 1.68GB |
| gemma-2b.Q5_K.gguf | Q5_K | 1.71GB |
| gemma-2b.Q5_K_M.gguf | Q5_K_M | 1.71GB |
| gemma-2b.Q5_1.gguf | Q5_1 | 1.79GB |
| gemma-2b.Q6_K.gguf | Q6_K | 1.92GB |
| gemma-2b.Q8_0.gguf | Q8_0 | 2.49GB |
Original model description:
language: - en license: apache-2.0 library_name: transformers tags: - unsloth - transformers - gemma - gemma-2b
Finetune Mistral, Gemma, Llama 2-5x faster with 70% less memory via Unsloth!
✨ Finetune for Free
All notebooks are beginner friendly! Add your dataset, click "Run All", and you'll get a 2x faster finetuned model which can be exported to GGUF, vLLM or uploaded to Hugging Face.
| Unsloth supports | Free Notebooks | Performance | Memory use |
|---|---|---|---|
| Gemma 7b | ▶️ Start on Colab | 2.4x faster | 58% less |
| Mistral 7b | ▶️ Start on Colab | 2.2x faster | 62% less |
| Llama-2 7b | ▶️ Start on Colab | 2.2x faster | 43% less |
| TinyLlama | ▶️ Start on Colab | 3.9x faster | 74% less |
| CodeLlama 34b A100 | ▶️ Start on Colab | 1.9x faster | 27% less |
| Mistral 7b 1xT4 | ▶️ Start on Kaggle | 5x faster* | 62% less |
| DPO - Zephyr | ▶️ Start on Colab | 1.9x faster | 19% less |
- This conversational notebook is useful for ShareGPT ChatML / Vicuna templates.
- This text completion notebook is for raw text. This DPO notebook replicates Zephyr.
- * Kaggle has 2x T4s, but we use 1. Due to overhead, 1x T4 is 5x faster.
- Downloads last month
- 107
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit


