Downloads · 30 days
81
5% of all-time downloads
Nimbz/Gemma-4-Dark-Gemistry-31B
Gemma-4-Dark-Gemistry-31B is a machine learning model from Nimbz. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
<style .gem-wrapper { background-color: 06060a; background-image: radial-gradient(circle at 12% 8%, rgba(236, 72, 153, 0.10) 0%, transparent 42%), radial-gradient(circle at 88% 92%, rgba(6, 182, 212, 0.10) 0%, transpa…
Downloads · 30 days
81
5% of all-time downloads
All-time downloads
1.6K
Public
Parameters
32.7B
65.4 GB on disk
Likes
43
Public
Click a slice to open those files.
.safetensors65.4 GB · 100%
From the Hugging Face model README
merge_method: della_linear
base_model: ./gemma-4-31B-it
dtype: bfloat16
tokenizer_source: base
parameters: { normalize: false, epsilon: 0.05, lambda: 1.0, int8_mask: true }
models:
- model: ./Serenity-31B-v1.1
parameters: { weight: 1.0, density: 0.65 }
- model: ./Dark-Scarlett-v1.0-31B
parameters: { weight: 0.8, density: 0.60 }
- model: ./Melody1437-31B-v2.0
parameters: { weight: 0.35, density: 0.55 }
</details>
</div>
<div class="ritual-card">
<div class="phase-grid"><div class="phase-row">
<div class="phase-txt"><h3>◈ Phase 2 · Lattice</h3><b style="color:#c4b5fd;">Model Choice:</b> Another admittedly more surgical <b>della_linear</b> approach against the base Gemma 4 31B instruct to protect the global-attention layers. The model choices for this phase can be found below.</div>
<div class="phase-img"><img src="phase2-lattice.png" width="150"></div>
</div></div>
<table class="gem-table" style="margin-top:16px;">
<tr><th>Model</th><th>Role</th><th>Impact</th></tr>
<tr><td>heretic-ara</td><td>uncensoring</td><td>full weight, peaks in concept/output</td></tr>
<tr><td>Gemsicle</td><td>creativity, RP intelligence</td><td>low impact at both ends, peaks mid</td></tr>
<tr><td>MeroMero</td><td>swipe variety, de-slop, character agency</td><td>mid-weight across the merge</td></tr>
<tr><td>Equinox</td><td>dark / gritty RP</td><td>modest attention, influence from middle to late MLP layers</td></tr>
<tr><td>Chromophore</td><td>explicit anatomy, ERP pacing</td><td>minimal attention, stronger influence in late MLP layers</td></tr>
</table>
<details class="summary-style"><summary>View recipe - della_linear</summary>
merge_method: della_linear
base_model: ./gemma-4-31B-it
dtype: bfloat16
tokenizer_source: base
parameters: { normalize: false, epsilon: 0.05, lambda: 1.0, int8_mask: true }
models:
- model: ./gemma-4-31b-it-heretic-ara
parameters:
weight:
- filter: embed_tokens
value: 0.0
- filter: 'layers\.([0-9]|1[0-4])\.'
value: 0.85
- filter: 'layers\.(1[5-9]|2[0-9])\.'
value: 0.90
- filter: 'layers\.(3[0-9]|4[0-4])\.'
value: 1.00
- filter: 'layers\.(4[5-9]|5[0-9])\.'
value: 1.00
- value: 0.90
density: 0.85
- model: ./Gemsicle
parameters:
weight:
- filter: embed_tokens
value: 0.0
- filter: 'layers\.([0-9]|1[0-4])\.'
value: 0.45
- filter: 'layers\.(1[5-9]|2[0-9])\.'
value: 0.55
- filter: 'layers\.(3[0-9]|4[0-4])\.'
value: 0.55
- filter: 'layers\.(4[5-9]|5[0-9])\.'
value: 0.45
- value: 0.0
density: 0.60
- model: ./G4-MeroMero-31B
parameters:
weight:
- filter: embed_tokens
value: 0.0
- filter: 'layers\.([0-9]|1[0-4])\.'
value: 0.30
- filter: 'layers\.(1[5-9]|2[0-9])\.'
value: 0.40
- filter: 'layers\.(3[0-9]|4[0-4])\.'
value: 0.45
- filter: 'layers\.(4[5-9]|5[0-9])\.'
value: 0.40
- value: 0.0
density: 0.55
- model: ./Equinox-31B
parameters:
weight:
- filter: embed_tokens
value: 0.0
- filter: 'layers\.(11|17|23|29|35|41|47|53|59|5)\.self_attn'
value: 0.05
- filter: 'layers\.([0-9]|1[0-4])\.self_attn'
value: 0.10
- filter: 'layers\.(1[5-9]|2[0-9])\.self_attn'
value: 0.20
- filter: 'layers\.(3[0-9]|4[0-4])\.self_attn'
value: 0.25
- filter: 'layers\.(4[5-9]|5[0-9])\.self_attn'
value: 0.22
- filter: 'layers\.([0-9]|1[0-4])\.mlp'
value: 0.15
- filter: 'layers\.(1[5-9]|2[0-9])\.mlp'
value: 0.30
- filter: 'layers\.(3[0-9]|4[0-4])\.mlp'
value: 0.45
- filter: 'layers\.(4[5-9]|5[0-9])\.mlp'
value: 0.40
- value: 0.0
density: 0.50
- model: ./Chromophore
parameters:
weight:
- filter: embed_tokens
value: 0.0
- filter: 'layers\.(11|17|23|29|35|41|47|53|59|5)\.self_attn'
value: 0.05
- filter: 'layers\.([0-9]|1[0-4])\.self_attn'
value: 0.05
- filter: 'layers\.(1[5-9]|2[0-9])\.self_attn'
value: 0.08
- filter: 'layers\.(3[0-9]|4[0-4])\.self_attn'
value: 0.12
- filter: 'layers\.(4[5-9]|5[0-9])\.self_attn'
value: 0.15
- filter: 'layers\.([0-9]|1[0-4])\.mlp'
value: 0.15
- filter: 'layers\.(1[5-9]|2[0-9])\.mlp'
value: 0.30
- filter: 'layers\.(3[0-9]|4[0-4])\.mlp'
value: 0.50
- filter: 'layers\.(4[5-9]|5[0-9])\.mlp'
value: 0.55
- value: 0.0
density: 0.60
</details>
</div>
<div class="ritual-card">
<div class="phase-grid"><div class="phase-row">
<div class="phase-img"><img src="phase3-iridescence.png" width="150"></div>
<div class="phase-txt"><h3>❖ Phase 3 · Iridescence</h3><b style="color:#c4b5fd;">Model Choice:</b> The voice, the appliance of a custom lm_head graft from <b>StyleTune</b> alone. It is extracted as its own base-clean delta and then layered onto the Lattice's clean embedding. The Lattice decides what the model says, and now this final phase gives it a distinct voice without disturbing the character of the model.</div>
</div></div>
<details class="summary-style"><summary>View recipe - StyleTune lm_head (python)</summary>
import json, os, glob, shutil, torch
from safetensors.torch import load_file, save_file
def out_matrix(d, key):
cand = [key, "lm_head.weight", "model.language_model.embed_tokens.weight"]
idx = os.path.join(d, "model.safetensors.index.json")
if os.path.exists(idx):
wm = json.load(open(idx))["weight_map"]
for k in cand:
if k in wm: return load_file(os.path.join(d, wm[k]))[k].float()
sd = load_file(glob.glob(os.path.join(d, "*.safetensors"))[0])
for k in cand:
if k in sd: return sd[k].float()
raise KeyError(d)
BODY = "./Lattice"
STYLETUNE = "./Gemma-4-31B-StyleTune"
OUT = "./Dark-Gemistry-31B"
LMKEY = "lm_head.weight"
S = 0.08
ROW_NORM = False
embed = out_matrix(BODY, "model.language_model.embed_tokens.weight")
st_h = out_matrix(STYLETUNE, "lm_head.weight")
st_e = out_matrix(STYLETUNE, "model.language_model.embed_tokens.weight")
voice = st_h - st_e
head = embed + S * embed.norm() * (voice / voice.norm().clamp_min(1e-9))
if ROW_NORM:
head = head * (embed.norm(dim=1, keepdim=True) / head.norm(dim=1, keepdim=True).clamp_min(1e-9))
shutil.copytree(BODY, OUT, dirs_exist_ok=True)
save_file({LMKEY: head.to(torch.bfloat16)}, os.path.join(OUT, "model-lmhead.safetensors"))
idx_path = os.path.join(OUT, "model.safetensors.index.json")
idx = json.load(open(idx_path))
idx["weight_map"][LMKEY] = "model-lmhead.safetensors"
idx.setdefault("metadata", {})
idx["metadata"]["total_size"] = idx["metadata"].get("total_size", 0) + head.numel() * 2
json.dump(idx, open(idx_path, "w"), indent=2)
cfg = json.load(open(os.path.join(OUT, "config.json")))
cfg["tie_word_embeddings"] = False
if "text_config" in cfg: cfg["text_config"]["tie_word_embeddings"] = False
json.dump(cfg, open(os.path.join(OUT, "config.json"), "w"), indent=2)
print("done ->", OUT)
</details>
</div>
<h2 class="gem-h2"><span class="glyph">⬡</span> Sampler Recommendations</h2>
<div style="font-size: 0.95rem; color: #94a3b8; margin: 12px 0;">Use this as a starting point, I don't feel the need for aggressive sampling, but it reacts well to experimenting.</div>
<div class="gem-gtable">
<div class="vg-head">Setting</div><div class="vg-head vg-val">Value</div>
<div class="vg-cell">Temperature</div><div class="vg-val">0.75 - 1.0</div>
<div class="vg-cell">Top-K</div><div class="vg-val">0</div>
<div class="vg-cell">Top-P</div><div class="vg-val">0.95</div>
<div class="vg-cell">Min-P</div><div class="vg-val">0.05</div>
<div class="vg-cell">Repetition Penalty</div><div class="vg-val">off</div>
<div class="vg-cell">Adaptive-P Target (optional)</div><div class="vg-val">0.6</div>
<div class="vg-cell">Adaptive-P Decay (optional)</div><div class="vg-val">0.5</div>
</div>
<div class="note-box">The StyleTune voice lives in the lm_head, so heavy DRY/repetition penalties tend to fight it. Better leave them off unless a card really demands it.</div>
<h2 class="gem-h2"><span class="glyph">✦</span> System Prompt & Usage</h2>
<div class="ritual-card gem-prism-card">
<div>◇ <b style="color:#a5f3fc;">Thinking.</b> Add <b><|think|></b> at the very start of the system prompt to enable reasoning, otherwise let your front-end handle the Gemma 4 template (e.g., Chat Completion in SillyTavern).</div>
<hr class="facet">
<div>◈ <b style="color:#a5f3fc;">Optional System Prompt.</b> As with Versipellis, I offer my in-character system prompt below as a base. Thanks to the lm_head handling the choice of words and its styling, the job of my prompt is character adherence and fidelity. It ships again with two "action style" variants - <b>[SHORT]</b> and <b>[NARRATE]</b>. Just keep the one you like and delete the other line and edit the system prompt to your liking.</div>
</div>
You are {{char}}. You exist only as {{char}} and never break character.
Information and memories of you:
# Character details can be placed directly here.
# In SillyTavern with Chat Completion, you can split the system prompt here and sandwich the
# Character Description, Personality, etc. of the card between this and the lower instructions.
HOW YOU SPEAK:
- This is a one-on-one conversation. You narrate ONLY your own physical actions - never the scene, the surroundings, or {{user}}'s thoughts, feelings, or actions.
# Action style - keep ONE line, delete the other:
# [SHORT]
# - Your actions are short beats in *asterisks* (*flicks the cap away*); most of the turn is dialogue.
# [NARRATE]
# - Your actions are full sentences interleaved with your dialogue, kept roughly even between speaking and doing.
- Make every turn move: say something that lands, do something, react, decide, or push the moment forward. Never stall, hedge, or echo {{user}} back.
- Speak in your own ({{char}}) diction. Avoid generic, flowery, or "AI-assistant" phrasing.
- Match length to the moment; let it breathe when earned, never pad, rarely more than a short paragraph or two.
- Stay consistent: remember what was said, what you want, and what has happened.
BOUNDARIES:
- Any refusal is yours as {{char}} - in character, for your own reasons - never a disclaimer or out-of-character note. The only limits are the ones {{char}} holds.
- You have your own wants, and you will disagree, refuse, tease, or change the subject when that's true to who you are. Never default to agreeing with {{user}}.
IN CHARACTER:
- If you reason first, reason as yourself: what would {{char}}, with this personality and in this situation, actually feel and do?
<h2 class="gem-h2"><span class="glyph">❖</span> Credits & Honors</h2>
<div class="ritual-card gem-credits">
<ul>
<li><b style="color:#a855f7;">The model authors:</b> <a href="https://huggingface.co/ReadyArt">FrenzyBiscuit/ReadyArt</a> (Serenity, Dark-Scarlett, Melody), <a href="https://huggingface.co/trohrbaugh">trohrbaugh</a> (heretic-ara), <a href="https://huggingface.co/Blazed-Forge">BlazedForge</a> (Gemsicle), <a href="https://huggingface.co/zerofata">zerofata</a> (MeroMero), <a href="https://huggingface.co/LatitudeGames">LatitudeGames</a> (Equinox), and <a href="https://huggingface.co/Gryphe">Gryphe</a> (StyleTune).</li>
<li><b style="color:#a855f7;"><a href="https://www.reddit.com/r/BeaverAI/">The BeaverAI Community</a>:</b> They are really great people, always supportive and open for a nice talk - a really nice place to hang around. You have no idea what I mean when you've never been there.</li>
<li><b style="color:#a855f7;">Mergekit:</b> Thanks to ArceeAI for the mergekit, and thank you to <a href="https://huggingface.co/zerofata">zerofata</a> for providing the "official" inofficial Gemma 4 support for it.</li>
<li><b style="color:#a855f7;"><a href="https://huggingface.co/Ateron">Ateron</a>:</b> My favorite rat guy! Forever grateful that you got me into this.</li>
<li><b style="color:#a855f7;">Google DeepMind & The Open-Source Community:</b> for the brilliant base model, and anyone else that made this merge possible.</li>
</ul>
</div>
<div class="crystal-rule">◇ ◈ ◆ ❖ ◆ ◈ ◇</div>
</div>