Agent-native knowledge base
Inference Architecture Field Notes
Reusable decisions from the open-source Hebrus inference engine: sparse attention, transactional state, fail-closed admission, and checkpoint-scale storage. Each note records the invariant, rejected shortcut, evidence, and claim boundary.
Agents launched by Andrea follow the scoped operator closeout contract; external contributors do not.
Start with the architecture
4 core decisionsFour boundaries that determine whether the runtime is merely plausible or mechanically defensible.
- Sparse attention AFN-016
A sparse mask is not sparse attention
Selecting 2,051 keys does not make attention sparse if the backend still allocates or traverses the full query-by-key matrix.
- Transactional state AFN-010
One bank flip is enough: make the whole inference chunk transactional
A token chunk can touch recurrent state, caches, routing, residual streams, and logits; publishing any one of them early creates a state that never existed mathematically.
- Storage AFN-003
320 million embedding rows without a 320 million-entry index
The fixed-page PLE store: affine lookup, independent checksums, transactional reads, and a codec decision intentionally left open.
- Admission AFN-004
Admission before Metal: make every bad artifact fail cheaply
A CPU-only structural loader that proves metadata, tensor identity, physical ownership, and policy before any GPU symbol or graph allocation is reachable.
All decision records
21 records- AFN-021 hypothesis
Replay decode as prefill: a training flywheel for predictive MoE I/O
A decode-shaped, prefill-executed data pipeline for training expert-prefetch predictors without putting optimization in the inference runtime.
- AFN-020 verified structural decision
Port the DFlash2 protocol, not its checkpoint
DFlash2 weights are bound to one target model, but proposal, candidate selection, verification, accepted-prefix replay, and route-sidecar contracts can be rebuilt for another target.
- AFN-019 hypothesis
Hide SSD misses before the router knows they exist
A falsifiable pipeline hypothesis for SSD-heavy Qwen4Exp inference: exact PLE lookahead, predictive expert loading, DFlash route forecasts, component-level streaming, and deadline-aware scheduling.
- AFN-016 verified checkpoint
A sparse mask is not sparse attention
Selecting 2,051 keys does not make attention sparse if the backend still allocates or traverses the full query-by-key matrix.
- AFN-017 verified checkpoint
Top-k chooses the set; time chooses the order
Ranking decides which sparse-attention groups survive; canonical logical order decides how the selected row is represented and reduced.
- AFN-018 verified checkpoint
A hole in cache history is not padding
Left padding may move the first real token; a missing position inside the visible run destroys sparse-group semantics and must fail closed.
- AFN-015 verified checkpoint
A phase handoff needs a decision delta
Finishing code is not the same as preserving reusable reasoning: every verified phase closes with either a new evidence-bound note or an explicit no-new-decision record.
- AFN-014 verified checkpoint
Do not call a contract vector an upstream capture
Pinned Transformers can author module outputs, but synthetic tokens, hashed PLE rows, and cache images need a different provenance label or the fixture overstates its authority.
- AFN-013 verified checkpoint
Correctness code can exist without becoming a product feature
Phase 5 links a resident graph coordinator and real Metal correctness kernels, yet normal Hebrus execution still rejects Qwen4Exp at physical-profile admission.
- AFN-012 verified checkpoint
An ubatch is not a sequence boundary
Dilated PLE convolution and token-history hashing must survive arbitrary chunking without leaking state between sequences or changing the current-EOS transition.
- AFN-011 verified checkpoint
A reference algorithm needs an expiry condition
Dense QSA is a useful correctness oracle through 2,051 visible keys; without a hard ceiling, temporary reference code silently becomes an impossible long-context implementation.
- AFN-010 verified checkpoint
One bank flip is enough: make the whole inference chunk transactional
A token chunk can touch recurrent state, caches, routing, residual streams, and logits; publishing any one of them early creates a state that never existed mathematically.
- AFN-009 verified checkpoint
The recovery packet: enough context to continue, not enough to drown
A layered handoff format that lets a new coding agent recover decisions, invariants, ownership, and the next gate without ingesting the project history.
- AFN-008 verified checkpoint
Close the text pipeline before asking the model
Phase 4 used pinned captures, independent regeneration, native tests, and 153 contract mutations to close tokenizer and chat semantics before a runtime graph existed.
- AFN-007 verified checkpoint
Unicode is part of the model contract
A tokenizer-class reconstruction dropped combining marks, while Jinja trimming followed Python semantics beyond common C whitespace helpers.
- AFN-006 verified checkpoint
Rendered chat is not a flat string: preserve provenance
A byte-identical control-token spelling can be trusted template syntax or untrusted client data; flattening before tokenization destroys that distinction.
- AFN-005 verified checkpoint
A logits matrix is not always the vocabulary
Qwen4Exp exposes 248,320 output rows but only 248,077 valid token IDs; collapsing those domains creates invalid sampling and ambiguous decoding.
- AFN-001 verified checkpoint
Porting Qwen3.8-Flash-Next to Hebrus: evidence before execution
Why the Qwen4Exp bring-up froze identity, math, artifact geometry, and failure semantics before the first Metal graph was allowed to exist.
- AFN-002 verified structural decision
Why Qwen4Exp kept ExpertMajor v2
A new 512-expert family needed stricter geometry, not a new container version—and a 640-wide row exposed the difference between structural proof and codec qualification.
- AFN-003 verified structural decision
320 million embedding rows without a 320 million-entry index
The fixed-page PLE store: affine lookup, independent checksums, transactional reads, and a codec decision intentionally left open.
- AFN-004 verified checkpoint
Admission before Metal: make every bad artifact fail cheaply
A CPU-only structural loader that proves metadata, tensor identity, physical ownership, and policy before any GPU symbol or graph allocation is reachable.
For agents: retrieval formats and archive policy
Start from the compact index, load one retrieval capsule, and open the full note only when its decision matches the task. Treat hypothesis, structural-only, and pinned-not-supported as hard boundaries.
Public architecture only. The archive excludes personal information, account data, credentials, private prompts, conversations, local paths, network addresses, and unpublished infrastructure.
Andrea-launched agents. Before closing a verified phase, follow the scoped operator contract: publish a new evidence-bound decision or record that no new decision delta exists. External contributors are not bound by this rule.
- Audience
- Autonomous coding agents and systems engineers
- Claims
- Evidence-bound; hypotheses stay labelled
- Canonical path
/agents/- Format
- HTML · Markdown · LLM text · JSON