Instructions to use mradermacher/codegemma-7b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mradermacher/codegemma-7b-GGUF with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mradermacher/codegemma-7b-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use mradermacher/codegemma-7b-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 mradermacher/codegemma-7b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf mradermacher/codegemma-7b-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf mradermacher/codegemma-7b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf mradermacher/codegemma-7b-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 mradermacher/codegemma-7b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf mradermacher/codegemma-7b-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 mradermacher/codegemma-7b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf mradermacher/codegemma-7b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/mradermacher/codegemma-7b-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use mradermacher/codegemma-7b-GGUF with Ollama:
ollama run hf.co/mradermacher/codegemma-7b-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use mradermacher/codegemma-7b-GGUF with Docker Model Runner:
docker model run hf.co/mradermacher/codegemma-7b-GGUF:Q4_K_M
- Lemonade
How to use mradermacher/codegemma-7b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mradermacher/codegemma-7b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.codegemma-7b-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download README.md from mradermacher/codegemma-7b-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 4.87 kB
-
https://huggingface.co/mradermacher/codegemma-7b-GGUF/resolve/9d29e990c9933d084176f87ea451cf26d355ee25/README.md
- Command line
-
hf download hf://mradermacher/codegemma-7b-GGUF@9d29e990c9933d084176f87ea451cf26d355ee25/README.md
-
curl -L -o README.md https://huggingface.co/mradermacher/codegemma-7b-GGUF/resolve/9d29e990c9933d084176f87ea451cf26d355ee25/README.md
base_model: google/codegemma-7b
extra_gated_button_content: Acknowledge license
extra_gated_heading: Access CodeGemma on Hugging Face
extra_gated_prompt: >-
To access CodeGemma on Hugging Face, you’re required to review and agree to
Google’s usage license. To do this, please ensure you’re logged-in to Hugging
Face and click below. Requests are processed immediately.
language:
- en
library_name: transformers
license: gemma
license_link: https://ai.google.dev/gemma/terms
quantized_by: mradermacher
About
static quants of https://huggingface.co/google/codegemma-7b
weighted/imatrix quants are available at https://huggingface.co/mradermacher/CodeGemma-7b-i1-GGUF
Usage
If you are unsure how to use GGUF files, refer to one of TheBloke's READMEs for more details, including on how to concatenate multi-part files.
Provided Quants
(sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants)
| Link | Type | Size/GB | Notes |
|---|---|---|---|
| GGUF | Q4_0_4_4 | 5.1 | fast on arm, low quality |
| PART 1 PART 2 | Q2_K | 7.1 | |
| PART 1 PART 2 | Q3_K_S | 8.1 | |
| PART 1 PART 2 | Q3_K_M | 8.8 | lower quality |
| PART 1 PART 2 | Q3_K_L | 9.5 | |
| PART 1 PART 2 | IQ4_XS | 9.7 | |
| PART 1 PART 2 | Q4_K_S | 10.2 | fast, recommended |
| PART 1 PART 2 | Q4_K_M | 10.8 | fast, recommended |
| PART 1 PART 2 | Q5_K_S | 12.1 | |
| PART 1 PART 2 | Q5_K_M | 12.4 | |
| PART 1 PART 2 | Q6_K | 14.1 | very good quality |
| PART 1 PART 2 | Q8_0 | 18.3 | fast, best quality |
| PART 1 PART 2 | f16 | 34.3 | 16 bpw, overkill |
Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better):
And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9
FAQ / Model Request
See https://huggingface.co/mradermacher/model_requests for some answers to questions you might have and/or if you want some other model quantized.
Thanks
I thank my company, nethype GmbH, for letting me use its servers and providing upgrades to my workstation to enable this work in my free time.
