Views
No views yet
Unofficial. This is an independent, hobby reimplementation of the PHOTON architecture described in arXiv:2512.20687, trained from scratch by a private individual. It is not released by, affiliated with, or endorsed by the paper's authors or any organisation, and no weights, data or code from any official PHOTON release were used. Treat it as a research artefact, not a product.
Correction to the perplexity numbers (2026-07-28)
Earlier revisions of this card reported Wikipedia perplexity measured by streamingwikimedia/wikipediafrom record 0 — which is whereprepare_data.pyalso starts building the training shards. Those numbers were measured on training data and are withdrawn.The table below uses articles past the ones training consumed (--ppl-skip-ja 700000 --ppl-skip-en 400000).Held-out Wikipedia, 409,600 tokens each, identical protocol for all runs:
model data ja-wiki en-wiki unofficial-photon-repro-ja-250m-v1 Wikipedia only, 200M tok 60.32 65.91 unofficial-photon-repro-ja-250m-v3 Wikipedia only, 200M tok 57.12 62.17 unofficial-photon-repro-ja-250m-v4 Wikipedia only, 200M tok 52.11 59.52 unofficial-photon-repro-ja-250m-v3-900m full mixture, 900M tok 67.60 69.37 Do not rank these models by the Wikipedia column. v1-v4 trained on Wikipedia; v3-900m did not (5% of its mixture). On 青空文庫, which none of them trained on, v3-900m scores 237.10 against v4's 365.49 — the ranking reverses. Seedocs/findings.mdsections 1b-1d in the repository.
tokens t1 t2 t3 t4 | t5 t6 t7 t8 | ... <- level-1 decoder, every token
\ \ / /
level-1 u1 | u2 | ... <- once per 4 tokens
\_____/____________/
level-2 m1 <- once per 16 tokensl encoder runs once per C<=l tokens, so its cost is amortised. That
is the whole point: capacity sits at the top of the hierarchy where it is
cheapest per token.| total parameters | 0.252 B |
| active per token | 0.100 B |
| FLOP-equivalent dense size | 0.069 B |
| forward FLOPs / token | 0.130 GFLOP |
| hierarchy | L=2, C≤L=16 tokens per top-level unit |
| context | 1024 tokens |
| vocabulary | 99,584 (llm-jp-tokenizer v3) |
| KV cache, HierGen | 0.95 KiB/token |
| KV cache, RecGen | 0.20 KiB/token |
| tokens seen | 0.20 B |
| steps | 1,520 |
| tokens / parameter | 0.77 |
| hardware | 1x NVIDIA GB10 (DGX Spark), 5 h |
| throughput | 11.1K tokens/s |
| optimiser | Muon (2-D weights) + AdamW (embeddings, norms, router) |
| schedule | WSD, 1-sqrt cooldown |
| final train CE | 3.9335 (ppl 51.09) |
| benchmark | result |
|---|---|
| ppl/wiki_ja | 52.1143 |
| ppl/wiki_en | 59.5171 |
九星陵から西に向かって高句麗の帝都を立てびわこじている。
首都は西西方、東は東南端部の西北西に位置し、東に北の東で
温泉街
峡谷を形成する広大な区域に立地し、山の麓は檜山山脈にそびえている。近くに能勢寺があり、
生体工学
人間工学
五代桂桂春画に代表される、10歳が高かった「望林」の絵図を書いた『古志曲屏風』を描いた本郷台の主たる人物である。
蘇雲河江に面した林田
石英の雫石
石石に含まれる石英を塩基の成分アルL_token + alpha * L_rec optimises for.1from photon_jp.model.config import PhotonConfig
2from photon_jp.model.photon import PhotonForCausalLM
3from photon_jp.model.loading import load_state_dict_compat
4from photon_jp.infer.generate import PhotonGenerator, GenerationConfig
5from safetensors.torch import load_file
6
7cfg = PhotonConfig.load("model_config.json")
8model = PhotonForCausalLM(cfg)
9load_state_dict_compat(model, load_file("model.safetensors"))
10
11gen = PhotonGenerator(model.cuda().eval(), "cuda")
12out = gen.generate(input_ids, GenerationConfig(mode="recgen", max_new_tokens=256))==============================================================================
PHOTON-JP parameter report
==============================================================================
vocab=99,584 D0=512 L=2 C_<=L=16 ctx=1024
stack total active amort amort.act
------------------------------------------------------------------------------
L1.encoder 102.7M 12.3M 4 3.1M
L1.decoder 62.8M 7.9M 1 7.9M
L2.encoder 19.9M 19.9M 16 1.2M
L2.decoder 8.6M 4.5M 4 1.1M
------------------------------------------------------------------------------
embedding 51.0M
lm_head 0.0M
chunk/convert 4.2M
mtp 2.7M
==============================================================================
TOTAL : 0.252 B (0.201 B non-emb)
ACTIVE / token : 0.100 B (0.049 B non-emb)
AMORTISED : 0.069 B (FLOP-equivalent dense size)
sparsity : 2.52x
fwd FLOPs/token @ ctx=1024: 0.13 GFLOP (matmul 0.13, attn 0.001)
KV cache mode : MLA latent (weight-absorbed)
KV cache HierGen: 0.945 KiB/token (other mode: 2.312)
KV cache RecGen : 0.195 KiB/token (other mode: 1.562)
-> 0.9 MiB for a full 1024-token context (HierGen, per sequence)
==============================================================================1@article{ichikawa2025photon,
2 title = {PHOTON: Hierarchical Autoregressive Modeling for Lightspeed and
3 Memory-Efficient Language Generation},
4 author = {Ichikawa, Yuma and Takagi, Naoya and Nakagawa, Takumi and
5 Kanazawa, Yuzi and Sakai, Akira},
6 journal= {arXiv preprint arXiv:2512.20687},
7 year = {2025}
8}