adm
|
f57060caa7
|
[LD][ABI][Docs] Inkling base decode graph emitter (675 ops, arena-validated) + full forward blueprint
- ld::inkling_graph: emit_decode_base() generates the complete base decode
forward from the IR over the unrolled physical schedule: embed ->
[per-layer: norm -> QKV -> flash -> O-proj -> residual-add -> MLP norm ->
router -> experts w13/w2 -> reduce -> residual-add] -> final norm ->
unembed. Live-verified on Inkling: 675 ops, 236 arena decls, validated by
abi::arena (no overlap / checked bounds / no use-before-write). This is
the structurally-complete base; Inkling parity refinements (learned
AttnRes block-mix, loop controllers, ShortConv4, relpos, SWA window,
paged KV) layer on top next.
- abi::vplan: add the Inkling stage opcodes AttnResMix, ShortConv4, LoopCtrl,
L2Clip, KvStore, RelPosBias, MoeRouterTopk, VecAdd (30 total, roundtrip).
- ld::inkling_ir: LlmComp derives Copy (used by value in the emitter).
- docs/inkling-forward-design.md: full per-layer sequence extracted from
forward_batch_chunk (k1 AttnRes block-mix + controllers, k2 projections +
shortconv + relpos + KV store, k3 flash, O-proj block-boundary rule, k4
sigmoid router + SiTU experts), real scratch buffer set, deep-residual
block mechanism (block_size=6 snapshots + learned queries).
Verified live: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
5 ignored live tests pass (base graph 675 ops); lean proofs (4 files, 42
theorems) green.
|
2026-12-01 04:39:08 +01:00 |
|
adm
|
465315ae94
|
[LD] Inkling ModelImporter foundation: typed config + total tensor classification + validated IR assembly
- ld::inkling: parse_config(config.json) -> InklingConfig (TextConfig,
LoopConfig, MtpConfig), checked extraction + consistency guards
(top_k <= n_experts, n_head % n_kv == 0, core_start < core_end).
full_attention_layers() = complement of local_layer_ids ({5,11,17,23}).
- ld::inkling_ir: classify(name) -> TensorRole, the total tensor-name ->
typed-role mapping (trunk, per-layer attn projections/sconv/controllers/
norms, NVFP4 router+experts, attention-residual/cross-pass queries, vision).
Unknown names -> None (explicit rejection). Verified TOTAL on the live
archive: 1244/1244 classified, 24 layers.
- ld::inkling_ir: assemble()/assemble_archive() -> InklingIr (trunk + 24
LayerIr + vision), structural validation vs config (layer count, embed
shape = vocab x hidden, required per-layer components, expert first dim =
n_experts). Attention-norm validation is type-aware: SWA layers use
attn_norm, full-attention layers use q/k/v_input_norm (discovered + fixed
via the live test, verified on the inventory).
- Opt-in #[ignore] live tests against /mnt/models/Inkling/safetensors
(config, classification completeness, IR assembly) — all pass; default
suite stays host-independent.
Verified live: RUSTFLAGS="-D warnings" cargo test --workspace = 87/87 PASS;
3 ignored live tests pass; lean proofs (4 files, 42 theorems) green.
|
2026-12-01 04:27:56 +01:00 |
|