Instructions to use tensorblock/codegemma-7b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/codegemma-7b-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/codegemma-7b-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/codegemma-7b-GGUF", dtype="auto") - llama-cpp-python
How to use tensorblock/codegemma-7b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/codegemma-7b-GGUF", filename="CodeGemma-7b-Q2_K.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 tensorblock/codegemma-7b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tensorblock/codegemma-7b-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/codegemma-7b-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tensorblock/codegemma-7b-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/codegemma-7b-GGUF:Q2_K
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 tensorblock/codegemma-7b-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/codegemma-7b-GGUF:Q2_K
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 tensorblock/codegemma-7b-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/codegemma-7b-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/codegemma-7b-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/codegemma-7b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/codegemma-7b-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/codegemma-7b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/codegemma-7b-GGUF:Q2_K
- SGLang
How to use tensorblock/codegemma-7b-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 "tensorblock/codegemma-7b-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": "tensorblock/codegemma-7b-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 "tensorblock/codegemma-7b-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": "tensorblock/codegemma-7b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use tensorblock/codegemma-7b-GGUF with Ollama:
ollama run hf.co/tensorblock/codegemma-7b-GGUF:Q2_K
- Unsloth Studio new
How to use tensorblock/codegemma-7b-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 tensorblock/codegemma-7b-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 tensorblock/codegemma-7b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tensorblock/codegemma-7b-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/codegemma-7b-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/codegemma-7b-GGUF:Q2_K
- Lemonade
How to use tensorblock/codegemma-7b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/codegemma-7b-GGUF:Q2_K
Run and chat with the model
lemonade run user.codegemma-7b-GGUF-Q2_K
List all available models
lemonade list
Keep Q2_K/Q3_K_M gguf only
Browse files- CodeGemma-7b-Q3_K_L.gguf +0 -3
- CodeGemma-7b-Q3_K_S.gguf +0 -3
- CodeGemma-7b-Q4_0.gguf +0 -3
- CodeGemma-7b-Q4_K_M.gguf +0 -3
- CodeGemma-7b-Q4_K_S.gguf +0 -3
- CodeGemma-7b-Q5_0.gguf +0 -3
- CodeGemma-7b-Q5_K_M.gguf +0 -3
- CodeGemma-7b-Q5_K_S.gguf +0 -3
- CodeGemma-7b-Q6_K.gguf +0 -3
- CodeGemma-7b-Q8_0.gguf +0 -3
- codegemma-7b-Q3_K_L.gguf +0 -3
- codegemma-7b-Q3_K_S.gguf +0 -3
- codegemma-7b-Q4_0.gguf +0 -3
- codegemma-7b-Q4_K_M.gguf +0 -3
- codegemma-7b-Q4_K_S.gguf +0 -3
- codegemma-7b-Q5_0.gguf +0 -3
- codegemma-7b-Q5_K_M.gguf +0 -3
- codegemma-7b-Q5_K_S.gguf +0 -3
- codegemma-7b-Q6_K.gguf +0 -3
- codegemma-7b-Q8_0.gguf +0 -3
CodeGemma-7b-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5ef3ff8b0d9487114cc14bfbbe6d195250d77dfcb0031c5ad769283a594ba1f4
|
| 3 |
-
size 4709067680
|
|
|
|
|
|
|
|
|
|
|
|
CodeGemma-7b-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:8d4eaf3554028da512283c137ec0a5a076cfeff541a2579dad533c712e41c134
|
| 3 |
-
size 3982404512
|
|
|
|
|
|
|
|
|
|
|
|
CodeGemma-7b-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:89f6d84773349f84d1666a891a487ec6019857d6689d5272a911d0fc4118076e
|
| 3 |
-
size 5011844000
|
|
|
|
|
|
|
|
|
|
|
|
CodeGemma-7b-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:d5d5bbf040bbb804368cccb32082ce5ff18b445ea9321309cb174b31ebe283a9
|
| 3 |
-
size 5329759136
|
|
|
|
|
|
|
|
|
|
|
|
CodeGemma-7b-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:b3df62b00992341b68e8fb1efd35fb34c7a4e28c73dd74feb1aeea36111ce27c
|
| 3 |
-
size 5046447008
|
|
|
|
|
|
|
|
|
|
|
|
CodeGemma-7b-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:f1a6439b43fe26d62ec79493ca8eefa946ec8d8d35e3260bc6f3d6cb3d0d20ec
|
| 3 |
-
size 5980728224
|
|
|
|
|
|
|
|
|
|
|
|
CodeGemma-7b-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:c90b8e3715fd450537d479c5db3fd7aa04d3973aa73be9570e55f26f086630bc
|
| 3 |
-
size 6144502688
|
|
|
|
|
|
|
|
|
|
|
|
CodeGemma-7b-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:0ec6d718ab16f6b11bcfc35f8ee8eb7b4348dd7d76e700623ff26bde56542199
|
| 3 |
-
size 5980728224
|
|
|
|
|
|
|
|
|
|
|
|
CodeGemma-7b-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:0f76577857c2ca2c2912382832b6be647a8ec2bc48a6a2989d7e2c1f744ee20b
|
| 3 |
-
size 7010167712
|
|
|
|
|
|
|
|
|
|
|
|
CodeGemma-7b-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:596348c1cdfa437e6ba9c4e75af57f1dbc92c2cfaf4958a2aa97203f1878b815
|
| 3 |
-
size 9077844896
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:b3cc329c6b4e5daf375317900c97aaf70e43900ef33c98d25c3ba0d26b003a5a
|
| 3 |
-
size 4709066528
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:ed38f8a5f7063e754537b2a4a700ca66d3e6c801266a2ab712d9314c7535f929
|
| 3 |
-
size 3982403360
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:8118250af7828462c4ec723816f776402911fd969aea5a49fbcb5e302c1b2c46
|
| 3 |
-
size 5011842848
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6f47d769379335fa4a3c47c169760d00290b21c5c95a5a1384d16b96516f5dd4
|
| 3 |
-
size 5329757984
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:0654e49a61684b11c8743abcf59432e39d3280dd35238fb6be56bd75f84e6347
|
| 3 |
-
size 5046445856
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:97316e0e6a8219814ea17aa746a0c8d67f17fa3ad655973f2d78e290f152fb64
|
| 3 |
-
size 5980727072
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:adeea2f895d072691ba8a7b21624764caf8a95faa1e5524651fa63b23134ea2a
|
| 3 |
-
size 6144501536
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5b02603ca0da52c62d6b638f9060f5d8441c49724dbefd1adf65c94a1032f9d3
|
| 3 |
-
size 5980727072
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:cca73a3a09e1bc85c6a7df086e2c432cca0d23b7dc484c409d4593b92c314c6e
|
| 3 |
-
size 7010166560
|
|
|
|
|
|
|
|
|
|
|
|
codegemma-7b-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:26a35e6a52c10c1f89929ac3e4ae96592efb7f925502544f132e06309ab77315
|
| 3 |
-
size 9077843744
|
|
|
|
|
|
|
|
|
|
|
|