Instructions to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF 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 maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-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 maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-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 maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-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 maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-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 maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
Use Docker
docker model run hf.co/maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
- Ollama
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with Ollama:
ollama run hf.co/maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF: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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with Docker Model Runner:
docker model run hf.co/maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
- Lemonade
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF: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:8080/v1 hermes config set model.default maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF: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:8080/v1 \ --custom-model-id "maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF: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"
Duplicate from yuxinlu1/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF
Browse filesCo-authored-by: Yuxin Lu <yuxinlu1@users.noreply.huggingface.co>
- .gitattributes +43 -0
- MTP/gemma-4-12B-it-MTP-BF16.gguf +3 -0
- MTP/gemma-4-12B-it-MTP-F16.gguf +3 -0
- MTP/gemma-4-12B-it-MTP-Q8_0.gguf +3 -0
- README.md +144 -0
- fp16/chat_template.jinja +363 -0
- fp16/config.json +169 -0
- fp16/generation_config.json +18 -0
- fp16/model.safetensors +3 -0
- fp16/processor_config.json +62 -0
- fp16/tokenizer.json +3 -0
- fp16/tokenizer_config.json +96 -0
- gemma4-opus48-Q2_K.gguf +3 -0
- gemma4-opus48-Q4_K_M.gguf +3 -0
- gemma4-opus48-Q6_K.gguf +3 -0
- gemma4-opus48-Q8_0.gguf +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
gemma4-opus48-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
gemma4-opus48-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
gemma4-opus48-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
gemma4-opus48-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
fp16/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
MTP/gemma-4-12B-it-MTP-BF16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
MTP/gemma-4-12B-it-MTP-F16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
MTP/gemma-4-12B-it-MTP-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
MTP/gemma-4-12B-it-MTP-BF16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:20b0e5caf9152e816a56f92c702528bffc7a7c930f20c33cf6616ac216998037
|
| 3 |
+
size 861520128
|
MTP/gemma-4-12B-it-MTP-F16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee0987dd6c29dae4c183713f5614814808f284c28f11c739d3ba075e73332ccf
|
| 3 |
+
size 861520128
|
MTP/gemma-4-12B-it-MTP-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:145db9094bc0f85f1701e255a2ed216dcc9800fc8bc8631ad00905b456bd451b
|
| 3 |
+
size 465109248
|
README.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
base_model: google/gemma-4-12B-it
|
| 4 |
+
library_name: gguf
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags: [gemma4, reasoning, thinking, gguf, llama.cpp, local-llm]
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# ✨ Gemma4-12B-Reasoning-Distill (GGUF) ✨
|
| 10 |
+
### 🐣 Tiny footprint, big brain — local AI for *everyone*
|
| 11 |
+
|
| 12 |
+
> **No matter your GPU. No matter your RAM.** If you've got **~4.5 GB** of VRAM *or* unified memory free,
|
| 13 |
+
> you can run your own private, offline AI right now. 🚀
|
| 14 |
+
> Tuned on **Opus 4.6, 4.7 & 4.8** reasoning data, it delivers a **major leap in reasoning power** —
|
| 15 |
+
> whether you're asking questions or writing code. 🧠💻 All local, all yours, no API, no cloud.
|
| 16 |
+
|
| 17 |
+
### ⚡ NEW — the **MTP version is here!** Free speed 🎉
|
| 18 |
+
**As of June 7, 2026**, mainline llama.cpp *just* merged Gemma 4 MTP support — so the **MTP draft model** is now
|
| 19 |
+
live in the [`MTP/`](https://huggingface.co/yuxinlu1/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF/tree/main/MTP) folder.
|
| 20 |
+
Drop it next to any quant and generation gets **noticeably faster with identical output** (speculative decoding is
|
| 21 |
+
lossless) — just add a couple of flags. 👉 See **⚡ Speed it up with MTP** below. 💚
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## 📦 Pick your size (GGUF quants)
|
| 26 |
+
|
| 27 |
+
| Quant | Size | Vibe |
|
| 28 |
+
|------|------|------|
|
| 29 |
+
| 🟢 **Q2_K** | **4.5 GB** | tiniest — runs almost anywhere |
|
| 30 |
+
| 🔵 **Q4_K_M** | **6.87 GB** | the sweet spot 👌 (recommended) |
|
| 31 |
+
| 🟣 **Q6_K** | **9.11 GB** | near-lossless |
|
| 32 |
+
| ⚪ **Q8_0** | **11.8 GB** | basically full quality |
|
| 33 |
+
| (f16) | 22.2 GB | full precision (overkill for most) |
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## 🧮 "Will it fit?" — context length cheat-sheet
|
| 38 |
+
|
| 39 |
+
Rough estimates 🤓 (assumes `q8_0` KV cache + ~1.5 GB overhead; **use `q4_0` KV cache for ≈2× more context!**).
|
| 40 |
+
Max context is **131K**. "—" = won't fit, pick a smaller quant. ✂️
|
| 41 |
+
|
| 42 |
+
| Your VRAM / unified mem | 🟢 Q2_K (4.5G) | 🔵 Q4_K_M (6.87G) | 🟣 Q6_K (9.11G) | ⚪ Q8_0 (11.8G) |
|
| 43 |
+
|---|---|---|---|---|
|
| 44 |
+
| **8 GB** | ~16K ctx | tight (~2–4K) | — | — |
|
| 45 |
+
| **12 GB** | ~48K | ~30K | ~12K | — |
|
| 46 |
+
| **16 GB** | ~80K | ~64K | ~44K | ~22K |
|
| 47 |
+
| **24 GB** | 131K (max) 🎉 | ~128K | ~110K | ~88K |
|
| 48 |
+
| **32 GB** | 131K | 131K | 131K | 131K |
|
| 49 |
+
|
| 50 |
+
> 💡 Apple Silicon / integrated GPUs with **unified memory** count too — same numbers, just slower than a dGPU.
|
| 51 |
+
> 💡 Low on room? Drop a quant or switch KV cache to `q4_0` and your context roughly doubles.
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## ⚡ Speed it up with MTP (free & lossless) 🏎️
|
| 56 |
+
|
| 57 |
+
**New as of June 7, 2026!** Gemma 4's *Multi-Token Prediction* drafter lets the model **guess a few tokens ahead** and
|
| 58 |
+
verify them in one shot — so you get more tokens/sec with **byte-for-byte identical output**. Pure speed, zero quality
|
| 59 |
+
cost. 🪄
|
| 60 |
+
|
| 61 |
+
**1.** Grab the tiny draft from the [`MTP/`](https://huggingface.co/yuxinlu1/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF/tree/main/MTP) folder:
|
| 62 |
+
|
| 63 |
+
| Draft file | Size | Use it for |
|
| 64 |
+
|---|---|---|
|
| 65 |
+
| ⚪ **`gemma-4-12B-it-MTP-Q8_0.gguf`** | **0.44 GB** | **recommended** — tiny + full speed |
|
| 66 |
+
| `…-F16.gguf` / `…-BF16.gguf` | 0.82 GB | full-precision draft (overkill) |
|
| 67 |
+
|
| 68 |
+
> 💡 The draft is **tiny** — keep it **Q8 or higher** (over-quantizing a draft just lowers its hit rate). It pairs with **any** quant of the main model.
|
| 69 |
+
|
| 70 |
+
**2.** You need a **fresh llama.cpp build — June 7 2026 (`b9553`) or newer**. MTP was *just* merged, so older builds
|
| 71 |
+
can't load the draft (`unknown architecture: 'gemma4-assistant'`).
|
| 72 |
+
|
| 73 |
+
**3.** Run it exactly like below, just **+3 flags** (`--model-draft`, `--spec-type`, `--n-gpu-layers-draft`):
|
| 74 |
+
|
| 75 |
+
```bat
|
| 76 |
+
@echo off
|
| 77 |
+
cd /d C:\llama.cpp
|
| 78 |
+
llama-server.exe ^
|
| 79 |
+
-m C:\models\gemma4-opus48-Q4_K_M.gguf ^
|
| 80 |
+
--model-draft C:\models\MTP\gemma-4-12B-it-MTP-Q8_0.gguf ^
|
| 81 |
+
--spec-type draft-mtp --spec-draft-n-max 4 ^
|
| 82 |
+
--ctx-size 16384 --n-gpu-layers 99 --n-gpu-layers-draft 99 ^
|
| 83 |
+
--no-mmap -fa on ^
|
| 84 |
+
--temp 1.0 --top-p 0.95 --top-k 64 ^
|
| 85 |
+
--host 0.0.0.0 --port 18080
|
| 86 |
+
pause
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
**Measured on a single RTX 5090** (Q4_K_M main + Q8 draft): **~1.3× faster** at greedy and **~1.2×** at the default
|
| 90 |
+
thinking sampling — free, with no change to output. 🎈
|
| 91 |
+
|
| 92 |
+
> 🔧 *Heads-up:* this is the **stock** Gemma drafter (trained on base Gemma 4), so on this fine-tune the hit rate —
|
| 93 |
+
> and thus the speedup — is a little lower than on vanilla Gemma 4. A re-aligned draft could push it higher (maybe a
|
| 94 |
+
> future update). Either way: free speed, no downside. 💚
|
| 95 |
+
|
| 96 |
+
---
|
| 97 |
+
|
| 98 |
+
## 🚀 How to run it (super easy)
|
| 99 |
+
|
| 100 |
+
### Option A — llama.cpp (recommended) 🦙
|
| 101 |
+
1. Grab a quant above (e.g. `…-Q4_K_M.gguf`) and `llama-server` from [llama.cpp](https://github.com/ggml-org/llama.cpp).
|
| 102 |
+
> ⚠️ Needs a **recent llama.cpp** (this is the `gemma4_unified` architecture — older builds won't load it).
|
| 103 |
+
2. Run a server (Windows `.bat` shown — tweak `--port`, `--ctx-size` to taste):
|
| 104 |
+
|
| 105 |
+
```bat
|
| 106 |
+
@echo off
|
| 107 |
+
cd /d C:\llama.cpp
|
| 108 |
+
llama-server.exe ^
|
| 109 |
+
-m C:\models\gemma4-opus48-Q4_K_M.gguf ^
|
| 110 |
+
--ctx-size 16384 ^
|
| 111 |
+
--n-gpu-layers 99 ^
|
| 112 |
+
--no-mmap ^
|
| 113 |
+
-fa on ^
|
| 114 |
+
--cache-type-k q8_0 --cache-type-v q8_0 ^
|
| 115 |
+
--temp 1.0 --top-p 0.95 --top-k 64 ^
|
| 116 |
+
--host 0.0.0.0 --port 18080
|
| 117 |
+
pause
|
| 118 |
+
```
|
| 119 |
+
3. Open `http://localhost:18080` and chat. 🎉 (Tip: bump `--ctx-size` per the table; use `q4_0` KV for more.)
|
| 120 |
+
|
| 121 |
+
### Option B — one-click apps 🖱️
|
| 122 |
+
Works in **LM Studio**, **Jan**, **Ollama**, etc. — just import the GGUF, pick your quant, go. 🐾
|
| 123 |
+
|
| 124 |
+
### 🧠 Thinking mode
|
| 125 |
+
This model thinks in Gemma's native thought channel. Keep **`enable_thinking=true`** (the default chat template
|
| 126 |
+
handles it). Recommended sampling: `temp 1.0, top_p 0.95, top_k 64`.
|
| 127 |
+
|
| 128 |
+
---
|
| 129 |
+
|
| 130 |
+
## ⚠️ Good to know
|
| 131 |
+
- **Reduced refusals:** the training data omits safety hedging, so this refuses less than the base model.
|
| 132 |
+
It is **not** safety-aligned — add your own guardrails for production. Use responsibly. 🙏
|
| 133 |
+
- Reasoning is *stylistic* synthetic CoT — great for structure, but double-check facts/numbers.
|
| 134 |
+
- English-centric.
|
| 135 |
+
|
| 136 |
+
---
|
| 137 |
+
|
| 138 |
+
## 📚 Data & License
|
| 139 |
+
- **Base model:** [`google/gemma-4-12B-it`](https://huggingface.co/google/gemma-4-12B-it). Subject to the
|
| 140 |
+
**[Gemma Terms of Use](https://ai.google.dev/gemma/terms)** (derivatives must comply).
|
| 141 |
+
- **Training data:** built on the public, **Apache-2.0** dataset
|
| 142 |
+
[`angrygiraffe/claude-opus-4.6-4.7-reasoning-8.7k`](https://huggingface.co/datasets/angrygiraffe/claude-opus-4.6-4.7-reasoning-8.7k),
|
| 143 |
+
**augmented with additional Opus 4.8-generated reasoning samples** I curated and mixed in.
|
| 144 |
+
- Personal/hobby project — shared as-is, no warranty. Have fun! 🐾✨
|
fp16/chat_template.jinja
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- macro format_parameters(properties, required, filter_keys=false) -%}
|
| 2 |
+
{%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}
|
| 3 |
+
{%- set ns = namespace(found_first=false) -%}
|
| 4 |
+
{%- for key, value in properties | dictsort -%}
|
| 5 |
+
{%- set add_comma = false -%}
|
| 6 |
+
{%- if not filter_keys or key not in standard_keys -%}
|
| 7 |
+
{%- if ns.found_first %},{% endif -%}
|
| 8 |
+
{%- set ns.found_first = true -%}
|
| 9 |
+
{{ key }}:{
|
| 10 |
+
{%- if value['description'] -%}
|
| 11 |
+
description:<|"|>{{ value['description'] }}<|"|>
|
| 12 |
+
{%- set add_comma = true -%}
|
| 13 |
+
{%- endif -%}
|
| 14 |
+
{%- if value['type'] | upper == 'STRING' -%}
|
| 15 |
+
{%- if value['enum'] -%}
|
| 16 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 17 |
+
enum:{{ format_argument(value['enum']) }}
|
| 18 |
+
{%- endif -%}
|
| 19 |
+
{%- elif value['type'] | upper == 'ARRAY' -%}
|
| 20 |
+
{%- if value['items'] is mapping and value['items'] -%}
|
| 21 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 22 |
+
items:{
|
| 23 |
+
{%- set ns_items = namespace(found_first=false) -%}
|
| 24 |
+
{%- for item_key, item_value in value['items'] | dictsort -%}
|
| 25 |
+
{%- if item_value is not none -%}
|
| 26 |
+
{%- if ns_items.found_first %},{% endif -%}
|
| 27 |
+
{%- set ns_items.found_first = true -%}
|
| 28 |
+
{%- if item_key == 'properties' -%}
|
| 29 |
+
properties:{
|
| 30 |
+
{%- if item_value is mapping -%}
|
| 31 |
+
{{- format_parameters(item_value, value['items']['required'] | default([])) -}}
|
| 32 |
+
{%- endif -%}
|
| 33 |
+
}
|
| 34 |
+
{%- elif item_key == 'required' -%}
|
| 35 |
+
required:[
|
| 36 |
+
{%- for req_item in item_value -%}
|
| 37 |
+
<|"|>{{- req_item -}}<|"|>
|
| 38 |
+
{%- if not loop.last %},{% endif -%}
|
| 39 |
+
{%- endfor -%}
|
| 40 |
+
]
|
| 41 |
+
{%- elif item_key == 'type' -%}
|
| 42 |
+
{%- if item_value is string -%}
|
| 43 |
+
type:{{ format_argument(item_value | upper) }}
|
| 44 |
+
{%- else -%}
|
| 45 |
+
type:{{ format_argument(item_value | map('upper') | list) }}
|
| 46 |
+
{%- endif -%}
|
| 47 |
+
{%- else -%}
|
| 48 |
+
{{ item_key }}:{{ format_argument(item_value) }}
|
| 49 |
+
{%- endif -%}
|
| 50 |
+
{%- endif -%}
|
| 51 |
+
{%- endfor -%}
|
| 52 |
+
}
|
| 53 |
+
{%- endif -%}
|
| 54 |
+
{%- endif -%}
|
| 55 |
+
{%- if value['nullable'] %}
|
| 56 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 57 |
+
nullable:true
|
| 58 |
+
{%- endif -%}
|
| 59 |
+
{%- if value['type'] | upper == 'OBJECT' -%}
|
| 60 |
+
{%- if value['properties'] is defined and value['properties'] is mapping -%}
|
| 61 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 62 |
+
properties:{
|
| 63 |
+
{{- format_parameters(value['properties'], value['required'] | default([])) -}}
|
| 64 |
+
}
|
| 65 |
+
{%- elif value is mapping -%}
|
| 66 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 67 |
+
properties:{
|
| 68 |
+
{{- format_parameters(value, value['required'] | default([]), filter_keys=true) -}}
|
| 69 |
+
}
|
| 70 |
+
{%- endif -%}
|
| 71 |
+
{%- if value['required'] -%}
|
| 72 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 73 |
+
required:[
|
| 74 |
+
{%- for item in value['required'] | default([]) -%}
|
| 75 |
+
<|"|>{{- item -}}<|"|>
|
| 76 |
+
{%- if not loop.last %},{% endif -%}
|
| 77 |
+
{%- endfor -%}
|
| 78 |
+
]
|
| 79 |
+
{%- endif -%}
|
| 80 |
+
{%- endif -%}
|
| 81 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 82 |
+
type:<|"|>{{ value['type'] | upper }}<|"|>}
|
| 83 |
+
{%- endif -%}
|
| 84 |
+
{%- endfor -%}
|
| 85 |
+
{%- endmacro -%}
|
| 86 |
+
{%- macro format_function_declaration(tool_data) -%}
|
| 87 |
+
declaration:{{- tool_data['function']['name'] -}}{description:<|"|>{{- tool_data['function']['description'] -}}<|"|>
|
| 88 |
+
{%- set params = tool_data['function']['parameters'] -%}
|
| 89 |
+
{%- if params -%}
|
| 90 |
+
,parameters:{
|
| 91 |
+
{%- if params['properties'] -%}
|
| 92 |
+
properties:{ {{- format_parameters(params['properties'], params['required']) -}} },
|
| 93 |
+
{%- endif -%}
|
| 94 |
+
{%- if params['required'] -%}
|
| 95 |
+
required:[
|
| 96 |
+
{%- for item in params['required'] -%}
|
| 97 |
+
<|"|>{{- item -}}<|"|>
|
| 98 |
+
{{- ',' if not loop.last -}}
|
| 99 |
+
{%- endfor -%}
|
| 100 |
+
],
|
| 101 |
+
{%- endif -%}
|
| 102 |
+
{%- if params['type'] -%}
|
| 103 |
+
type:<|"|>{{- params['type'] | upper -}}<|"|>}
|
| 104 |
+
{%- endif -%}
|
| 105 |
+
{%- endif -%}
|
| 106 |
+
{%- if 'response' in tool_data['function'] -%}
|
| 107 |
+
{%- set response_declaration = tool_data['function']['response'] -%}
|
| 108 |
+
,response:{
|
| 109 |
+
{%- if response_declaration['description'] -%}
|
| 110 |
+
description:<|"|>{{- response_declaration['description'] -}}<|"|>,
|
| 111 |
+
{%- endif -%}
|
| 112 |
+
{%- if response_declaration['type'] | upper == 'OBJECT' -%}
|
| 113 |
+
type:<|"|>{{- response_declaration['type'] | upper -}}<|"|>}
|
| 114 |
+
{%- endif -%}
|
| 115 |
+
{%- endif -%}
|
| 116 |
+
}
|
| 117 |
+
{%- endmacro -%}
|
| 118 |
+
{%- macro format_argument(argument, escape_keys=True) -%}
|
| 119 |
+
{%- if argument is string -%}
|
| 120 |
+
{{- '<|"|>' + argument + '<|"|>' -}}
|
| 121 |
+
{%- elif argument is boolean -%}
|
| 122 |
+
{{- 'true' if argument else 'false' -}}
|
| 123 |
+
{%- elif argument is mapping -%}
|
| 124 |
+
{{- '{' -}}
|
| 125 |
+
{%- set ns = namespace(found_first=false) -%}
|
| 126 |
+
{%- for key, value in argument | dictsort -%}
|
| 127 |
+
{%- if ns.found_first %},{% endif -%}
|
| 128 |
+
{%- set ns.found_first = true -%}
|
| 129 |
+
{%- if escape_keys -%}
|
| 130 |
+
{{- '<|"|>' + key + '<|"|>' -}}
|
| 131 |
+
{%- else -%}
|
| 132 |
+
{{- key -}}
|
| 133 |
+
{%- endif -%}
|
| 134 |
+
:{{- format_argument(value, escape_keys=escape_keys) -}}
|
| 135 |
+
{%- endfor -%}
|
| 136 |
+
{{- '}' -}}
|
| 137 |
+
{%- elif argument is sequence -%}
|
| 138 |
+
{{- '[' -}}
|
| 139 |
+
{%- for item in argument -%}
|
| 140 |
+
{{- format_argument(item, escape_keys=escape_keys) -}}
|
| 141 |
+
{%- if not loop.last %},{% endif -%}
|
| 142 |
+
{%- endfor -%}
|
| 143 |
+
{{- ']' -}}
|
| 144 |
+
{%- else -%}
|
| 145 |
+
{{- argument -}}
|
| 146 |
+
{%- endif -%}
|
| 147 |
+
{%- endmacro -%}
|
| 148 |
+
{%- macro strip_thinking(text) -%}
|
| 149 |
+
{%- set ns = namespace(result='') -%}
|
| 150 |
+
{%- for part in text.split('<channel|>') -%}
|
| 151 |
+
{%- if '<|channel>' in part -%}
|
| 152 |
+
{%- set ns.result = ns.result + part.split('<|channel>')[0] -%}
|
| 153 |
+
{%- else -%}
|
| 154 |
+
{%- set ns.result = ns.result + part -%}
|
| 155 |
+
{%- endif -%}
|
| 156 |
+
{%- endfor -%}
|
| 157 |
+
{{- ns.result | trim -}}
|
| 158 |
+
{%- endmacro -%}
|
| 159 |
+
|
| 160 |
+
{%- macro format_tool_response_block(tool_name, response) -%}
|
| 161 |
+
{{- '<|tool_response>' -}}
|
| 162 |
+
{%- if response is mapping -%}
|
| 163 |
+
{{- 'response:' + tool_name + '{' -}}
|
| 164 |
+
{%- for key, value in response | dictsort -%}
|
| 165 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 166 |
+
{%- if not loop.last %},{% endif -%}
|
| 167 |
+
{%- endfor -%}
|
| 168 |
+
{{- '}' -}}
|
| 169 |
+
{%- else -%}
|
| 170 |
+
{{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}
|
| 171 |
+
{%- endif -%}
|
| 172 |
+
{{- '<tool_response|>' -}}
|
| 173 |
+
{%- endmacro -%}
|
| 174 |
+
|
| 175 |
+
{%- set ns = namespace(prev_message_type=None) -%}
|
| 176 |
+
{%- set loop_messages = messages -%}
|
| 177 |
+
{{- bos_token -}}
|
| 178 |
+
{#- Handle System/Tool Definitions Block -#}
|
| 179 |
+
{%- if (enable_thinking is defined and enable_thinking) or tools or messages[0]['role'] in ['system', 'developer'] -%}
|
| 180 |
+
{{- '<|turn>system\n' -}}
|
| 181 |
+
{#- Inject Thinking token at the very top of the FIRST system turn -#}
|
| 182 |
+
{%- if enable_thinking is defined and enable_thinking -%}
|
| 183 |
+
{{- '<|think|>\n' -}}
|
| 184 |
+
{%- set ns.prev_message_type = 'think' -%}
|
| 185 |
+
{%- endif -%}
|
| 186 |
+
{%- if messages[0]['role'] in ['system', 'developer'] -%}
|
| 187 |
+
{%- if messages[0]['content'] is string -%}
|
| 188 |
+
{{- messages[0]['content'] | trim -}}
|
| 189 |
+
{%- elif messages[0]['content'] is sequence -%}
|
| 190 |
+
{%- for item in messages[0]['content'] -%}
|
| 191 |
+
{{- item['text'] | trim + ' '-}}
|
| 192 |
+
{%- endfor -%}
|
| 193 |
+
{%- endif -%}
|
| 194 |
+
{%- set loop_messages = messages[1:] -%}
|
| 195 |
+
{%- endif -%}
|
| 196 |
+
{%- if tools -%}
|
| 197 |
+
{%- for tool in tools %}
|
| 198 |
+
{{- '<|tool>' -}}
|
| 199 |
+
{{- format_function_declaration(tool) | trim -}}
|
| 200 |
+
{{- '<tool|>' -}}
|
| 201 |
+
{%- endfor %}
|
| 202 |
+
{%- set ns.prev_message_type = 'tool' -%}
|
| 203 |
+
{%- endif -%}
|
| 204 |
+
{{- '<turn|>\n' -}}
|
| 205 |
+
{%- endif %}
|
| 206 |
+
|
| 207 |
+
{#- Pre-scan: find last user message index for reasoning guard -#}
|
| 208 |
+
{%- set ns_turn = namespace(last_user_idx=-1) -%}
|
| 209 |
+
{%- for i in range(loop_messages | length) -%}
|
| 210 |
+
{%- if loop_messages[i]['role'] == 'user' -%}
|
| 211 |
+
{%- set ns_turn.last_user_idx = i -%}
|
| 212 |
+
{%- endif -%}
|
| 213 |
+
{%- endfor -%}
|
| 214 |
+
|
| 215 |
+
{#- Loop through messages -#}
|
| 216 |
+
{%- for message in loop_messages -%}
|
| 217 |
+
{%- if message['role'] != 'tool' -%}
|
| 218 |
+
{%- set ns.prev_message_type = None -%}
|
| 219 |
+
{%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}
|
| 220 |
+
{#- Detect continuation: suppress duplicate <|turn>model when previous non-tool message was also assistant -#}
|
| 221 |
+
{%- set prev_nt = namespace(role=None, found=false) -%}
|
| 222 |
+
{%- if loop.index0 > 0 -%}
|
| 223 |
+
{%- for j in range(loop.index0 - 1, -1, -1) -%}
|
| 224 |
+
{%- if not prev_nt.found -%}
|
| 225 |
+
{%- if loop_messages[j]['role'] != 'tool' -%}
|
| 226 |
+
{%- set prev_nt.role = loop_messages[j]['role'] -%}
|
| 227 |
+
{%- set prev_nt.found = true -%}
|
| 228 |
+
{%- endif -%}
|
| 229 |
+
{%- endif -%}
|
| 230 |
+
{%- endfor -%}
|
| 231 |
+
{%- endif -%}
|
| 232 |
+
{%- set continue_same_model_turn = (role == 'model' and prev_nt.role == 'assistant') -%}
|
| 233 |
+
{%- if not continue_same_model_turn -%}
|
| 234 |
+
{{- '<|turn>' + role + '\n' }}
|
| 235 |
+
{%- endif -%}
|
| 236 |
+
|
| 237 |
+
{#- Render reasoning/reasoning_content as thinking channel -#}
|
| 238 |
+
{%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}
|
| 239 |
+
{%- if thinking_text and loop.index0 > ns_turn.last_user_idx and message.get('tool_calls') -%}
|
| 240 |
+
{{- '<|channel>thought\n' + thinking_text + '\n<channel|>' -}}
|
| 241 |
+
{%- endif -%}
|
| 242 |
+
|
| 243 |
+
{%- if message['tool_calls'] -%}
|
| 244 |
+
{%- for tool_call in message['tool_calls'] -%}
|
| 245 |
+
{%- set function = tool_call['function'] -%}
|
| 246 |
+
{{- '<|tool_call>call:' + function['name'] + '{' -}}
|
| 247 |
+
{%- if function['arguments'] is mapping -%}
|
| 248 |
+
{%- set ns_args = namespace(found_first=false) -%}
|
| 249 |
+
{%- for key, value in function['arguments'] | dictsort -%}
|
| 250 |
+
{%- if ns_args.found_first %},{% endif -%}
|
| 251 |
+
{%- set ns_args.found_first = true -%}
|
| 252 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 253 |
+
{%- endfor -%}
|
| 254 |
+
{%- elif function['arguments'] is string -%}
|
| 255 |
+
{{- function['arguments'] -}}
|
| 256 |
+
{%- endif -%}
|
| 257 |
+
{{- '}<tool_call|>' -}}
|
| 258 |
+
{%- endfor -%}
|
| 259 |
+
{%- set ns.prev_message_type = 'tool_call' -%}
|
| 260 |
+
{%- endif -%}
|
| 261 |
+
|
| 262 |
+
{%- set ns_tr_out = namespace(flag=false) -%}
|
| 263 |
+
{%- if message.get('tool_responses') -%}
|
| 264 |
+
{#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}
|
| 265 |
+
{%- for tool_response in message['tool_responses'] -%}
|
| 266 |
+
{{- format_tool_response_block(tool_response['name'] | default('unknown'), tool_response['response']) -}}
|
| 267 |
+
{%- set ns_tr_out.flag = true -%}
|
| 268 |
+
{%- set ns.prev_message_type = 'tool_response' -%}
|
| 269 |
+
{%- endfor -%}
|
| 270 |
+
{%- elif message.get('tool_calls') -%}
|
| 271 |
+
{#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}
|
| 272 |
+
{%- set ns_tool_scan = namespace(stopped=false) -%}
|
| 273 |
+
{%- for k in range(loop.index0 + 1, loop_messages | length) -%}
|
| 274 |
+
{%- if ns_tool_scan.stopped -%}
|
| 275 |
+
{%- elif loop_messages[k]['role'] != 'tool' -%}
|
| 276 |
+
{%- set ns_tool_scan.stopped = true -%}
|
| 277 |
+
{%- else -%}
|
| 278 |
+
{%- set follow = loop_messages[k] -%}
|
| 279 |
+
{#- Resolve tool_call_id to function name -#}
|
| 280 |
+
{%- set ns_tname = namespace(name=follow.get('name') | default('unknown')) -%}
|
| 281 |
+
{%- for tc in message['tool_calls'] -%}
|
| 282 |
+
{%- if tc.get('id') == follow.get('tool_call_id') -%}
|
| 283 |
+
{%- set ns_tname.name = tc['function']['name'] -%}
|
| 284 |
+
{%- endif -%}
|
| 285 |
+
{%- endfor -%}
|
| 286 |
+
{#- Handle content as string or content-parts array -#}
|
| 287 |
+
{%- set tool_body = follow.get('content') -%}
|
| 288 |
+
{%- if tool_body is string -%}
|
| 289 |
+
{{- format_tool_response_block(ns_tname.name, tool_body) -}}
|
| 290 |
+
{%- elif tool_body is sequence and tool_body is not string -%}
|
| 291 |
+
{%- set ns_txt = namespace(s='') -%}
|
| 292 |
+
{%- for part in tool_body -%}
|
| 293 |
+
{%- if part.get('type') == 'text' -%}
|
| 294 |
+
{%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}
|
| 295 |
+
{%- endif -%}
|
| 296 |
+
{%- endfor -%}
|
| 297 |
+
{{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}
|
| 298 |
+
{%- for part in tool_body -%}
|
| 299 |
+
{%- if part.get('type') == 'image' -%}
|
| 300 |
+
{{- '<|image|>' -}}
|
| 301 |
+
{%- elif part.get('type') == 'audio' -%}
|
| 302 |
+
{{- '<|audio|>' -}}
|
| 303 |
+
{%- elif part.get('type') == 'video' -%}
|
| 304 |
+
{{- '<|video|>' -}}
|
| 305 |
+
{%- endif -%}
|
| 306 |
+
{%- endfor -%}
|
| 307 |
+
{%- else -%}
|
| 308 |
+
{{- format_tool_response_block(ns_tname.name, tool_body) -}}
|
| 309 |
+
{%- endif -%}
|
| 310 |
+
{%- set ns_tr_out.flag = true -%}
|
| 311 |
+
{%- set ns.prev_message_type = 'tool_response' -%}
|
| 312 |
+
{%- endif -%}
|
| 313 |
+
{%- endfor -%}
|
| 314 |
+
{%- endif -%}
|
| 315 |
+
|
| 316 |
+
{%- set captured_content -%}
|
| 317 |
+
{%- if message['content'] is string -%}
|
| 318 |
+
{%- if role == 'model' -%}
|
| 319 |
+
{{- strip_thinking(message['content']) -}}
|
| 320 |
+
{%- else -%}
|
| 321 |
+
{{- message['content'] | trim -}}
|
| 322 |
+
{%- endif -%}
|
| 323 |
+
{%- elif message['content'] is sequence -%}
|
| 324 |
+
{%- for item in message['content'] -%}
|
| 325 |
+
{%- if item['type'] == 'text' -%}
|
| 326 |
+
{%- if role == 'model' -%}
|
| 327 |
+
{{- strip_thinking(item['text']) -}}
|
| 328 |
+
{%- else -%}
|
| 329 |
+
{{- item['text'] | trim -}}
|
| 330 |
+
{%- endif -%}
|
| 331 |
+
{%- elif item['type'] == 'image' -%}
|
| 332 |
+
{{- '<|image|>' -}}
|
| 333 |
+
{%- set ns.prev_message_type = 'image' -%}
|
| 334 |
+
{%- elif item['type'] == 'audio' -%}
|
| 335 |
+
{{- '<|audio|>' -}}
|
| 336 |
+
{%- set ns.prev_message_type = 'audio' -%}
|
| 337 |
+
{%- elif item['type'] == 'video' -%}
|
| 338 |
+
{{- '<|video|>' -}}
|
| 339 |
+
{%- set ns.prev_message_type = 'video' -%}
|
| 340 |
+
{%- endif -%}
|
| 341 |
+
{%- endfor -%}
|
| 342 |
+
{%- endif -%}
|
| 343 |
+
{%- endset -%}
|
| 344 |
+
|
| 345 |
+
{{- captured_content -}}
|
| 346 |
+
{%- set has_content = captured_content | trim | length > 0 -%}
|
| 347 |
+
|
| 348 |
+
{%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
|
| 349 |
+
{{- '<|tool_response>' -}}
|
| 350 |
+
{%- elif not (ns_tr_out.flag and not has_content) -%}
|
| 351 |
+
{{- '<turn|>\n' -}}
|
| 352 |
+
{%- endif -%}
|
| 353 |
+
{%- endif -%}
|
| 354 |
+
{%- endfor -%}
|
| 355 |
+
|
| 356 |
+
{%- if add_generation_prompt -%}
|
| 357 |
+
{%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
|
| 358 |
+
{{- '<|turn>model\n' -}}
|
| 359 |
+
{%- if not enable_thinking | default(false) -%}
|
| 360 |
+
{{- '<|channel>thought\n<channel|>' -}}
|
| 361 |
+
{%- endif -%}
|
| 362 |
+
{%- endif -%}
|
| 363 |
+
{%- endif -%}
|
fp16/config.json
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Gemma4UnifiedForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"audio_config": {
|
| 6 |
+
"_name_or_path": "",
|
| 7 |
+
"architectures": null,
|
| 8 |
+
"audio_embed_dim": 640,
|
| 9 |
+
"chunk_size_feed_forward": 0,
|
| 10 |
+
"dtype": "float16",
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "LABEL_0",
|
| 13 |
+
"1": "LABEL_1"
|
| 14 |
+
},
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"is_encoder_decoder": false,
|
| 17 |
+
"label2id": {
|
| 18 |
+
"LABEL_0": 0,
|
| 19 |
+
"LABEL_1": 1
|
| 20 |
+
},
|
| 21 |
+
"model_type": "gemma4_unified_audio",
|
| 22 |
+
"output_attentions": false,
|
| 23 |
+
"output_hidden_states": false,
|
| 24 |
+
"problem_type": null,
|
| 25 |
+
"return_dict": true,
|
| 26 |
+
"rms_norm_eps": 1e-06
|
| 27 |
+
},
|
| 28 |
+
"audio_token_id": 258881,
|
| 29 |
+
"boa_token_id": 256000,
|
| 30 |
+
"boi_token_id": 255999,
|
| 31 |
+
"dtype": "float16",
|
| 32 |
+
"eoa_token_index": 258883,
|
| 33 |
+
"eoi_token_id": 258882,
|
| 34 |
+
"eos_token_id": [
|
| 35 |
+
1,
|
| 36 |
+
106
|
| 37 |
+
],
|
| 38 |
+
"image_token_id": 258880,
|
| 39 |
+
"initializer_range": 0.02,
|
| 40 |
+
"model_type": "gemma4_unified",
|
| 41 |
+
"text_config": {
|
| 42 |
+
"attention_bias": false,
|
| 43 |
+
"attention_dropout": 0.0,
|
| 44 |
+
"attention_k_eq_v": true,
|
| 45 |
+
"bos_token_id": 2,
|
| 46 |
+
"dtype": "float16",
|
| 47 |
+
"enable_moe_block": false,
|
| 48 |
+
"eos_token_id": 1,
|
| 49 |
+
"final_logit_softcapping": 30.0,
|
| 50 |
+
"global_head_dim": 512,
|
| 51 |
+
"head_dim": 256,
|
| 52 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 53 |
+
"hidden_size": 3840,
|
| 54 |
+
"hidden_size_per_layer_input": 0,
|
| 55 |
+
"initializer_range": 0.02,
|
| 56 |
+
"intermediate_size": 15360,
|
| 57 |
+
"layer_types": [
|
| 58 |
+
"sliding_attention",
|
| 59 |
+
"sliding_attention",
|
| 60 |
+
"sliding_attention",
|
| 61 |
+
"sliding_attention",
|
| 62 |
+
"sliding_attention",
|
| 63 |
+
"full_attention",
|
| 64 |
+
"sliding_attention",
|
| 65 |
+
"sliding_attention",
|
| 66 |
+
"sliding_attention",
|
| 67 |
+
"sliding_attention",
|
| 68 |
+
"sliding_attention",
|
| 69 |
+
"full_attention",
|
| 70 |
+
"sliding_attention",
|
| 71 |
+
"sliding_attention",
|
| 72 |
+
"sliding_attention",
|
| 73 |
+
"sliding_attention",
|
| 74 |
+
"sliding_attention",
|
| 75 |
+
"full_attention",
|
| 76 |
+
"sliding_attention",
|
| 77 |
+
"sliding_attention",
|
| 78 |
+
"sliding_attention",
|
| 79 |
+
"sliding_attention",
|
| 80 |
+
"sliding_attention",
|
| 81 |
+
"full_attention",
|
| 82 |
+
"sliding_attention",
|
| 83 |
+
"sliding_attention",
|
| 84 |
+
"sliding_attention",
|
| 85 |
+
"sliding_attention",
|
| 86 |
+
"sliding_attention",
|
| 87 |
+
"full_attention",
|
| 88 |
+
"sliding_attention",
|
| 89 |
+
"sliding_attention",
|
| 90 |
+
"sliding_attention",
|
| 91 |
+
"sliding_attention",
|
| 92 |
+
"sliding_attention",
|
| 93 |
+
"full_attention",
|
| 94 |
+
"sliding_attention",
|
| 95 |
+
"sliding_attention",
|
| 96 |
+
"sliding_attention",
|
| 97 |
+
"sliding_attention",
|
| 98 |
+
"sliding_attention",
|
| 99 |
+
"full_attention",
|
| 100 |
+
"sliding_attention",
|
| 101 |
+
"sliding_attention",
|
| 102 |
+
"sliding_attention",
|
| 103 |
+
"sliding_attention",
|
| 104 |
+
"sliding_attention",
|
| 105 |
+
"full_attention"
|
| 106 |
+
],
|
| 107 |
+
"max_position_embeddings": 131072,
|
| 108 |
+
"model_type": "gemma4_unified_text",
|
| 109 |
+
"moe_intermediate_size": null,
|
| 110 |
+
"num_attention_heads": 16,
|
| 111 |
+
"num_experts": null,
|
| 112 |
+
"num_global_key_value_heads": 1,
|
| 113 |
+
"num_hidden_layers": 48,
|
| 114 |
+
"num_key_value_heads": 8,
|
| 115 |
+
"num_kv_shared_layers": 0,
|
| 116 |
+
"pad_token_id": 0,
|
| 117 |
+
"rms_norm_eps": 1e-06,
|
| 118 |
+
"rope_parameters": {
|
| 119 |
+
"full_attention": {
|
| 120 |
+
"partial_rotary_factor": 0.25,
|
| 121 |
+
"rope_theta": 1000000.0,
|
| 122 |
+
"rope_type": "proportional"
|
| 123 |
+
},
|
| 124 |
+
"sliding_attention": {
|
| 125 |
+
"rope_theta": 10000.0,
|
| 126 |
+
"rope_type": "default"
|
| 127 |
+
}
|
| 128 |
+
},
|
| 129 |
+
"sliding_window": 1024,
|
| 130 |
+
"tie_word_embeddings": true,
|
| 131 |
+
"top_k_experts": null,
|
| 132 |
+
"use_bidirectional_attention": "vision",
|
| 133 |
+
"use_cache": true,
|
| 134 |
+
"use_double_wide_mlp": false,
|
| 135 |
+
"vocab_size": 262144,
|
| 136 |
+
"vocab_size_per_layer_input": 262144
|
| 137 |
+
},
|
| 138 |
+
"tie_word_embeddings": true,
|
| 139 |
+
"transformers_version": "5.10.1",
|
| 140 |
+
"video_token_id": 258884,
|
| 141 |
+
"vision_config": {
|
| 142 |
+
"_name_or_path": "",
|
| 143 |
+
"architectures": null,
|
| 144 |
+
"chunk_size_feed_forward": 0,
|
| 145 |
+
"dtype": "float16",
|
| 146 |
+
"id2label": {
|
| 147 |
+
"0": "LABEL_0",
|
| 148 |
+
"1": "LABEL_1"
|
| 149 |
+
},
|
| 150 |
+
"initializer_range": 0.02,
|
| 151 |
+
"is_encoder_decoder": false,
|
| 152 |
+
"label2id": {
|
| 153 |
+
"LABEL_0": 0,
|
| 154 |
+
"LABEL_1": 1
|
| 155 |
+
},
|
| 156 |
+
"mm_embed_dim": 3840,
|
| 157 |
+
"mm_posemb_size": 1120,
|
| 158 |
+
"model_type": "gemma4_unified_vision",
|
| 159 |
+
"num_soft_tokens": 280,
|
| 160 |
+
"output_attentions": false,
|
| 161 |
+
"output_hidden_states": false,
|
| 162 |
+
"output_proj_dims": 3840,
|
| 163 |
+
"patch_size": 16,
|
| 164 |
+
"pooling_kernel_size": 3,
|
| 165 |
+
"problem_type": null,
|
| 166 |
+
"return_dict": true,
|
| 167 |
+
"rms_norm_eps": 1e-06
|
| 168 |
+
}
|
| 169 |
+
}
|
fp16/generation_config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 2,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
1,
|
| 6 |
+
106,
|
| 7 |
+
50
|
| 8 |
+
],
|
| 9 |
+
"pad_token_id": 0,
|
| 10 |
+
"suppress_tokens": [
|
| 11 |
+
258883,
|
| 12 |
+
258882
|
| 13 |
+
],
|
| 14 |
+
"temperature": 1.0,
|
| 15 |
+
"top_k": 64,
|
| 16 |
+
"top_p": 0.95,
|
| 17 |
+
"transformers_version": "5.10.1"
|
| 18 |
+
}
|
fp16/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:86b25f1b6fd153e7c20908bf2c962f9d00b75f99b44ec2487a640cd175aad551
|
| 3 |
+
size 23919548736
|
fp16/processor_config.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_ms_per_token": 40,
|
| 3 |
+
"audio_seq_length": 750,
|
| 4 |
+
"feature_extractor": {
|
| 5 |
+
"audio_samples_per_token": 640,
|
| 6 |
+
"feature_extractor_type": "Gemma4UnifiedAudioFeatureExtractor",
|
| 7 |
+
"feature_size": 640,
|
| 8 |
+
"padding_side": "right",
|
| 9 |
+
"padding_value": 0.0,
|
| 10 |
+
"return_attention_mask": true,
|
| 11 |
+
"sampling_rate": 16000
|
| 12 |
+
},
|
| 13 |
+
"image_processor": {
|
| 14 |
+
"do_convert_rgb": true,
|
| 15 |
+
"do_normalize": false,
|
| 16 |
+
"do_rescale": true,
|
| 17 |
+
"do_resize": true,
|
| 18 |
+
"image_mean": [
|
| 19 |
+
0.0,
|
| 20 |
+
0.0,
|
| 21 |
+
0.0
|
| 22 |
+
],
|
| 23 |
+
"image_processor_type": "Gemma4UnifiedImageProcessor",
|
| 24 |
+
"image_std": [
|
| 25 |
+
1.0,
|
| 26 |
+
1.0,
|
| 27 |
+
1.0
|
| 28 |
+
],
|
| 29 |
+
"max_soft_tokens": 280,
|
| 30 |
+
"patch_size": 16,
|
| 31 |
+
"pooling_kernel_size": 3,
|
| 32 |
+
"resample": 3,
|
| 33 |
+
"rescale_factor": 0.00392156862745098
|
| 34 |
+
},
|
| 35 |
+
"image_seq_length": 280,
|
| 36 |
+
"processor_class": "Gemma4UnifiedProcessor",
|
| 37 |
+
"video_processor": {
|
| 38 |
+
"do_convert_rgb": true,
|
| 39 |
+
"do_normalize": true,
|
| 40 |
+
"do_rescale": true,
|
| 41 |
+
"do_resize": true,
|
| 42 |
+
"do_sample_frames": true,
|
| 43 |
+
"image_mean": [
|
| 44 |
+
0.0,
|
| 45 |
+
0.0,
|
| 46 |
+
0.0
|
| 47 |
+
],
|
| 48 |
+
"image_std": [
|
| 49 |
+
1.0,
|
| 50 |
+
1.0,
|
| 51 |
+
1.0
|
| 52 |
+
],
|
| 53 |
+
"max_soft_tokens": 70,
|
| 54 |
+
"num_frames": 32,
|
| 55 |
+
"patch_size": 16,
|
| 56 |
+
"pooling_kernel_size": 3,
|
| 57 |
+
"resample": 3,
|
| 58 |
+
"rescale_factor": 0.00392156862745098,
|
| 59 |
+
"return_metadata": false,
|
| 60 |
+
"video_processor_type": "Gemma4UnifiedVideoProcessor"
|
| 61 |
+
}
|
| 62 |
+
}
|
fp16/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f
|
| 3 |
+
size 32169626
|
fp16/tokenizer_config.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_token": "<|audio|>",
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"boa_token": "<|audio>",
|
| 5 |
+
"boi_token": "<|image>",
|
| 6 |
+
"bos_token": "<bos>",
|
| 7 |
+
"eoa_token": "<audio|>",
|
| 8 |
+
"eoc_token": "<channel|>",
|
| 9 |
+
"eoi_token": "<image|>",
|
| 10 |
+
"eos_token": "<eos>",
|
| 11 |
+
"eot_token": "<turn|>",
|
| 12 |
+
"escape_token": "<|\"|>",
|
| 13 |
+
"etc_token": "<tool_call|>",
|
| 14 |
+
"etd_token": "<tool|>",
|
| 15 |
+
"etr_token": "<tool_response|>",
|
| 16 |
+
"extra_special_tokens": [
|
| 17 |
+
"<|video|>"
|
| 18 |
+
],
|
| 19 |
+
"image_token": "<|image|>",
|
| 20 |
+
"is_local": true,
|
| 21 |
+
"local_files_only": false,
|
| 22 |
+
"mask_token": "<mask>",
|
| 23 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 24 |
+
"model_specific_special_tokens": {
|
| 25 |
+
"audio_token": "<|audio|>",
|
| 26 |
+
"boa_token": "<|audio>",
|
| 27 |
+
"boi_token": "<|image>",
|
| 28 |
+
"eoa_token": "<audio|>",
|
| 29 |
+
"eoc_token": "<channel|>",
|
| 30 |
+
"eoi_token": "<image|>",
|
| 31 |
+
"eot_token": "<turn|>",
|
| 32 |
+
"escape_token": "<|\"|>",
|
| 33 |
+
"etc_token": "<tool_call|>",
|
| 34 |
+
"etd_token": "<tool|>",
|
| 35 |
+
"etr_token": "<tool_response|>",
|
| 36 |
+
"image_token": "<|image|>",
|
| 37 |
+
"soc_token": "<|channel>",
|
| 38 |
+
"sot_token": "<|turn>",
|
| 39 |
+
"stc_token": "<|tool_call>",
|
| 40 |
+
"std_token": "<|tool>",
|
| 41 |
+
"str_token": "<|tool_response>",
|
| 42 |
+
"think_token": "<|think|>"
|
| 43 |
+
},
|
| 44 |
+
"pad_token": "<pad>",
|
| 45 |
+
"padding_side": "left",
|
| 46 |
+
"processor_class": "Gemma4UnifiedProcessor",
|
| 47 |
+
"response_schema": {
|
| 48 |
+
"properties": {
|
| 49 |
+
"content": {
|
| 50 |
+
"type": "string"
|
| 51 |
+
},
|
| 52 |
+
"role": {
|
| 53 |
+
"const": "assistant"
|
| 54 |
+
},
|
| 55 |
+
"thinking": {
|
| 56 |
+
"type": "string"
|
| 57 |
+
},
|
| 58 |
+
"tool_calls": {
|
| 59 |
+
"items": {
|
| 60 |
+
"properties": {
|
| 61 |
+
"function": {
|
| 62 |
+
"properties": {
|
| 63 |
+
"arguments": {
|
| 64 |
+
"additionalProperties": {},
|
| 65 |
+
"type": "object",
|
| 66 |
+
"x-parser": "gemma4-tool-call"
|
| 67 |
+
},
|
| 68 |
+
"name": {
|
| 69 |
+
"type": "string"
|
| 70 |
+
}
|
| 71 |
+
},
|
| 72 |
+
"type": "object",
|
| 73 |
+
"x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})"
|
| 74 |
+
},
|
| 75 |
+
"type": {
|
| 76 |
+
"const": "function"
|
| 77 |
+
}
|
| 78 |
+
},
|
| 79 |
+
"type": "object"
|
| 80 |
+
},
|
| 81 |
+
"type": "array",
|
| 82 |
+
"x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>"
|
| 83 |
+
}
|
| 84 |
+
},
|
| 85 |
+
"type": "object",
|
| 86 |
+
"x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?P<content>(?:(?!\\<turn\\|\\>)(?!\\<\\|tool_response\\>).)+)?(?:\\<turn\\|\\>|\\<\\|tool_response\\>)?"
|
| 87 |
+
},
|
| 88 |
+
"soc_token": "<|channel>",
|
| 89 |
+
"sot_token": "<|turn>",
|
| 90 |
+
"stc_token": "<|tool_call>",
|
| 91 |
+
"std_token": "<|tool>",
|
| 92 |
+
"str_token": "<|tool_response>",
|
| 93 |
+
"think_token": "<|think|>",
|
| 94 |
+
"tokenizer_class": "GemmaTokenizer",
|
| 95 |
+
"unk_token": "<unk>"
|
| 96 |
+
}
|
gemma4-opus48-Q2_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68fda1ba58abfff7f2b10a86c234b0e8a162d484a8097b19275815ae8278ad55
|
| 3 |
+
size 4830147104
|
gemma4-opus48-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b599d5b1a6254c8d1685d1775d02931a3e163a2785eee7038a021d31d4660b1
|
| 3 |
+
size 7381381664
|
gemma4-opus48-Q6_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b7fb461f5c1071d49e7c1ad35c18e260848f76fb1a187312812ae480adf3017
|
| 3 |
+
size 9786020384
|
gemma4-opus48-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:014e51bf72cc4383cc6e3e140896601628167680fb2c8db706c812cf632751f7
|
| 3 |
+
size 12669645344
|