Views
No views yet
Model will be ungated for open download soon! These models are undertrained, and are NOT meant to be finished. These are Research Artifacts only.
⚠️ Research artifact, not a product. At ~79M parameters it is fluent but small: it models the shape of language well and generates coherent, grammatical text, but it is not factual and will confidently hallucinate. See Limitations.
.pt embeds a family_config recording the exact
geometry, so generate.py / healthcheck.py / visualize.py rebuild the model with no
external config.generate() prefills the prompt once and decodes one token per
forward.[position, growth-vector, sensed-density] of every tip is read out back into
the hidden state, behind a family gate.MycelStations): tiny memory specialists sit at fixed anchor positions
in the colony. A tip interacts with a station by proximity — which is emergent from
where the tip grew — so which tips use which trait "comes to be" during growth rather than
being assigned to a fixed index. The stations hold test-time-writable input/output stores
that act as an addressable context memory at inference.(k, v) presents threaded through the stack)| Trait | Role |
|---|---|
| HRM | iterative gated hidden-state refinement (random init state, gates open) |
| MoE | SwiGLU mixture (4 routed + 1 shared, top-2) refining the trunk |
| MTP (×4) | multi-token-prediction draft heads → enables self-speculative decoding |
| JEPA | representation-prediction aux loss (train-only; never runs at inference) |
| Ring Specialists (7/ring) | the trait stations described above |
| Fractal Phase Seed | seeds tip positions from each token's Mandelbrot orbit angles (gated) |
| params | 79.2M |
| layers | 10 |
| d_model | 768 |
| heads | 12 (4 KV) |
| vocab | 16512 (SpikeWhale byte-merge) |
| block size | 2048 |
| tips / token | 96, in a 3-D bounded colony |
| field centres | 16 · growth steps 3 · stations 16 |
family_config inside the .pt records the exact
geometry so the model rebuilds itself on load.model.py QuazimotoLM + QuazimotoConfig — the transformer backbone, attention,
KV cache, traits (HRM/MoE/MTP/JEPA), generate() and forward_drafts()
mycel.py MycelBlock (Neighbour-Sensing growth mixer) + MycelStations
family.py shared family layers (MoE, HRM, specialists, norms, ...)
fractal.py hierarchical Mandelbrot phase seeding (FractalSeed trait)
instrument.py zero-cost capture hooks the visualizer reads from
special_tokens.py ChatML / control-token definitions
spike_tokenizer.py SpikeWhale byte-merge tokenizer (subclasses PreTrainedTokenizer)
tokenizer.json the tokenizer vocab / merges (vocab 16,512)
fractal_phase.pt precomputed hierarchical Mandelbrot phase table (regenerable)
generate.py inference harness — KV cache + self-speculative decoding + sampling
healthcheck.py per-layer weight / gate / PPL diagnostics for a checkpoint
visualize.py builds the 3-D colony dashboard (viz.html) from a generation
train.py pretraining entry point (streamed multi-corpus blend)
train_sft.py supervised fine-tuning (ChatML, assistant-only loss masking)
chat_sft.py chat-format rendering / loss masking helpers used by SFT
train_opd.py OPD (on-policy distillation) training loop
distill_uld.py universal-logit-distillation utilities
opd_teacher.py teacher wrapper for distillation
build_fractal_table.py regenerates fractal_phase.pt
train.bat / train_sft.bat Windows convenience launchers
chkpt/quazimoto.pt pretraining checkpoint (step 149,000)
chkpt/quazimoto_sft.pt SFT checkpoint (step 4,000, ChatML)Note: the Modal cloud launchers (modal_train.py,modal_sft.py) are intentionally not part of this package. The scripts above run locally on CPU or a single GPU.
pip install -r requirements.txttorch, numpy, transformers (the tokenizer subclasses
PreTrainedTokenizer). Training additionally uses datasets and huggingface_hub.
Everything below runs on CPU (slow but functional) or a single GPU.1import torch
2from model import QuazimotoLM, QuazimotoConfig
3from spike_tokenizer import SpikeTokenizer
4
5ck = torch.load("chkpt/quazimoto.pt", map_location="cpu", weights_only=False)
6cfg = QuazimotoConfig(**ck["family_config"]) # self-describing
7model = QuazimotoLM(cfg); model.load_state_dict(ck["model"], strict=False); model.eval()
8tok = SpikeTokenizer(vocab_file="tokenizer.json")
9
10ids = torch.tensor([tok.encode("The mycelium spreads through the soil", add_special_tokens=False)])
11out = model.generate(ids, n_new=80, temperature=0.8, top_k=40) # KV cache on by default
12print(tok.decode(out[0].tolist(), skip_special_tokens=True))<|im_end|> (the SFT checkpoint
was trained on this framing):1prompt = "<|im_start|><|user|>\nWhat is mycelium?<|im_end|>\n<|im_start|><|assistant|>\n"
2ids = torch.tensor([tok.encode(prompt, add_special_tokens=False)])
3out = model.generate(ids, n_new=120, temperature=0.7, top_k=40)1# plain completion (KV cache on by default)
2python generate.py --ckpt chkpt/quazimoto.pt --prompt "In the beginning" --max_new_tokens 80
3
4# chat turn (ChatML framing + stop on <|im_end|>)
5python generate.py --ckpt chkpt/quazimoto_sft.pt --chat --prompt "Hello, who are you?"
6
7# interactive REPL
8python generate.py --ckpt chkpt/quazimoto_sft.pt --interactive
9
10# self-speculative decoding (MTP heads draft, main head verifies; report acceptance)
11python generate.py --ckpt chkpt/quazimoto.pt --speculative --spec_stats
12
13# disable the KV cache (full recompute each step — for comparison)
14python generate.py --ckpt chkpt/quazimoto.pt --no_cache
15
16# per-layer diagnostics (weights / gates / PPL)
17python healthcheck.py --ckpt chkpt/quazimoto.pt--temperature, --top_k, --top_p, --repetition_penalty, --seed.visualize.py renders the colony growing in 3-D as the model generates, token by token —
hyphal tips linked into a filament web, coloured by local density, with the trait stations
shown as orange wire-spheres. It writes a self-contained viz.html (Three.js from a CDN):python visualize.py --ckpt chkpt/quazimoto_sft.pt --prompt "the mycelium spreads" --tokens 50Mycel-LM v1) wraps the same architecture in an
interactive chat — KV-cache decoding drives the reply while the 3-D colony visualizer
animates the growth for the generated tokens.1python train.py --device cuda --steps 160000 --batch 12 --block 2048 --amp \
2 --use-hrm --use-moe --use-mtp --use-jepa --use-ring-specialists --use-fractal-phase-seed \
3 --stream --math-frac 0.25 --out chkpt/quazimoto.pt --ckpt-every 500 --resumedatasets;
gated corpora need huggingface-cli login.--resume continues from the checkpoint at --out. The growth loop is activation-heavy,
so keep the batch modest; --amp gives a bf16 speedup on GPU.--help to train.py for the full trait / optimiser / schedule surface.1python train_sft.py --init chkpt/quazimoto.pt --out chkpt/quazimoto_sft.pt \
2 --steps 4000 --batch 8 --block 2048 --ampchat_sft.py).The distributed checkpoints carry weights only (optimizer state stripped to keep the download small). Fine-tuning starts a fresh optimizer from them, which is the normal path; only exact resumption of the original pretraining run would need the optimizer state.
chkpt/quazimoto.pt — pretraining checkpoint, step 149,000chkpt/quazimoto_sft.pt — SFT checkpoint, step 4,000 (ChatML, early)family_config (self-describing) and load with strict=False so future trait
additions stay backward-compatible.AutoModel; use the bundled model.py.1@misc{mycellm79m,
2 title = {Mycel-LM-79M: A ~79M-parameter Neighbour-Sensing fungal-colony language model},
3 author = {Dean Byrne (Quazim0t0)},
4 year = {2026},
5 howpublished = {HuggingFace, \url{https://huggingface.co/Quazim0t0/Mycel-LM-79M}},
6 note = {Quazim0t0/Mycel-LM-79M}
7}