Instructions to use agiws/gemma4-llama-cpp 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 agiws/gemma4-llama-cpp 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 agiws/gemma4-llama-cpp:Q4_K_M # Run inference directly in the terminal: llama cli -hf agiws/gemma4-llama-cpp:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf agiws/gemma4-llama-cpp:Q4_K_M # Run inference directly in the terminal: llama cli -hf agiws/gemma4-llama-cpp:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf agiws/gemma4-llama-cpp:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf agiws/gemma4-llama-cpp:Q4_K_M
Use Docker
docker model run hf.co/agiws/gemma4-llama-cpp:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use agiws/gemma4-llama-cpp with Ollama:
ollama run hf.co/agiws/gemma4-llama-cpp:Q4_K_M
- Unsloth Desktop
- Pi
How to use agiws/gemma4-llama-cpp with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf agiws/gemma4-llama-cpp:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "agiws/gemma4-llama-cpp:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use agiws/gemma4-llama-cpp with Docker Model Runner:
docker model run hf.co/agiws/gemma4-llama-cpp:Q4_K_M
- Lemonade
How to use agiws/gemma4-llama-cpp with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull agiws/gemma4-llama-cpp:Q4_K_M
Run and chat with the model
lemonade run user.gemma4-llama-cpp-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use agiws/gemma4-llama-cpp with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf agiws/gemma4-llama-cpp:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default agiws/gemma4-llama-cpp:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use agiws/gemma4-llama-cpp with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf agiws/gemma4-llama-cpp:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "agiws/gemma4-llama-cpp:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload folder using huggingface_hub
Browse files- README.md +45 -0
- src/llama-cpp-src.tar.gz +3 -0
README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# llama.cpp (fork) β Gemma 4 + audio (mtmd)
|
| 2 |
+
|
| 3 |
+
Source snapshot of the private llama.cpp fork used by AGIWS inference workers.
|
| 4 |
+
|
| 5 |
+
## What is inside
|
| 6 |
+
|
| 7 |
+
- `src/models/gemma4.cpp`, `gemma4-assistant.cpp` β text models `gemma4`, `gemma4-assistant`.
|
| 8 |
+
- `tools/mtmd/clip.cpp` β graphs `clip_graph_gemma4a` / `clip_graph_gemma4ua` (audio encoders).
|
| 9 |
+
- `tools/mtmd/mtmd-audio.cpp` β preprocessors `gemma4a` / `gemma4ua`, mel filters, streaming.
|
| 10 |
+
- `tools/mtmd/mtmd.h` β `mtmd_support_audio`, `mtmd_bitmap_init_from_audio`.
|
| 11 |
+
- `tools/server` β OpenAI-compatible server accepting `input_audio` content parts.
|
| 12 |
+
- `conversion/gemma.py` β `Gemma4Model` GGUF converter (`Gemma4ForConditionalGeneration`).
|
| 13 |
+
|
| 14 |
+
## Files
|
| 15 |
+
|
| 16 |
+
- `src/llama-cpp-src.tar.gz` β full source tree (no `.git`, no build artifacts).
|
| 17 |
+
- `lib/*.so` β prebuilt CUDA libraries and `llama-server` for T4 (sm_75), uploaded by the build job.
|
| 18 |
+
- `lib/BUILD_INFO.txt` β compiler, CUDA version, git-less snapshot hash, sha256 of every artifact.
|
| 19 |
+
|
| 20 |
+
## Build (Colab T4)
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
tar -xzf src/llama-cpp-src.tar.gz -C /content/llama-cpp-fork
|
| 24 |
+
cmake -S /content/llama-cpp-fork -B /content/llama-cpp-fork/build \
|
| 25 |
+
-DCMAKE_BUILD_TYPE=Release \
|
| 26 |
+
-DGGML_CUDA=ON \
|
| 27 |
+
-DGGML_NATIVE=OFF \
|
| 28 |
+
-DCMAKE_CUDA_ARCHITECTURES=75 \
|
| 29 |
+
-DBUILD_SHARED_LIBS=ON \
|
| 30 |
+
-DLLAMA_CURL=OFF \
|
| 31 |
+
-DLLAMA_BUILD_TESTS=OFF \
|
| 32 |
+
-DLLAMA_BUILD_EXAMPLES=OFF
|
| 33 |
+
cmake --build /content/llama-cpp-fork/build -j"$(nproc)" --target llama-server
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
Artifacts needed at runtime: `llama-server` plus `libllama.so*`, `libmtmd.so*`, `libggml*.so*`
|
| 37 |
+
(`libggml-base`, `libggml-cpu`, `libggml-cuda`, `libggml`).
|
| 38 |
+
|
| 39 |
+
Runtime flags for Gemma audio:
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
LD_LIBRARY_PATH=/content/llama/lib \
|
| 43 |
+
/content/llama/lib/llama-server -m .../gemma-4-12b-it-Q4_K_M.gguf \
|
| 44 |
+
--mmproj .../mmproj-F16.gguf -ngl 99 -c 4096 --host 127.0.0.1 --port 8091
|
| 45 |
+
```
|
src/llama-cpp-src.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:654fd863f3de8fcf3bb12d47a065a0bda02e48e752010f194c0f5ff783a796b4
|
| 3 |
+
size 15055639
|