ProcAI v3.1 (93M)
A 93M-parameter English language model with no transformer core: 14 gated-linear-recurrence
blocks plus 2 sliding-window attention blocks (window 512), d=640, vocab 12k, tied embeddings.
Trained from scratch on one RTX 3070 Laptop (8 GB), built to run on a CPU.
Generation state is fixed-size (~1.35M numbers, ~5.4 MB) however long the conversation gets: same cost per token at position 100 and 1,000,000. A 1M-token prompt prefills in ~47 s on the laptop GPU under 1 GiB. ~60 tok/s on one CPU conversation, ~1,500 tok/s batched.
Code, training, evals and the full lab notebook: https://github.com/mirecekvan/procai
Quickstart
pip install torch tokenizers numpy huggingface_hub
git clone https://github.com/mirecekvan/procai.git && cd procai && pip install -r requirements.txt
hf download MirecekVan/procai-v3-1 --local-dir release
python chat.py --ckpt release/procai_v3_1_bf16.pt --prompt "What is 27 + 35? Answer:" --n 10
Reproduce the numbers
PYTHONPATH=src python eval_reason.py --ckpt release/procai_v3_1_bf16.pt --device cpu # 36/53, FIRST 34/53
PYTHONPATH=src python scripts/eval_arith.py --ckpt release/procai_v3_1_bf16.pt --device cpu # 253/400 held-out
Architecture: no transformer core
Each of the 16 blocks is RMSNorm โ depthwise causal conv (k=4) โ RMSNorm โ mixer โ RMSNorm โ SiLU MLP, with residuals. The mixer is one of two things:
- PGLR (14 blocks): a parallel gated linear recurrence. Forget/input gates and a tanh candidate update a matrix-valued state per token; training solves the recurrence for all positions at once with a Hillis-Steele associative scan, generation is one multiply-add per channel per token.
- Sliding-window attention (blocks 5 and 11 only): causal, 8 heads, RoPE, window 512. It carries exact recall inside the window, which pure recurrences are bad at.
Per-conversation state is fixed-size: a conv buffer per block (16) and one vector per PGLR block (14),
plus a 512-entry KV cache in the two attention blocks โ 1.35M numbers (5.4 MB) for a whole
conversation, however long. The state
can be saved to a file, restored, and forked (procai.state in the repo; demo: scripts/state_demo.py).
The price: recall past the 512 window collapses, and 93M parameters cap what the model knows. Full
detail in docs/ARCHITECTURE.md.
Speed (measured, i7-11800H + RTX 3070 Laptop)
| CPU | GPU | |
|---|---|---|
| one conversation | ~60 tok/s | ~180 tok/s |
| batched | ~1,500 tok/s (B=128) | ~12,000 tok/s (B=128) |
| 1M-token prefill | ~7 min | ~47 s, under 1 GiB |
| 1M tokens out, batched (B=128) | ~11 min | ~1.5 min |
Files
| file | size | note |
|---|---|---|
procai_v3_1_fp32.pt |
373 MB | exact weights |
procai_v3_1_bf16.pt |
187 MB | same as fp32 except held-out arithmetic (253 vs 252) |
bpe_v3_12000_digits.json |
0.8 MB | digit tokenizer (also embedded in both .pt) |
SHA256SUMS.json |
hashes of both .pt files |
Load with torch.load(path, weights_only=True); the dict holds sd, cfg, step and the
tokenizer JSON. Numbers are tokenized one digit per token. Code in the linked repo is MIT;
these weights are Apache-2.0.
What it can and cannot do
| v3 base | v3.1 | |
|---|---|---|
53 fixed tasks (eval_reason.py), substring |
18/53 | 36/53 |
| same, word-boundary | 17/53 | 36/53 |
| same, first thing written must be the answer | 15/53 | 34/53 |
| held-out arithmetic (400 problems never trained on) | 9 (2 %) | 252 (63 %) |
| loss on text without digits | 2.234 | 2.283 (+5 % perplexity) |
Held-out tiers (40 each): 2-digit add/sub 27/35, 3-digit 27/29, times <=12 28, times <=25 10, exact division 12, three-term sum 23, order of operations 22, two-step word problems 39, 4-digit add 1.
v3.1 is v3 plus 14,500 continuation steps on synthetic short tasks with digit-split numbers and
replay, ending with 5,000 answer-only steps. The masked loss was the largest single lever (+18
held-out points in 5,000 steps; 3-digit addition 11 -> 27 of 40). The full stage-by-stage story,
including the stage that gained nothing, is in
docs/REASONING_PLAN.md.
It computes short numbers: 2-3 digit add/subtract 68-88 %, but products above 12x12 25 %,
division 30 %, and 4-digit addition 1/40. No length generalisation: 27 + 35 is answered 64.
Facts it never learned stay wrong. A research artifact, not an assistant.
Training
120,000 steps from scratch over 1.97B tokens (Muon + AdamW, WSD schedule, bf16, ~70 h of step time on an 80 W RTX 3070 Laptop), then 14,500 continuation steps (0.24B tokens, ~8 GPU-hours) on synthetic short tasks plus a ~127M-token replay of the original corpus, ending with 5,000 answer-only steps. Base data: 1.9M documents / 9.6 GB of text (FineWeb-Edu, DCLM-baseline, Cosmopedia, FineMath, CodeSearchNet). The exact corpus recipe was never recorded, so it cannot be rebuilt byte for byte.
What did not work is kept in the repo as well: multi-token prediction, surprise filtering, four
alternative optimizers, rejection-sampling and reasoning-mix fine-tuning
(docs/ideas.md).
Limitations
Base model, no safety or instruction tuning. English only. Recall is 10/10 at 250 tokens back, 0/10 by 500. ~5 % more perplexity on ordinary text than the v3 base. The source datasets carry different licences (some gated), which were not individually cleared before this release.
Citation
Miroslav Vanฤk (mirecekvan), 2026. ProcAI v3.1: a 93M-parameter non-transformer language model. https://github.com/mirecekvan/procai