Views
No views yet
| Metric | v5-LN (baseline) | v9.7 (memory-enhanced) |
|---|---|---|
| Val PPL | 11.94 | 10.23 |
| Parameters | 2.0M | 2.47M |
| Speed | 7,833 tok/s | 3,369 tok/s |
| Coherent? | Semi | Semi |
| NaN events | 0 | 0 |
embed + CumStepPos → [RAMScanBlock × 6] → LayerNorm → tied output + FSP
RAMScanBlock:
# Cumsum backbone (same as v5-LN)
x_n = LayerNorm(x)
h = W_proj(x_n) # fused: d → 3k
query, key, value = chunk(h, 3)
key = sigmoid(key); value = tanh(value)
scan_out = W_m(query * cumsum(key*value) / cumsum(key))
# RAM-Net sparse memory sidepath
addr = W_addr(x_n) → Product Softmax → Top-8 of 512 virtual slots
mem_out = sparse_read_write(addr, x_n)
merged = scan_out + W_mem_proj(mem_out) # direct addition, no gate
x = x + W_out(merged)
x = x + ff_down(relu(ff_up(LayerNorm(x))))...They saw many kids playing near the back house. They went up to a tree and gave them to their dad. They were very happy. After a while, they saw a big pile of ants. It was not a normal day. They did not want to play hide behind. Tim and his friends were scared, but they did not want to go home.
...she put her shoes in the park. In the park, Lily saw a big lock on the ground. She wanted to open it. She tried to open the key, but it was too small. She tried to unlock the door open, but she could not.
1import torch
2from tokenizers import Tokenizer
3
4tokenizer = Tokenizer.from_file("tokenizer.json")
5checkpoint = torch.load("best.pt", map_location="cpu")
6# Build model (see train_cpuflow_v97_simple_memory.py for full architecture)
7# Generate with temperature=0.81@misc{Chang,
2 title = {FlashLM: CPU-Native Language Models Trained From Scratch on Free-Tier Hardware},
3 author = {Chang, Cheng},
4 year = {2026},
5 publisher = {Zenodo},
6 doi = {10.5281/zenodo.20113960}
7}