Mimesis-26B-A5.2B
โ ๏ธEXPERIMENTAL MODELโ ๏ธ
It's just research.
300 steps is too much. The model started to deteriorate after step 100.
An experimental Gemma 4 26B-A4B that runs with 16 active experts by default instead of 8 (~5.2B active parameters instead of 3.8B), distilled on-policy from sophosympatheia/Glistening-Gem-31B-v2.1.
My main goal was short-range scene memory: the model should track the current state of things in a scene โ who moved where, what changed hands, what someone is wearing now โ instead of falling back to an older state. That is where the clearest gain is.
What changed
- Short-range state tracking is noticeably better. At ~1000 tokens between a change and the question (right around the 1024-token sliding window, where the base used to mix up old and new state), English went from 5/8 to 16/16 correct and Russian from 4/8 to 11/16 at 12 experts.
- 16 experts by default. The model was trained at 12 experts, but scored best at 16 (see the table below).
Part of that gain comes from the expert count itself โ the untrained base also improves at 16 (see Evaluation).
It is set in
config.json(text_config.top_k_experts = 16), so GGUF conversions and KoboldCpp (Experts = -1) pick it up automatically. - Writing style leans toward the teacher. The student was trained to match Glistening-Gem's token distributions, not to copy dataset text, so the voice comes from the teacher while the knowledge and the rest stay Gemma 4 26B-A4B.
- Nothing obvious broke: Russian stays clean (Latin-script words in Russian replies: 0.1% โ 0.5%), JSON-following stays at 100% on my test.
How it was made
Everything in one run โ this is an experiment, not a research ablation.
1. Expert surgery (before training).
- I mapped which experts fire on RP text versus code / wiki in English and Russian.
- Raised active experts from 8 to 12 for training.
- Cloned the hottest RP experts into expert slots that were almost never used (up to 16 per layer).
Parent and clone get half of the original
per_expert_scaleeach, plus a little noise, so the model's output barely changes at the start. During training, a "twin dropout" randomly keeps only one of the pair when both are selected, so the twins can drift apart. - The router stays the same shape; nothing else about the architecture changed.
- The sliding window is untouched (1024). Widening it without training breaks the model โ I checked.
2. On-policy distillation.
- Teacher: Glistening-Gem-31B-v2.1 (loaded in 4-bit NF4 during distillation to fit the hardware).
- Half of the examples are replies written by the student itself, scored by the teacher (on-policy); half are reference replies from the dataset, also scored by the teacher (off-policy).
- Loss: forward KL to the teacher's top-256 tokens at every position of the reply.
- Data: roleplay scenes from a DeepSeek RP dataset (Indexnusrefather/DSV-4.1-1017-RP-COT) plus ~8% Russian RP as an anchor. The dataset only provides the scenes โ the targets are always the teacher's distributions.
- Context up to 8k tokens; student generations up to 448 tokens; reference replies up to 1024 tokens.
3. What was trained.
- All attention (all 30 layers), the shared dense MLP, norms, the router (low LR), and the experts that carry 90% of the RP routing flow according to the activation map (~45 of 128 per layer), plus all clones. About 12.7B trainable parameters.
- Experts that RP text barely uses stayed frozen: during training only ~6โ7% of router picks went to them.
4. Run.
- 300 steps ร 16 scenes = 4,800 scenes, about 9 hours on 2ร RTX PRO 6000 (96 GB).
- AdamW with bf16 weights and stochastic rounding, LR 5e-6 (router 1e-6), 20 warmup steps, decay over the last 15%.
- Chat template: the standard Gemma 4 one, non-thinking mode (empty thought block before each reply) โ the same format the model was trained in.
Evaluation
Scene state test: an object is moved, then the model is asked where it is now. Numbers are the share of answers naming the new location, by distance between the change and the question. Long scenes (16k context); 16 scenes per cell after training, 8 before โ so treat single cells as rough.
| lang | all | <300 | 300โ700 | ~1000 | ~2500 | |
|---|---|---|---|---|---|---|
| before training, 12 experts | en | 0.78 | 1.00 | 1.00 | 0.62 | 0.50 |
| after, 8 experts | en | 0.75 | 1.00 | 0.93 | 0.75 | 0.31 |
| after, 12 experts | en | 0.83 | 1.00 | 1.00 | 1.00 | 0.31 |
| after, 16 experts | en | 0.89 | 1.00 | 1.00 | 1.00 | 0.56 |
| before training, 12 experts | ru | 0.75 | 1.00 | 0.88 | 0.50 | 0.62 |
| after, 8 experts | ru | 0.75 | 0.88 | 0.94 | 0.62 | 0.56 |
| after, 12 experts | ru | 0.84 | 1.00 | 0.94 | 0.69 | 0.75 |
| after, 16 experts | ru | 0.89 | 1.00 | 1.00 | 0.75 | 0.81 |
What this table does and doesn't show. The clean measurement of the training effect is the 12-expert rows: same scenes, before and after (en 0.78 โ 0.83, ru 0.75 โ 0.84, and the ~1000-token column most of all). The untrained base at 16 experts was not measured on these scenes.
An earlier probe of the untrained base (same test, but different and easier scenes) shows that more experts help on their own:
| untrained base, earlier probe | en, all | en, 0.7โ1.7k | ru, all | ru, 0.7โ1.7k |
|---|---|---|---|---|
| 8 experts | 0.80 | 0.62 | 0.80 | 0.67 |
| 12 experts | 0.89 | 0.88 | 0.88 | 0.87 |
| 16 experts | 0.91 | 0.94 | 0.92 | 0.93 |
Those scenes are easier (the base at 12 experts scored 0.89 there vs 0.78 here), so the numbers can't be compared directly. A rough estimate, scaling by how much 16 experts cut errors in that probe: the untrained base at 16 experts would score about 0.82 en / 0.83 ru on the scenes above, versus 0.89 / 0.89 after training. That is an estimate, not a measurement.
For reference, the teacher (31B, bf16) scored 0.98 en / 0.95 ru on the earlier probe's scenes, with no errors up to 1.7k tokens.
Recommended settings
- Experts: leave at the model default (16). You can set 12 in KoboldCpp for ~15โ20% faster generation, at some cost to long-range tracking. Don't go back to 8 โ the model was not trained for it.
- Samplers: SAMPLER_SETTINGS
- Thinking: use non-thinking mode. Thinking was not part of the training and is untested on this model.
Known limitations
- Only 300 steps: this is a first, budget run (~$35). The model is closer to the teacher, not equal to it.
- Long-range tracking (~2500 tokens) in English did not improve at 12 experts; it does at 16.
- Small evaluation: 16 scenes per cell, roughly ยฑ0.15 on any single number.
- Thinking mode is untested.
- At 16 experts there are ~5.2B active parameters instead of ~3.8B, so it is slower than a stock 26B-A4B.
Credits
- Base: Tetratype/Gemma-4-26B-A4B-it-heretic-antislop (Google Gemma 4)
- Teacher: sophosympatheia/Glistening-Gem-31B-v2.1
- Dataset: Indexnusrefather/DSV-4.1-1017-RP-COT
- Training notebooks and pipeline: me, with Claude.
- Downloads last month
- -
Model tree for SubMaroon/Mimesis-26B-A4B
Base model
google/gemma-4-26B-A4B