Image-Text-to-Text
Transformers
Safetensors
gemma4
quantized
w8a16
fp8
conversational
compressed-tensors
Instructions to use hoborific/Gemma-4-Gembrain-31B-W8A16-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hoborific/Gemma-4-Gembrain-31B-W8A16-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hoborific/Gemma-4-Gembrain-31B-W8A16-FP8") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("hoborific/Gemma-4-Gembrain-31B-W8A16-FP8") model = AutoModelForMultimodalLM.from_pretrained("hoborific/Gemma-4-Gembrain-31B-W8A16-FP8", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hoborific/Gemma-4-Gembrain-31B-W8A16-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hoborific/Gemma-4-Gembrain-31B-W8A16-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hoborific/Gemma-4-Gembrain-31B-W8A16-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/hoborific/Gemma-4-Gembrain-31B-W8A16-FP8
- SGLang
How to use hoborific/Gemma-4-Gembrain-31B-W8A16-FP8 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 "hoborific/Gemma-4-Gembrain-31B-W8A16-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hoborific/Gemma-4-Gembrain-31B-W8A16-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "hoborific/Gemma-4-Gembrain-31B-W8A16-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hoborific/Gemma-4-Gembrain-31B-W8A16-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use hoborific/Gemma-4-Gembrain-31B-W8A16-FP8 with Docker Model Runner:
docker model run hf.co/hoborific/Gemma-4-Gembrain-31B-W8A16-FP8
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,381 +1,42 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
- google/gemma-4-31B-it
|
| 5 |
-
- zerofata/G4-MeroMero-31B
|
| 6 |
-
- Jackrong/Gemopus-4-31B-it
|
| 7 |
-
- ConicCat/Gemma4-GarnetV2-31B
|
| 8 |
-
- AuriAetherwiing/G4-31B-Musica-v1
|
| 9 |
-
- Blazed-Forge/Gemma-4-Gemsicle-31B
|
| 10 |
-
- trohrbaugh/gemma-4-31b-it-heretic-ara
|
| 11 |
tags:
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
- non-reasoning
|
| 16 |
-
- creative writing
|
| 17 |
-
- roleplay
|
| 18 |
-
- uncensored
|
| 19 |
-
- 31B
|
| 20 |
-
- gemma-4
|
| 21 |
-
new_version: Nimbz/Gemma-4-Gembrain-X-31B
|
| 22 |
---
|
| 23 |
|
| 24 |
-
|
| 25 |
-
.gembrain-wrapper {
|
| 26 |
-
background-color: #050505;
|
| 27 |
-
color: #e2e8f0;
|
| 28 |
-
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
| 29 |
-
padding: 30px;
|
| 30 |
-
border-radius: 20px;
|
| 31 |
-
border: 1px solid #1a1a1a;
|
| 32 |
-
line-height: 1.6;
|
| 33 |
-
}
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
-
|
| 38 |
-
font-size: 3.5rem;
|
| 39 |
-
font-weight: 800;
|
| 40 |
-
margin: 0;
|
| 41 |
-
background: linear-gradient(90deg, #00f2ff, #ff00ff);
|
| 42 |
-
-webkit-background-clip: text;
|
| 43 |
-
-webkit-text-fill-color: transparent;
|
| 44 |
-
filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.4));
|
| 45 |
-
letter-spacing: -2px;
|
| 46 |
-
}
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
margin: 20px 0;
|
| 53 |
-
border-radius: 0 12px 12px 0;
|
| 54 |
-
box-shadow: 10px 0 30px rgba(0, 242, 255, 0.05);
|
| 55 |
-
}
|
| 56 |
|
| 57 |
-
|
| 58 |
-
border-left-color: #ff00ff;
|
| 59 |
-
box-shadow: 10px 0 30px rgba(255, 0, 255, 0.05);
|
| 60 |
-
}
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
|
|
|
|
|
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
margin: 20px 0;
|
| 72 |
-
}
|
| 73 |
|
| 74 |
-
|
| 75 |
-
text-align: center;
|
| 76 |
-
padding: 15px;
|
| 77 |
-
background: #0f172a;
|
| 78 |
-
border: 1px solid #1e293b;
|
| 79 |
-
border-radius: 15px;
|
| 80 |
-
}
|
| 81 |
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
.thought-block {
|
| 90 |
-
background: #000;
|
| 91 |
-
border: 1px dashed #334155;
|
| 92 |
-
padding: 15px;
|
| 93 |
-
font-family: 'Courier New', Courier, monospace;
|
| 94 |
-
color: #22c55e;
|
| 95 |
-
margin-top: 10px;
|
| 96 |
-
}
|
| 97 |
-
|
| 98 |
-
/* 5-Phase Layout */
|
| 99 |
-
.phase-grid {
|
| 100 |
-
display: flex;
|
| 101 |
-
flex-wrap: wrap;
|
| 102 |
-
gap: 15px;
|
| 103 |
-
justify-content: center;
|
| 104 |
-
margin: 20px 0;
|
| 105 |
-
}
|
| 106 |
-
|
| 107 |
-
.phase-box {
|
| 108 |
-
flex: 1 1 calc(33% - 15px);
|
| 109 |
-
min-width: 180px;
|
| 110 |
-
background: #111;
|
| 111 |
-
padding: 15px;
|
| 112 |
-
border-radius: 10px;
|
| 113 |
-
border: 1px solid #334155;
|
| 114 |
-
}
|
| 115 |
-
|
| 116 |
-
.tag-pill {
|
| 117 |
-
display: inline-block;
|
| 118 |
-
padding: 4px 12px;
|
| 119 |
-
border-radius: 50px;
|
| 120 |
-
font-size: 12px;
|
| 121 |
-
background: rgba(0, 242, 255, 0.1);
|
| 122 |
-
color: #00f2ff;
|
| 123 |
-
border: 1px solid rgba(0, 242, 255, 0.3);
|
| 124 |
-
margin: 5px;
|
| 125 |
-
}
|
| 126 |
-
</style>
|
| 127 |
-
|
| 128 |
-
<div class="gembrain-wrapper">
|
| 129 |
-
|
| 130 |
-
<div class="neon-header">
|
| 131 |
-
<img src="insane-in-the-gembrain-31b-title.png" width="100%" style="border-radius: 12px; border: 1px solid #333; margin-bottom: 20px;">
|
| 132 |
-
<h1 class="neon-title"> 💎 GEMBRAIN-31B 🧠 </h1>
|
| 133 |
-
<div style="color: #94a3b8; text-transform: uppercase; letter-spacing: 5px; font-size: 0.85rem; margin-top: 10px;">
|
| 134 |
-
INSANE IN THE GEMBRAIN
|
| 135 |
-
</div>
|
| 136 |
-
</div>
|
| 137 |
-
|
| 138 |
-
<div class="stat-grid">
|
| 139 |
-
<div class="stat-item"><span class="stat-value">ADHERENCE</span><span style="font-size: 0.75rem; color: #64748b;">IMPROVED</span></div>
|
| 140 |
-
<div class="stat-item"><span class="stat-value" style="color: #ff00ff;">SWIPE VARIETY</span><span style="font-size: 0.75rem; color: #64748b;">INCREASED</span></div>
|
| 141 |
-
<div class="stat-item"><span class="stat-value">CREATIVE PROSE</span><span style="font-size: 0.75rem; color: #64748b;">PRESERVED</span></div>
|
| 142 |
-
</div>
|
| 143 |
-
|
| 144 |
-
<div class="crystal-card">
|
| 145 |
-
<h3 style="color: #00f2ff; margin-top: 0;">🧠 About The Model</h3>
|
| 146 |
-
<p style="margin-bottom: 0;">Gembrain-31B is a synthesis of several models, including Gemsicle-31B as important ingredient. The goal of this release was to stabilize and improve the initial Gemsicle-31B, but also to enhance its logical and lateral thinking, both with and without reasoning.</p>
|
| 147 |
-
|
| 148 |
-
***
|
| 149 |
-
|
| 150 |
-
<p style="margin-bottom: 0;">It's build to create the most unhinged narratives and construct image prompts about anything accordingly to a given structure with high precision.</p>
|
| 151 |
-
|
| 152 |
-
***
|
| 153 |
-
|
| 154 |
-
<p style="margin-bottom: 0;">Expect creative swipe variance, unique and non-robotic prose, and sharper instruction adherence.</p>
|
| 155 |
-
</div>
|
| 156 |
-
|
| 157 |
-
<div style="display: flex; gap: 20px; flex-wrap: wrap; margin-top: 30px;">
|
| 158 |
-
<div style="flex: 1; min-width: 250px;">
|
| 159 |
-
<h2 style="color: #00f2ff; border-bottom: 1px solid #334155; padding-bottom: 5px;">🎚️ Samplers</h2>
|
| 160 |
-
<table style="width: 100%; border-collapse: collapse; font-size: 0.9rem;">
|
| 161 |
-
|
| 162 |
-
<tr style="border-bottom: 1px solid #1e293b;">
|
| 163 |
-
<td style="padding: 8px 5; color: #94a3b8;">Temperature</td>
|
| 164 |
-
<td style="padding: 8px 5; text-align: right; color: #00f2ff;">1.0</td>
|
| 165 |
-
</tr>
|
| 166 |
-
|
| 167 |
-
<tr style="border-bottom: 1px solid #1e293b;">
|
| 168 |
-
<td style="padding: 8px 5; color: #94a3b8;">Top-K</td>
|
| 169 |
-
<td style="padding: 8px 5; text-align: right; color: #00f2ff;">0</td>
|
| 170 |
-
</tr>
|
| 171 |
-
|
| 172 |
-
<tr style="border-bottom: 1px solid #1e293b;">
|
| 173 |
-
<td style="padding: 8px 5; color: #94a3b8;">Top-P</td>
|
| 174 |
-
<td style="padding: 8px 5; text-align: right; color: #00f2ff;">0.95</td>
|
| 175 |
-
</tr>
|
| 176 |
-
|
| 177 |
-
<tr style="border-bottom: 1px solid #1e293b;">
|
| 178 |
-
<td style="padding: 8px 5; color: #94a3b8;">Min-P</td>
|
| 179 |
-
<td style="padding: 8px 5; text-align: right; color: #00f2ff;">0.03</td>
|
| 180 |
-
</tr>
|
| 181 |
-
|
| 182 |
-
<tr style="border-bottom: 1px solid #1e293b;">
|
| 183 |
-
<td style="padding: 8px 5; color: #94a3b8;">DRY Multiplier</td>
|
| 184 |
-
<td style="padding: 8px 5; text-align: right; color: #00f2ff;">0.8</td>
|
| 185 |
-
</tr>
|
| 186 |
-
<tr style="border-bottom: 1px solid #1e293b;">
|
| 187 |
-
<td style="padding: 8px 5; color: #94a3b8;">DRY Base</td>
|
| 188 |
-
<td style="padding: 8px 5; text-align: right; color: #00f2ff;">1.75</td>
|
| 189 |
-
</tr>
|
| 190 |
-
<tr style="border-bottom: 1px solid #1e293b;">
|
| 191 |
-
<td style="padding: 8px 5; color: #94a3b8;">DRY Allowed Length</td>
|
| 192 |
-
<td style="padding: 8px 5; text-align: right; color: #00f2ff;">10</td>
|
| 193 |
-
</tr>
|
| 194 |
-
|
| 195 |
-
<tr>
|
| 196 |
-
<td style="padding: 8px 5; color: #94a3b8;">Optional: Adaptive-P Target</td>
|
| 197 |
-
<td style="padding: 8px 5; text-align: right; color: #00f2ff;">0.6</td>
|
| 198 |
-
</tr>
|
| 199 |
-
<tr>
|
| 200 |
-
<td style="padding: 8px 5; color: #94a3b8;">Optional: Adaptive-P Decay</td>
|
| 201 |
-
<td style="padding: 8px 5; text-align: right; color: #00f2ff;">0.5</td>
|
| 202 |
-
</tr>
|
| 203 |
-
|
| 204 |
-
</table>
|
| 205 |
-
</div>
|
| 206 |
-
|
| 207 |
-
<div class="crystal-card magenta-card" style="flex: 1; min-width: 250px; margin: 0; border-radius: 12px;">
|
| 208 |
-
<h3 style="color: #ff00ff; margin-top: 0;"> GGUF Quants</h3>
|
| 209 |
-
|
| 210 |
-
| Quant | Size | Download Link |
|
| 211 |
-
| :--- | :--- | :--- |
|
| 212 |
-
| **Q4_K_S** | `17.8 GB` | [Click](https://huggingface.co/Nimbz/Gemma-4-Gembrain-31B-GGUF/blob/main/Gembrain-31B-Q4_K_S.gguf) |
|
| 213 |
-
| **Q4_K_M** | `18.7 GB` | [Click](https://huggingface.co/Nimbz/Gemma-4-Gembrain-31B-GGUF/blob/main/Gembrain-31B-Q4_K_M.gguf) |
|
| 214 |
-
| **Q5_K_S** | `21.3 GB` | [Click](https://huggingface.co/Nimbz/Gemma-4-Gembrain-31B-GGUF/blob/main/Gembrain-31B-Q5_K_S.gguf) |
|
| 215 |
-
| **Q5_K_M** | `21.8 GB` | [Click](https://huggingface.co/Nimbz/Gemma-4-Gembrain-31B-GGUF/blob/main/Gembrain-31B-Q5_K_M.gguf) |
|
| 216 |
-
| **Q6_K** | `25.2 GB` | [Click](https://huggingface.co/Nimbz/Gemma-4-Gembrain-31B-GGUF/blob/main/Gembrain-31B-Q6_K.gguf) |
|
| 217 |
-
| **Q8_0** | `32.6 GB` | [Click](https://huggingface.co/Nimbz/Gemma-4-Gembrain-31B-GGUF/blob/main/Gemsicle-31B-Q8_0.gguf) |
|
| 218 |
-
|
| 219 |
-
</ul>
|
| 220 |
-
</div>
|
| 221 |
-
</div>
|
| 222 |
-
|
| 223 |
-
<div class="crystal-card magenta-card">
|
| 224 |
-
<h3 style="color: #ff00ff; margin-top: 0;">🔮 Prompt Format</h3>
|
| 225 |
-
|
| 226 |
-
[**Please refer to the original google/gemma-4-31b-it for the correct chat template.**](https://huggingface.co/google/gemma-4-31B-it#2-thinking-mode-configuration)
|
| 227 |
-
|
| 228 |
-
Let your frontend handle the chat template if possible (e.g., Chat Completion in SillyTavern).
|
| 229 |
-
|
| 230 |
-
**For Reasoning:** Add `<|think|>` at the very beginning of the system prompt. Thinking happens between `<|channel>thought\n` and
|
| 231 |
-
`<channel|>` tags.
|
| 232 |
-
|
| 233 |
-
```text
|
| 234 |
-
<|turn>system
|
| 235 |
-
<|think|>
|
| 236 |
-
You are a helpful assistant<turn|>
|
| 237 |
-
<|turn>user
|
| 238 |
-
Hello<turn|>
|
| 239 |
-
<|turn>model
|
| 240 |
-
Hi there<turn|>
|
| 241 |
-
<|turn>user
|
| 242 |
-
How are you?<turn|>
|
| 243 |
-
<|turn>model
|
| 244 |
-
```
|
| 245 |
-
</div>
|
| 246 |
-
|
| 247 |
-
<h2 style="color: #e2e8f0; border-bottom: 1px solid #334155; padding-bottom: 5px; margin-top: 30px;">🧪 Merge Details</h2>
|
| 248 |
-
<p style="font-size: 0.9rem; color: #94a3b8;">This model was systematically created through a five-stage process of priming models for their given purpose and merging the results:</p>
|
| 249 |
-
|
| 250 |
-
<div class="phase-grid">
|
| 251 |
-
<div class="phase-box" style="border-color: #00f2ff;">
|
| 252 |
-
<h4 style="color: #00f2ff; margin: 0 0 5px 0;">Phase 01: breadcrumbs_ties</h4>
|
| 253 |
-
<p style="font-size: 0.8rem; margin: 0; color: #cbd5e1;">Gemopus X MeroMero
|
| 254 |
-
<details>
|
| 255 |
-
<summary></summary>
|
| 256 |
-
|
| 257 |
-
```
|
| 258 |
-
models:
|
| 259 |
-
- model: ./G4-MeroMero-31B
|
| 260 |
-
- model: ./G4-Gemopus-4-31B-it
|
| 261 |
-
merge_method: breadcrumbs_ties
|
| 262 |
-
base_model: ./G4-31B-it
|
| 263 |
-
parameters:
|
| 264 |
-
density: 0.85
|
| 265 |
-
weight: 0.5
|
| 266 |
-
int8_mask: true
|
| 267 |
-
dtype: bfloat16
|
| 268 |
-
```
|
| 269 |
-
|
| 270 |
-
</details></p>
|
| 271 |
-
</div>
|
| 272 |
-
<div class="phase-box" style="border-color: #00f2ff;">
|
| 273 |
-
<h4 style="color: #00f2ff; margin: 0 0 5px 0;">Phase 02: slerp</h4>
|
| 274 |
-
<p style="font-size: 0.8rem; margin: 0; color: #cbd5e1;">GarnetV2 X Musica-v1
|
| 275 |
-
<details>
|
| 276 |
-
<summary></summary>
|
| 277 |
-
|
| 278 |
-
```
|
| 279 |
-
models:
|
| 280 |
-
- model: ./G4-Gemma4-GarnetV2-31B
|
| 281 |
-
- model: ./G4-31B-Musica-v1
|
| 282 |
-
merge_method: slerp
|
| 283 |
-
base_model: ./G4-Gemma4-GarnetV2-31B
|
| 284 |
-
parameters:
|
| 285 |
-
t:
|
| 286 |
-
- value: 0.6
|
| 287 |
-
dtype: bfloat16
|
| 288 |
-
```
|
| 289 |
-
|
| 290 |
-
</details></p>
|
| 291 |
-
</div>
|
| 292 |
-
</div>
|
| 293 |
-
|
| 294 |
-
<div class="phase-grid">
|
| 295 |
-
<div class="phase-box" style="border-color: #ff00ff;">
|
| 296 |
-
<h4 style="color: #ff00ff; margin: 0 0 5px 0;">Phase 03: della_linear</h4>
|
| 297 |
-
<p style="font-size: 0.8rem; margin: 0; color: #cbd5e1;">Gemsicle X Gemma-4-31B-it-heretic-ara
|
| 298 |
-
<details>
|
| 299 |
-
<summary></summary>
|
| 300 |
-
|
| 301 |
-
```
|
| 302 |
-
models:
|
| 303 |
-
- model: ./Gemsicle-31B
|
| 304 |
-
parameters:
|
| 305 |
-
weight: 1.0
|
| 306 |
-
- model: ./G4-gemma-4-31b-it-heretic-ara
|
| 307 |
-
parameters:
|
| 308 |
-
weight: 0.75
|
| 309 |
-
density: 0.65
|
| 310 |
-
merge_method: della_linear
|
| 311 |
-
base_model: ./G4-31B-it
|
| 312 |
-
parameters:
|
| 313 |
-
weight: 1.0
|
| 314 |
-
normalize: false
|
| 315 |
-
epsilon: 0.05
|
| 316 |
-
lambda: 1.0
|
| 317 |
-
dtype: bfloat16
|
| 318 |
-
```
|
| 319 |
-
|
| 320 |
-
</details></p>
|
| 321 |
-
</div>
|
| 322 |
-
<div class="phase-box" style="border-color: #ff00ff; flex-grow: 1;">
|
| 323 |
-
<h4 style="color: #ff00ff; margin: 0 0 5px 0;">Phase 04: model_stock</h4>
|
| 324 |
-
<p style="font-size: 0.8rem; margin: 0; color: #cbd5e1;">Phase 01 X Phase 02 X Phase 03
|
| 325 |
-
<details>
|
| 326 |
-
<summary></summary>
|
| 327 |
-
|
| 328 |
-
```
|
| 329 |
-
models:
|
| 330 |
-
- model: ./phase01_breadcrumbs_ties
|
| 331 |
-
- model: ./phase02_slerp
|
| 332 |
-
merge_method: model_stock
|
| 333 |
-
base_model: ./phase03_della_linear
|
| 334 |
-
dtype: bfloat16
|
| 335 |
-
tokenizer_source: "base"
|
| 336 |
-
```
|
| 337 |
-
|
| 338 |
-
</details></p>
|
| 339 |
-
</div>
|
| 340 |
-
|
| 341 |
-
</div>
|
| 342 |
-
|
| 343 |
-
<div class="phase-grid">
|
| 344 |
-
<div class="phase-box" style="border-image: linear-gradient(90deg, #00f2ff, #ff00ff) 1; flex-grow: 1;">
|
| 345 |
-
<h4 style="background: linear-gradient(90deg, #00f2ff, #ff00ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 0 0 5px 0;">Phase 05: arcee_fusion</h4>
|
| 346 |
-
<p style="font-size: 0.8rem; margin: 0; color: #cbd5e1;">Gemsicle X Phase 04
|
| 347 |
-
<details>
|
| 348 |
-
<summary></summary>
|
| 349 |
-
|
| 350 |
-
```
|
| 351 |
-
models:
|
| 352 |
-
- model: ./Gemsicle-31B
|
| 353 |
-
- model: ./phase04_model_stock
|
| 354 |
-
merge_method: arcee_fusion
|
| 355 |
-
base_model: ./Gemsicle-31B
|
| 356 |
-
dtype: bfloat16
|
| 357 |
-
tokenizer_source: "base"
|
| 358 |
-
```
|
| 359 |
-
|
| 360 |
-
</details></p>
|
| 361 |
-
</div>
|
| 362 |
-
</div>
|
| 363 |
-
|
| 364 |
-
<div style="display: flex; gap: 20px; flex-wrap: wrap; margin-top: 30px;">
|
| 365 |
-
|
| 366 |
-
<div class="crystal-card gold-card" style="flex: 1; min-width: 250px; margin: 0; border-radius: 12px;">
|
| 367 |
-
|
| 368 |
-
<h3 style="color: #fbbf24; margin-top: 0;">🏆 Credits & Honors</h3>
|
| 369 |
-
|
| 370 |
-
<li style="margin-bottom: 8px;"><b>The Open-Source Community:</b> For providing the brilliant base models and fine-tunes that made this synthesis possible.</li>
|
| 371 |
-
|
| 372 |
-
<li style="margin-bottom: 8px;"><b><a href="https://www.reddit.com/r/BeaverAI/" style="color: #fbbf24; text-decoration: none;">The BeaverAI Community</a>:</b> The people on the BeaverAI Discord - Without your help I wouldn't do all that.</li>
|
| 373 |
-
|
| 374 |
-
<li style="margin-bottom: 8px;"><b>Mergekit:</b> Once again thank you Arcee AI for the great and easy to use mergekit! And thanks to zerofota and their fork for Gemma 4 support.</li>
|
| 375 |
-
|
| 376 |
-
<li style="margin-bottom: 8px;"><b><a href="https://huggingface.co/Ateron" style="color: #fbbf24; text-decoration: none;">Ateron</a>:</b> Big kudos for providing me with the first steps for merging models and your relentless testing and support.</li>
|
| 377 |
-
|
| 378 |
-
<li><b>Google Gemini:</b> For once again helping me to craft this specific model card.</li>
|
| 379 |
-
</div>
|
| 380 |
-
|
| 381 |
-
</div>
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Nimbz/Gemma-4-Gembrain-31B
|
| 3 |
+
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
+
- quantized
|
| 6 |
+
- w8a16
|
| 7 |
+
- fp8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# Gemma-4-Gembrain-31B-W8A16-FP8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
+
Quantized version of [Nimbz/Gemma-4-Gembrain-31B](https://huggingface.co/Nimbz/Gemma-4-Gembrain-31B).
|
| 13 |
|
| 14 |
+
## Format
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
Offline-quantized **W8A16 FP8** in the
|
| 17 |
+
[compressed-tensors](https://github.com/neuralmagic/compressed-tensors)
|
| 18 |
+
`float-quantized` format: weights in `float8_e4m3fn` with per-output-channel
|
| 19 |
+
symmetric scales, activations kept in bf16/fp16.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
## How it was quantized
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
For each linear layer, every output row gets its own scale starting from
|
| 24 |
+
`amax / 448`, refined by an MSE clip search over ~9 clip fractions
|
| 25 |
+
(0.8–1.0× amax) picking the lowest-error scale per row. Weights are then
|
| 26 |
+
quantized `q = e4m3(w / scale)` with round-to-nearest and saturation. This
|
| 27 |
+
per-channel + clipping scheme gives better SNR than vLLM's online per-tensor
|
| 28 |
+
`--quantization fp8` path.
|
| 29 |
|
| 30 |
+
Only 2D linear projection weights are quantized (attention q/k/v/o, MLP
|
| 31 |
+
gate/up/down). Embeddings, norms, lm_head, routers/experts, and the vision
|
| 32 |
+
tower stay in bf16 and are listed in the checkpoint's `ignore` list, so vLLM
|
| 33 |
+
leaves them untouched.
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
## Supported vLLM platforms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
- **Intel XPU** — `XPUW8A16FP8LinearKernel` (the intended target).
|
| 38 |
+
- **NVIDIA CUDA** (SM75+, i.e. Turing and newer) —
|
| 39 |
+
`HummingFP8ScaledMMLinearKernel` when the `humming` package is installed,
|
| 40 |
+
otherwise `MarlinFP8ScaledMMLinearKernel`.
|
| 41 |
+
- **Not supported**: ROCm, CPU, TPU — vLLM has no W8A16-FP8 kernel for these
|
| 42 |
+
backends yet, so loading will fail with a "no kernel" error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|