How to use from
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 chenghenry/gemma-2-9b-it-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf chenghenry/gemma-2-9b-it-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 chenghenry/gemma-2-9b-it-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf chenghenry/gemma-2-9b-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 chenghenry/gemma-2-9b-it-GGUF:Q4_K_M
# Run inference directly in the terminal:
./llama-cli -hf chenghenry/gemma-2-9b-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 chenghenry/gemma-2-9b-it-GGUF:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama-cli -hf chenghenry/gemma-2-9b-it-GGUF:Q4_K_M
Use Docker
docker model run hf.co/chenghenry/gemma-2-9b-it-GGUF:Q4_K_M
Quick Links

Usage (llama-cli with GPU):

llama-cli -m ./gemma-2-9b-it-Q6_K.gguf -ngl 100 --temp 0 --repeat-penalty 1.0 --color -p "Why is the sky blue?"

Usage (llama-cli with CPU):

llama-cli -m ./gemma-2-9b-it-Q6_K.gguf --temp 0 --repeat-penalty 1.0 --color -p "Why is the sky blue?"

Usage (llama-cpp-python via Hugging Face Hub):

from llama_cpp import Llama

llm = Llama.from_pretrained(
    repo_id="chenghenry/gemma-2-9b-it-GGUF",
    filename="gemma-2-9b-it-Q6_K.gguf",
    n_ctx=8192,
    n_batch=2048,
    n_gpu_layers=100,
    verbose=False,
    chat_format="gemma"
)

prompt = "Why is the sky blue?"

messages = [{"role": "user", "content": prompt}]
response = llm.create_chat_completion(
    messages=messages,
    repeat_penalty=1.0,
    temperature=0)

print(response["choices"][0]["message"]["content"])
Downloads last month
9
GGUF
Model size
9B params
Architecture
gemma2
Hardware compatibility
Log In to add your hardware

4-bit

6-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for chenghenry/gemma-2-9b-it-GGUF

Quantized
(172)
this model
Free AI Image Generator No sign-up. Instant results. Open Now