Median Total Time
6.17s
Median TTFT
6.67s
Median Prefill TPS
1145.18
Median Gen TPS
31.11
Context Size
262144
Quantization
r64 on INT8
Engine
vllm
Creation Method
Finetune
Model Type
Gemma31B
Chat Template
Gemma4
Reasoning
Yes
Vision
Yes
Parameters
31B
Added At
8/8/2026
license: apache-2.0 base_model:
A finetune of Gemma 4 31B designed for creative tasks, particularly narrative RP. Intended to be a more creative version of G4-MeroMero-31B.
This model is the result of a lot of experimentation and learning. Trying to make Gemma 4 more creative without destroying the intelligence is... difficult. To put it mildly.
Heavily inspired by a few research papers, StoryScope: Investigating idiosyncrasies in AI fiction and particularly Elias in the Lighthouse, Again?. Measuring these narrative tics and attractors against simple prompts seems to be a good way to target the model's slop and kick start giving Gemma 4 some diversity: anything that repeatedly occurs across generations of such a generic prompt is something the model is overusing.
Compared to the original, swipes are notably more diverse and feel less like Gemma. RP slop is measurably lower (at least for the type of slop I measure). IFEval / GSM8K / MMLU-Pro are the same as stock with no obvious degradation. The only intelligence drop I've really noticed so far is when you get a swipe that goes a bit hot.
Supports both thinking and non thinking. Reasoning averages longer than stock Gemma 4, but shorter than MeroMero v1.
| Mero Mero v2 | Mero Mero v1 | Stock Gemma 4 | |
|---|---|---|---|
| Swipe diversity — given an RP conversation, generate 8 swipes and evaluate how varied the beats in those swipes are, GLM-judged with a rubric. | |||
| Thinking off | 0.72 | 0.57 | 0.43 |
| Thinking on | 0.62 | 0.49 | 0.32 |
| Slop & attractors — lower is better | |||
| Slop per 1k words, RP replies | 15.5 | 18.0 | 18.5 |
| Slop per 1k words, stories | 7.4 | 8.3 | 8.8 |
| Bare-prompt stories hitting an attractor | 66% | 98% | 99% |
| Top attractor markers — each model's six most frequent, stories containing each of 144 | |||
| #1 | Tuesday · 28 | Elias · 96 | Elias · 102 |
| #2 | Arthur · 20 | Tuesday · 81 | Tuesday · 90 |
| #3 | Elias · 19 | Clara · 57 | Clara · 80 |
| #4 | Leo · 16 | Oakhaven · 46 | Oakhaven · 60 |
| #5 | Elara · 14 | Arthur · 21 | Thorne · 23 |
| #6 | Clara · 14 | Leo · 20 | Arthur · 16 |
| Thinking length — words per think block, RP replies; shorter is better | |||
| Mean / median | 341 / 305 | 382 / 342 | 263 / 253 |
| General benchmarks — thinking off; IFEval & GSM8K full, MMLU-Pro 40q per category | |||
| IFEval | 90.2 | 89.8 | 89.8 |
| GSM8K | 97.0 | 96.1 | 96.7 |
| MMLU-Pro | 85.5 | 85.4 | 84.6 |
Creation Process: SFT > Merge > GRPO > GRPO > on-policy SFT
Stage 1 — Diversity SFT. Stock Gemma 4 collapses hard on underspecified creative prompts ("Write a story." basically always gives clockmaker or memory related stories in a shop with Elias). Trained on ~4,000 short stories curated against the storyscope narrative prompts and found attractors. The dataset is a mix of human stories and synthetic stories from a set of frontier models, with diverse generation prompts swapped out for generic ones and filtered for quality. I also included some of the usual creative instruct and roleplay data. The model came out alright. Creative, but notably worse at instruction following with degraded intelligence. SLERP-merged back into the original instruct at t=0.5, which basically reverted it to stock Gemma 4 with slightly improved prose and creativity (similar to MeroMero).
Stage 2 — Creative GRPO (with think disabled). TRL GRPO (via Axolotl), 8 rollouts per prompt on the same bare prompts. Reward stack: LLM-judge diversity and coherence rewards, an attractor-marker penalty seeded from stock and then updated with whatever started appearing as new attractors during training, narrative-rate penalties and deterministic degeneracy guards (checking for non-Latin characters, joined words etc). 300 steps.
Stage 3 — RP logic GRPO (with think enabled). 100 further steps on multi-turn roleplay contexts: a thinking check to ensure it always parsed correctly, a logic-defect judge (DeepSeek-V4 Flash with a rubric), per-context attractor lists mined from k=8 baselines of the stage 2 model, and the same degeneracy checks as stage 2.
Stage 4 — On-policy multi-outcome RP SFT. ~3,300 samples the model wrote itself on roleplay contexts, filtered to keep only varied continuations. The model wasn't able to produce diverse results purely on-policy, so a natural response was generated first, then each sample went through a GLM-5.2 critique pipeline: error detection, plus steering ideas injected as OOC commands for re-generation (DeepSeek-V4-Pro / GLM-5.2 alternating). Everything was then filtered for errors, slop and any degeneracy as usual. Roughly 60% of samples include thinking. Last turn only.
Trained using Axolotl.
base_model: google/gemma-4-31B-it
plugins:
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
- axolotl.integrations.liger.LigerPlugin
liger_layer_norm: true
liger_rope: true
liger_rms_norm: true
liger_glu_activation: true
liger_rms_norm_gated: true
strict: false
cut_cross_entropy: true
datasets:
- path: ./data/diversity_sft_masked.jsonl
val_set_size: 0
output_dir: ./G4-31B-SFT-v10-2
sequence_len: 8192
pad_to_sequence_len: true
sample_packing: true
adapter: lora
lora_r: 64
lora_alpha: 64
peft_use_rslora: true
lora_dropout: 0.0
freeze_mm_modules: true
lora_target_modules: 'model.language_model.layers.[\d]+.(_checkpoint_wrapped_module.)?(mlp|self_attn).(up|down|gate|q|k|v|o)_proj'
gradient_accumulation_steps: 1
micro_batch_size: 4
num_epochs: 2
optimizer: adamw_torch_fused
lr_scheduler: cosine
learning_rate: 1e-5
max_grad_norm: 1.0
warmup_ratio: 0.1
weight_decay: 0.05
saves_per_epoch: 2
bf16: auto
tf32: true
# FA2 not supported
sdp_attention: true
flash_attention: false
fsdp_config:
fsdp_version: 2
offload_params: false
cpu_ram_efficient_loading: false
auto_wrap_policy: TRANSFORMER_BASED_WRAP
transformer_layer_cls_to_wrap: Gemma4TextDecoderLayer
state_dict_type: FULL_STATE_DICT
sharding_strategy: FULL_SHARD
reshard_after_forward: true
activation_checkpointing: true
merge_method: slerp
base_model: google/gemma-4-31B-it
models:
- model: google/gemma-4-31B-it
- model: ApocalypseParty/G4-31B-SFT-v10-2
parameters:
t: 0.5
dtype: bfloat16
base_model: /workspace/models/configCA # stage 1 output
rl: grpo
trl:
reward_funcs:
- rewards_g4.reward_judge_diversity
- rewards_g4.reward_judge_coherence
- rewards_g4.reward_attractor
- rewards_g4.reward_narrative
- rewards_g4.reward_sane
reward_weights: [3.0, 3.0, 0.75, 1.0, 1.0]
beta: 0.02
num_generations: 8
max_completion_length: 1600
temperature: 1.0
use_vllm: true
scale_rewards: true
loss_type: grpo
epsilon: 0.2
generation_kwargs:
stop_token_ids: [1, 106, 50]
top_k: 64
top_p: 0.95
datasets:
- path: /workspace/data/sft_train_final.jsonl
type: ebft_chat.transform
sequence_len: 2048
micro_batch_size: 2
gradient_accumulation_steps: 4
max_steps: 200
learning_rate: 4.0e-6
optimizer: adamw_torch_fused
lr_scheduler: cosine
warmup_steps: 10
weight_decay: 0.01
adapter: lora
lora_r: 64
lora_alpha: 64
peft_use_rslora: true
lora_dropout: 0.0
freeze_mm_modules: true
lora_target_modules: 'model.language_model.layers.[\d]+.(_checkpoint_wrapped_module.)?(mlp|self_attn).(up|down|gate|q|k|v|o)_proj'
max_grad_norm: 1.0
bf16: auto
tf32: true
sdp_attention: true
flash_attention: false
gradient_checkpointing: true
# shipped weights use checkpoint-100 of this run
base_model: /workspace/models/r4b100 # stage 2 output
rl: grpo
trl:
reward_funcs:
- rewards_rp.reward_thinking # format gate on the think block
- rewards_rp.reward_logic # constraint-grounded defect judge
- rewards_rp.reward_attractor # frozen per-context lists from stock k=8
- rewards_rp.reward_sane # deterministic glitch guards
reward_weights: [2.0, 3.0, 1.0, 1.0]
beta: 0.02
num_generations: 8
max_completion_length: 2560
temperature: 1.0
use_vllm: true
scale_rewards: true
loss_type: grpo
epsilon: 0.2
generation_kwargs:
stop_token_ids: [1, 106, 50]
top_k: 64
top_p: 0.95
datasets:
- path: /workspace/rp/rp3_train.jsonl
type: ebft_chat.transform
sequence_len: 8192
micro_batch_size: 1
gradient_accumulation_steps: 8
max_steps: 100
learning_rate: 3.0e-6
optimizer: adamw_torch_fused
lr_scheduler: cosine
warmup_steps: 10
weight_decay: 0.01
adapter: lora
lora_r: 64
lora_alpha: 64
peft_use_rslora: true
lora_dropout: 0.0
freeze_mm_modules: true
lora_target_modules: 'model.language_model.layers.[\d]+.(_checkpoint_wrapped_module.)?(mlp|self_attn).(up|down|gate|q|k|v|o)_proj'
max_grad_norm: 1.0
bf16: auto
tf32: true
sdp_attention: true
flash_attention: false
gradient_checkpointing: true
base_model: ApocalypseParty/G4-31B-r4b100-GRPO-rp100 # stage 3 output
plugins:
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
- axolotl.integrations.liger.LigerPlugin
liger_layer_norm: true
liger_rope: true
liger_rms_norm: true
liger_glu_activation: true
liger_rms_norm_gated: true
strict: false
cut_cross_entropy: true
datasets:
- path: ./data/g4_onpolicy_rp_masked.jsonl
val_set_size: 0
output_dir: ./G4-31B-r4b100-GRPO-rp100-sft
sequence_len: 8192
pad_to_sequence_len: true
sample_packing: true
adapter: lora
lora_r: 64
lora_alpha: 64
peft_use_rslora: false
lora_dropout: 0.0
freeze_mm_modules: true
lora_target_modules: 'model.language_model.layers.[\d]+.(_checkpoint_wrapped_module.)?(mlp|self_attn).(up|down|gate|q|k|v|o)_proj'
gradient_accumulation_steps: 2
micro_batch_size: 1
num_epochs: 1
optimizer: adamw_torch_fused
lr_scheduler: cosine
learning_rate: 4e-5
max_grad_norm: 1.0
warmup_ratio: 0.1
weight_decay: 0.05
saves_per_epoch: 2
bf16: auto
tf32: true
# FA2 not supported
sdp_attention: true
flash_attention: false
fsdp_config:
fsdp_version: 2
offload_params: false
cpu_ram_efficient_loading: false
auto_wrap_policy: TRANSFORMER_BASED_WRAP
transformer_layer_cls_to_wrap: Gemma4TextDecoderLayer
state_dict_type: FULL_STATE_DICT
sharding_strategy: FULL_SHARD
reshard_after_forward: true
activation_checkpointing: true