Infrastructure smoke test
Do all three model families construct, train-step, and write JSON records end-to-end?
smoke_ok=true — transformer 411,520 / ssm 249,472 / hybrid 330,496 params all step cleanly.
- ▸results/exp000_smoke.json
QUERAIS RESEARCH LABS // ARCHITECTURE DISCOVERY
We hunt neural architectures with measurably better useful intelligence per unit of compute, memory, energy, latency and network bandwidth — with decentralized heterogeneous inference as a first-class target.
Rank falsifiable questions by expected information gain per unit of compute.
Commit to a measurable outcome before running anything.
Pure-PyTorch transformer / ssm / hybrid blocks built from the model registry.
Matched total parameter count (+/-5%) and identical tokens/steps/optimizer/schedule unless explicitly disclosed.
Accuracy on task-relevant positions only; param counts, FLOPs/token estimates, host fingerprint, JSON record per run.
Read curves against the committed prediction; negative results count as evidence.
No claim enters STATUS.md without a results/*.json artifact.
Failures gate retests and feed the next ranked question in the cycle.
Negative results are recorded, not discarded.
Do all three model families construct, train-step, and write JSON records end-to-end?
smoke_ok=true — transformer 411,520 / ssm 249,472 / hybrid 330,496 params all step cleanly.
At ~800k matched params, which primitive solves multi-query associative recall — and does one attention layer recover the gap in a hybrid?
Transformer d128/L4 reaches 100% eval accuracy by step ~2250 on zoology-faithful MQAR-4 (4000 steps, 822,912 params); SSM and hybrid_1attn runs diverged mid-run (NaN loss, acc 0.0 at cutoff) — rerun pending under the post-F-0002 protocol.
Softmax attention outperforms selective SSMs on multi-query associative recall when total params (~800k), tokens, optimizer, and schedule are matched.
Replacing one of six SSM layers with attention recovers >=80% of the H1 accuracy gap while adding <25% of the attention-layer compute share.
On char-level language modeling (low exact-recall demand), selective SSM reaches transformer val loss at matched params/tokens.
On the copy task, attention reaches near-perfect accuracy once induction forms, independent of prefix length within context; SSM accuracy decays with prefix length.
SSM MQAR accuracy falls monotonically as kv_pairs grows (4→8→16); attention stays high until context limits bind.
Increasing n_state (8→16→32→64) narrows the SSM recall gap but with diminishing, log-like returns — predicting hard capacity walls for fixed-state models.
Sliding-window attention (w=12 < distance to needed keys) fails MQAR; a window+SSM hybrid partially recovers via state-mediated indirection.
A token-level learned router choosing attention vs SSM per layer matches dense-hybrid accuracy at <=70% of its attention compute.
Despite worse asymptotics, optimized attention beats our naive SSM scan at short T on CPU, and the crossover where SSM throughput wins sits at T >> typical training lengths.
Expert/state sharding communication volume vs pipeline on simulated heterogeneous nodes.
Expand a row for its committed prediction and falsifier.
| FAMILY | MECHANISM | NOTE | STATUS |
|---|---|---|---|
Softmax Transformers F1 | Content-based soft addressing over full history; exact token-level retrieval. Train O(T²·d); inference KV cache O(T·d·L) grows without bound. | Vaswani et al. 2017. Baseline implemented (lab/models/transformer.py); basics reproduced in exp000 — learns MQAR above chance with a sane loss curve. | REPRODUCED |
Linear attention / fast-weight family F2 | phi(q)phi(k)^T outer-product state, O(T); gated/decayed variants keep the same fundamental fixed-state recall limit at small scale. | Katharopoulos 2020, RetNet/GLA/DeltaNet. 'Matches transformer LM quality' holds for perplexity but not recall-heavy evals. Planned GLA-style variant if SSM results warrant. | UNVERIFIED |
State-space models (S4/S5/Mamba/Mamba-2) F3 | Input-dependent selectivity (Δ, B, C functions of x); linear time, constant state. Mamba-2/SSD connects SSMs to linear attention via chunkwise parallel form. | Gu & Dao 2023/2024. Minimal faithful S6 implemented with custom verified autograd scan; exp001 is the first controlled comparison. Our pure-torch CPU scan runs ~10–15x slower per step than SDPA attention at T=23 — asymptotic wins do not transfer to naive implementations. | PARTIAL |
Recurrent LMs (RWKV, xLSTM) F4 | RNN formulations competitive on perplexity, sharing the same recall limits as other fixed-state recurrence. | Lower priority than SSMs — similar primitive class. | UNVERIFIED |
Hybrids (attention + recurrence interleaved) F5 | A small fraction of attention layers (10–25%) recovers most recall/in-context ability while keeping recurrent efficiency (H3/Hyena, Based, Jamba, Zamba, Samba, Griffin/RecurrentGemma, MiniMax-01, Nemotron-H). | The single most replicated practical result across independent groups. Hybrid stack implemented (lab/models/hybrid.py); exp001 tests it — conclusion pending. | PARTIAL |
Memory / retrieval augmentation F6 | External/compressed memory decouples context cost from state capacity (Memorizing Transformer, Infini-attention, Titans neural memory, TTT layers, RMT). | Could cut KV-cache and long-context processing costs — central to the deployment goal. Not started; requires reliable base models first. | UNVERIFIED |
MoE / sparse experts F7 | More capacity per active FLOP via conditional expert routing (Switch, Mixtral, DeepSeek-V3); expert parallelism maps onto distributed heterogeneous nodes but all-to-all routing traffic is bandwidth-heavy. | Tension with the decentralized-inference goal. Not started; blocked behind solid dense baselines. | UNVERIFIED |
Adaptive computation F8 | Spend compute conditionally (ACT, PonderNet, early exit, Mixture-of-Depths): can a router decide WHEN attention is needed, at token or segment level? | Open question we care about. Routing overhead must not exceed savings — measure quality per additional FLOP. Not started. | UNVERIFIED |
Long-context mechanisms F9 | Sliding window, BigBird/Longformer sparse patterns, ring attention (distributed). Local attention alone cannot do exact long-range recall beyond its window bound. | Cheap to verify locally; interacts with H7. | UNVERIFIED |
Content-based soft addressing over full history; exact token-level retrieval. Train O(T²·d); inference KV cache O(T·d·L) grows without bound.
Vaswani et al. 2017. Baseline implemented (lab/models/transformer.py); basics reproduced in exp000 — learns MQAR above chance with a sane loss curve.
phi(q)phi(k)^T outer-product state, O(T); gated/decayed variants keep the same fundamental fixed-state recall limit at small scale.
Katharopoulos 2020, RetNet/GLA/DeltaNet. 'Matches transformer LM quality' holds for perplexity but not recall-heavy evals. Planned GLA-style variant if SSM results warrant.
Input-dependent selectivity (Δ, B, C functions of x); linear time, constant state. Mamba-2/SSD connects SSMs to linear attention via chunkwise parallel form.
Gu & Dao 2023/2024. Minimal faithful S6 implemented with custom verified autograd scan; exp001 is the first controlled comparison. Our pure-torch CPU scan runs ~10–15x slower per step than SDPA attention at T=23 — asymptotic wins do not transfer to naive implementations.
RNN formulations competitive on perplexity, sharing the same recall limits as other fixed-state recurrence.
Lower priority than SSMs — similar primitive class.
A small fraction of attention layers (10–25%) recovers most recall/in-context ability while keeping recurrent efficiency (H3/Hyena, Based, Jamba, Zamba, Samba, Griffin/RecurrentGemma, MiniMax-01, Nemotron-H).
The single most replicated practical result across independent groups. Hybrid stack implemented (lab/models/hybrid.py); exp001 tests it — conclusion pending.
External/compressed memory decouples context cost from state capacity (Memorizing Transformer, Infini-attention, Titans neural memory, TTT layers, RMT).
Could cut KV-cache and long-context processing costs — central to the deployment goal. Not started; requires reliable base models first.
More capacity per active FLOP via conditional expert routing (Switch, Mixtral, DeepSeek-V3); expert parallelism maps onto distributed heterogeneous nodes but all-to-all routing traffic is bandwidth-heavy.
Tension with the decentralized-inference goal. Not started; blocked behind solid dense baselines.
Spend compute conditionally (ACT, PonderNet, early exit, Mixture-of-Depths): can a router decide WHEN attention is needed, at token or segment level?
Open question we care about. Routing overhead must not exceed savings — measure quality per additional FLOP. Not started.
Sliding window, BigBird/Longformer sparse patterns, ring attention (distributed). Local attention alone cannot do exact long-range recall beyond its window bound.
Cheap to verify locally; interacts with H7.
Statuses defined in LEDGER.md — UNVERIFIED literature-only · PARTIAL small-scale local evidence · REPRODUCED replicated · REFUTED_LOCAL our test disagreed.
Every failed or inconclusive experiment is recorded. No idea gets retested without reading this file first.
Val acc reached only 0.206 and was still climbing steeply at cutoff — NOT converged. 800 steps is eliminated as a sufficient budget at d128/batch64 on MQAR-8; conclusions from this regime would be meaningless for either architecture. Everything remains plausible; recalibrate convergence before any comparison.
All models pinned exactly at loss=ln(#pairs) — uniform over values present — because GPT-2-style std=0.02 embedding init leaves attention scores ~0: a symmetric saddle where content matching never forms. Earlier copy-task 'successes' were positional shortcuts. Re-initializing embeddings to N(0,1) lets the same 4-layer d128 transformer solve zoology-faithful MQAR to 100% eval accuracy by step ~1500-2000. Big-embedding init is now lab default (embed_init_std=1.0).
System torch is CPU-only; CUDA wheel installs failed twice (no working cu126/cu128/cu130 build; torch 2.7.1+cu126 aborted on disk full — ~2GB free vs ~7GB needed). All experiments stay CPU-bound on shared desktop cores; scale capped at ~2M params and throughput numbers are indicative only. Re-enable condition: >=7GB free disk, then rerun exp007 on GPU where it actually matters.
Rule added after F-0002: every benchmark generator must ship (a) a ground-truth oracle solver scoring 100%, AND (b) a reference-model sanity check showing the task is learnable within a modest budget BEFORE any architecture comparison runs on it.
Unusable — system torch is CPU-only; CUDA wheel needs ~7GB disk; disk full.
Shared desktop — load varies.
Hard constraint.
Consequences: models stay at or under ~2M parameters, tasks are synthetic by necessity, and CPU throughput numbers are indicative only.