Downloads · 30 days
2.4K
27% of all-time downloads
tardellirs/gemma3moe-16x4-270m-starter
gemma3moe-16x4-270m-starter is a text generation model from tardellirs. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
Downloads · 30 days
2.4K
27% of all-time downloads
All-time downloads
8.8K
Public
Parameters
1.3B
2.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.7 GB · 99%
From the Hugging Face model README
A ready-made Mixture-of-Experts initialization — 16 experts, top-4 — sparse-upcycled from
google/gemma-3-270m. This is a starting point for
your own training / fine-tuning, not a trained model: it is the standard copy-init upcycle, so at step
0 it is mathematically identical to the dense Gemma-3-270m. Load it, then train.
⚠️ Untrained. Out of the box it behaves exactly like
gemma-3-270m(verified: max logit diff0.000e+00). Its value is as a clean MoE init with more capacity to train into.
gemma3moe — Gemma-3 with each dense FFN replaced by a router + 16 Gemma3MLP
experts (softmax top-4, renormalized).llama.cpp.modeling_gemma3_moe.py + auto_map, so it reloads with
trust_remote_code=True.Sparse upcycling initializes each expert from the pretrained dense FFN, so you keep all of Gemma-3-270m's learned knowledge while adding capacity (16× the FFN parameters) that training can specialize. Copy-init makes the MoE exactly equal to the dense model at step 0 — a stable, well-behaved starting point, strictly better than training a randomly-initialized MoE from scratch.
| Total params | Active (top-4) | Vocab | |
|---|---|---|---|
| This checkpoint | ~1.33B | ~481M | 262k (full) |
google/gemma-3-270m (dense) | ~268M | ~268M | 262k |
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
repo = "tardellirs/gemma3moe-16x4-270m-starter"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16)
# It's an INIT — fine-tune it on your data before using for generation.
Choose a different experts/top-k or a trimmed vocabulary, and serve on CPU via llama.cpp, using the
open-source toolkit that built this checkpoint:
➡️ github.com/tardellirs/gemma3moe-builder
# reproduce this checkpoint
python -m gemma3moe.upcycle --src google/gemma-3-270m --out ./starter --num-experts 16 --top-k 4
# fine-tune
python -m gemma3moe.train --init ./starter --train train.jsonl --val val.jsonl --out ./trained
std=0.02) so gradients can differentiate the experts during
training; all 16 experts are copies of the dense FFN at init.train.py and
docs/NOTES.md).Weights derive from Gemma-3 and are subject to the Gemma Terms of Use. Built with gemma3moe-builder (Apache-2.0).