Text Generation
GGUF
gemma
gemma-4
multimodal
vision
finetune
sft
russian
physics
math
coding
imatrix
conversational
Instructions to use devoffeed/gemma-cvantic 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 devoffeed/gemma-cvantic 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 devoffeed/gemma-cvantic:BF16 # Run inference directly in the terminal: llama cli -hf devoffeed/gemma-cvantic:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf devoffeed/gemma-cvantic:BF16 # Run inference directly in the terminal: llama cli -hf devoffeed/gemma-cvantic:BF16
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 devoffeed/gemma-cvantic:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf devoffeed/gemma-cvantic:BF16
Use Docker
docker model run hf.co/devoffeed/gemma-cvantic:BF16
- Llama new
- LM Studio
- Jan
- vLLM
How to use devoffeed/gemma-cvantic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "devoffeed/gemma-cvantic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "devoffeed/gemma-cvantic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/devoffeed/gemma-cvantic:BF16
- Ollama
How to use devoffeed/gemma-cvantic with Ollama:
ollama run hf.co/devoffeed/gemma-cvantic:BF16
- Unsloth Desktop
- Pi
How to use devoffeed/gemma-cvantic with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devoffeed/gemma-cvantic:BF16
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": "devoffeed/gemma-cvantic:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use devoffeed/gemma-cvantic with Docker Model Runner:
docker model run hf.co/devoffeed/gemma-cvantic:BF16
- Lemonade
How to use devoffeed/gemma-cvantic with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull devoffeed/gemma-cvantic:BF16
Run and chat with the model
lemonade run user.gemma-cvantic-BF16
List all available models
lemonade list
- Hermes Agent
How to use devoffeed/gemma-cvantic with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devoffeed/gemma-cvantic:BF16
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 devoffeed/gemma-cvantic:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use devoffeed/gemma-cvantic with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devoffeed/gemma-cvantic:BF16
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 "devoffeed/gemma-cvantic:BF16" \ --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- .gitattributes +4 -0
- README.md +144 -0
- gemma-cvantic.BF16-mmproj.gguf +3 -0
- gemma-cvantic.IQ4_XS.gguf +3 -0
- gemma-cvantic.Q5_K_S.gguf +3 -0
- gemma-cvantic.Q8_0.gguf +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ saved_model/**/* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
gemma-cvantic.BF16-mmproj.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
gemma-cvantic.IQ4_XS.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
gemma-cvantic.Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
gemma-cvantic.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model:
|
| 4 |
+
- google/gemma-4-E4B-it
|
| 5 |
+
tags:
|
| 6 |
+
- gemma
|
| 7 |
+
- gemma-4
|
| 8 |
+
- gguf
|
| 9 |
+
- multimodal
|
| 10 |
+
- vision
|
| 11 |
+
- finetune
|
| 12 |
+
- sft
|
| 13 |
+
- russian
|
| 14 |
+
- physics
|
| 15 |
+
- math
|
| 16 |
+
- coding
|
| 17 |
+
library_name: gguf
|
| 18 |
+
pipeline_tag: text-generation
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
<div align="center">
|
| 22 |
+
|
| 23 |
+
# gemma-cvantic
|
| 24 |
+
|
| 25 |
+
**multimodal SFT fine-tune of Google's `gemma-4-E4B-it` · GGUF**
|
| 26 |
+
|
| 27 |
+
[](https://huggingface.co/devoffeed/gemma-cvantic)
|
| 28 |
+
[](https://huggingface.co/google/gemma-4-E4B-it)
|
| 29 |
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
| 30 |
+
[](https://github.com/ggml-org/llama.cpp)
|
| 31 |
+
[]()
|
| 32 |
+
|
| 33 |
+
</div>
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## What is this?
|
| 38 |
+
|
| 39 |
+
An experimental **instruction fine-tune** of [google/gemma-4-E4B-it](https://huggingface.co/google/gemma-4-E4B-it) — the 4.5B-effective-parameter omni-modal Gemma 4 model (128K context, text + image + audio input).
|
| 40 |
+
|
| 41 |
+
Trained with **SFT (13,000 examples)** to strengthen math, coding, physics/astronomy reasoning and Russian-language instructions. Quantized to GGUF with `llama.cpp` for fast local inference.
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## Quantization lineup
|
| 46 |
+
|
| 47 |
+
| File | Quant | Size | Quality / speed |
|
| 48 |
+
|---|---|---|---|
|
| 49 |
+
| `gemma-cvantic.Q8_0.gguf` | **Q8_0** | ~7.6 GB | near-lossless, best quality |
|
| 50 |
+
| `gemma-cvantic.Q5_K_S.gguf` | **Q5_K_S** | ~5.4 GB | great balance ★ recommended |
|
| 51 |
+
| `gemma-cvantic.IQ4_XS.gguf` | **iQ4_XS** (imatrix) | ~4.8 GB | smallest, fast, slightly less accurate |
|
| 52 |
+
| `gemma-cvantic.BF16-mmproj.gguf` | vision projector | ~0.9 GB | required for image input |
|
| 53 |
+
|
| 54 |
+
> `mmproj` is the **multimodal (vision) projector** — pass it with `--mmproj` to enable image understanding. All quants are BF16/FP16 conversions of the same merged weights, so any main-file + `mmproj` combo works.
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
## Training recipe
|
| 59 |
+
|
| 60 |
+
| Parameter | Value |
|
| 61 |
+
|---|---|
|
| 62 |
+
| Base model | `google/gemma-4-E4B-it` |
|
| 63 |
+
| Method | SFT (DoRA / LoRA-style adapter, then merged) |
|
| 64 |
+
| Trainable params | ~36.7M (0.61%) |
|
| 65 |
+
| Examples | 13,000 |
|
| 66 |
+
| Context | 128K (inherited) |
|
| 67 |
+
|
| 68 |
+
**Dataset mix** (MIT / Apache-2.0 only):
|
| 69 |
+
|
| 70 |
+
| Dataset | Split | Rows | Domain |
|
| 71 |
+
|---|---|---|---|
|
| 72 |
+
| `HuggingFaceH4/ultrachat_200k` | train_sft | 5,000 | general chat |
|
| 73 |
+
| `theblackcat102/evol-codealpaca-v1` | train | 3,000 | coding |
|
| 74 |
+
| `qwedsacf/competition_math` (MATH) | train | 2,000 | math |
|
| 75 |
+
| `HuggingFaceTB/cosmopedia` | openstax · physics/astronomy | 2,000 | physics & astronomy |
|
| 76 |
+
| `openai/gsm8k` | main/train | 1,000 | grade-school math |
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## Quick start
|
| 81 |
+
|
| 82 |
+
### llama.cpp (text)
|
| 83 |
+
|
| 84 |
+
```bash
|
| 85 |
+
llama-cli \
|
| 86 |
+
-m gemma-cvantic.Q5_K_S.gguf \
|
| 87 |
+
-p "Реши задачу: если цена товара выросла на 20% и составила 480 руб., какой была исходная цена?"
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
### Multimodal (vision)
|
| 91 |
+
|
| 92 |
+
```bash
|
| 93 |
+
llama-cli \
|
| 94 |
+
-m gemma-cvantic.Q5_K_S.gguf \
|
| 95 |
+
--mmproj gemma-cvantic.BF16-mmproj.gguf \
|
| 96 |
+
-i
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
```
|
| 100 |
+
> what's in this photo?
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
### llama-server (OpenAI-compatible API)
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
llama-server \
|
| 107 |
+
-m gemma-cvantic.Q8_0.gguf \
|
| 108 |
+
--mmproj gemma-cvantic.BF16-mmproj.gguf \
|
| 109 |
+
--port 8080
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
```python
|
| 113 |
+
import openai
|
| 114 |
+
|
| 115 |
+
client = openai.OpenAI(base_url="http://localhost:8080/v1", api_key="local")
|
| 116 |
+
resp = client.chat.completions.create(
|
| 117 |
+
model="gemma-cvantic",
|
| 118 |
+
messages=[{"role": "user", "content": "Расскажи про эффект Доплера на пальцах"}],
|
| 119 |
+
)
|
| 120 |
+
print(resp.choices[0].message.content)
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
---
|
| 124 |
+
|
| 125 |
+
## Picking a file
|
| 126 |
+
|
| 127 |
+
- **CPU-only, want quality** → `Q5_K_S` (fits ~8 GB RAM/VRAM, sweet spot)
|
| 128 |
+
- **16 GB+ / strong GPU** → `Q8_0`
|
| 129 |
+
- **Tiny footprint / speed first** → `iQ4_XS` (fits ~6 GB)
|
| 130 |
+
- **Vision** → always add the `BF16-mmproj`
|
| 131 |
+
|
| 132 |
+
Sizes are approximate; VRAM usage depends on context length.
|
| 133 |
+
|
| 134 |
+
---
|
| 135 |
+
|
| 136 |
+
## Notes
|
| 137 |
+
|
| 138 |
+
- Working-name **"cvantic"** — experimental build, quality varies per domain. Think of it as a field test of Gemma 4 E4B fine-tuning.
|
| 139 |
+
- Text-only SFT; vision/audio behavior inherited from the base model and *not* specifically tuned.
|
| 140 |
+
- Base model: [Google DeepMind](https://deepmind.google/models/gemma/) · License: **Apache 2.0** · [Gemma 4 docs](https://ai.google.dev/gemma/docs/core)
|
| 141 |
+
|
| 142 |
+
---
|
| 143 |
+
|
| 144 |
+
*Quantized with `llama.cpp` (BF16 base + imatrix for iQ4_XS).*
|
gemma-cvantic.BF16-mmproj.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00addc0236265cf808ce18adc13f6f27ca4a79e17c2403b5f8420b4652178fbe
|
| 3 |
+
size 991552384
|
gemma-cvantic.IQ4_XS.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e3b879749c9d2d8b817838256c91481bd98c1ecc3709252cf61bc0466442c6b0
|
| 3 |
+
size 5070957312
|
gemma-cvantic.Q5_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae8839a0d0b3db7ac7d5624cbb3fe4f423bc165bc041fda52500c1a1e43250ff
|
| 3 |
+
size 5685971520
|
gemma-cvantic.Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9bc9e2ddf61e44c4ac6b9ffbc1d2bf6a0f34e498f88b3fbc3935295870b11bd4
|
| 3 |
+
size 8005438016
|