Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
692 commits
Select commit Hold shift + click to select a range
a52f7d9
feat(hip): cmd/lem registers engine/hip + bring the ROCm/CUDA/CPU Mak…
Snider Jul 5, 2026
77ea118
build(hip): vendor the ROCm 7.2 runtime submodules for the static amd…
Snider Jul 5, 2026
3b66369
feat(eval/score/lek): port LEK phonetics scorer + arm the score-cascade
Snider Jul 5, 2026
5ba21a4
build(taskfile): test/cover/bench/qa targets + AGENTS test-writing gu…
Snider Jul 5, 2026
cbdab8e
feat(model/mtp): infer the speculative method type from the drafter m…
Snider Jul 5, 2026
304585a
feat(model/moe): infer the MoE router gating type from the model
Snider Jul 5, 2026
122a6c7
perf(engine/metal): gemma4 opts MoE experts into the fused gate+up pa…
Snider Jul 5, 2026
c9434bd
perf(engine/metal): pipelined GPU decode on by default — e2b 162→182 …
Snider Jul 5, 2026
bb78204
style: gofmt the 29 drifted files (import order)
Snider Jul 5, 2026
5152ab5
feat(cmd/lem): wire the -pipeline flag to the engine — it was parsed …
Snider Jul 5, 2026
3825bc8
fix(serving): streamed replies keep their spaces and drop the bare <e…
Snider Jul 5, 2026
1afce40
perf(engine/metal): non-PLE dense models ride the chained/pipelined d…
Snider Jul 5, 2026
24f4b9f
perf(engine/metal): qat models ride the chained/pipelined decode — e2…
Snider Jul 5, 2026
1d2e5c2
perf(engine/metal): TopK sampling selects on the host — sampled decod…
Snider Jul 5, 2026
89a382a
refactor(serving): one reasoning-marker grammar — parser owns it, ext…
Snider Jul 5, 2026
1f584de
feat(generate): expose the -trace / -kv-cache / -kv-storage engine se…
Snider Jul 5, 2026
62e15e4
feat(generate): -kv-storage selects the portable KV snapshot encoding…
Snider Jul 5, 2026
3b11ed2
fix(kv/metal): q8/float32 KV snapshots produce-able from a live -stat…
Snider Jul 5, 2026
5070e7c
fix(engine): SessionHandle.RestoreKV alias so generate -state wake re…
Snider Jul 5, 2026
daf3b84
feat(engine): chat-framing seam (FormatChatPrompt/FormatChatContinuat…
Snider Jul 6, 2026
cd86a64
test(serving/compat): lock the untested API-mux wire format + the app…
Snider Jul 6, 2026
1d2bd82
feat(engine/metal): wire the MTP speculative seam — generate -draft a…
Snider Jul 6, 2026
b8f2b0e
test(serving/compat): cover the ollama/anthropic/openai mux handlers …
Snider Jul 6, 2026
0ef282f
test(serving/compat): cover the ollama streaming paths (37.4% -> 42.5%)
Snider Jul 6, 2026
b276956
test(serving/compat): cover the anthropic + openai handler paths (42.…
Snider Jul 6, 2026
3526fae
feat(serving/anthropic): accept tools + render Gemma 4 declarations —…
Snider Jul 6, 2026
fce97a3
feat(serving/anthropic): parse gemma4 tool calls into tool_use blocks…
Snider Jul 6, 2026
2c51130
feat(serving/anthropic): stream tool_use blocks — the Claude Code age…
Snider Jul 6, 2026
58aabf9
feat(serving/anthropic): tool_result continuation — the full agentic …
Snider Jul 6, 2026
dc7fd11
feat(serving/openai): gemma4 tool-calling — non-streaming tool_calls …
Snider Jul 6, 2026
3476067
feat(serving/openai): stream tool_calls — Codex agentic streaming pat…
Snider Jul 6, 2026
0098ed2
fix(decode/parser): recursive tool-arg parsing — nested objects + arr…
Snider Jul 6, 2026
0eae7dd
build(deps): go-i18n v0.12.0 + reconcile go.mod (go work sync)
Snider Jul 6, 2026
58a715f
feat(serving/api): wire the lem-scorer into AIProvider — live scoring…
Snider Jul 6, 2026
94aacd4
feat(serving/pipeline): scorer-aside seam — lem-scorer rides a live t…
Snider Jul 6, 2026
78afbb7
feat(serving/api): POST /score/session — run the lem-scorer after the…
Snider Jul 6, 2026
8fd8636
refactor(serving/api): drop the neural embedding path — the API is te…
Snider Jul 6, 2026
b166487
feat(serving/api,engine/driver): Describe the two un-described route …
Snider Jul 6, 2026
7d53a3f
feat(cmd/lem,taskfile): `lem spec` + `task sdk` — generate typed SDKs…
Snider Jul 6, 2026
15e6b06
ci: deps bump-tracker (dAppCore/build/actions/deps)
Snider Jul 6, 2026
d7789fa
wip: dep bumps toward GOWORK=off + SDK generator config
Snider Jul 6, 2026
422fa42
ci(deps): scan dev (go-inference is dev-canonical)
Snider Jul 6, 2026
90e25e5
build: go-inference builds GOWORK=off (duckdb v2 + api v0.18.0)
Snider Jul 6, 2026
977d032
build: bump go-io v0.13.1 → v0.14.0 (duckdb v2 currency)
Snider Jul 6, 2026
343e58c
chore: drop the dappcore/* submodules (consume released modules)
Snider Jul 6, 2026
7067016
build(gui): consume go-container go/v0.11.0; re-add ./gui to workspace
Snider Jul 6, 2026
fc374ce
ci: portable ci.yml + matrix build.yml (one lem per target → zips → d…
Snider Jul 6, 2026
24395f2
feat(serving): render prior tool_use from history for stateless clien…
Snider Jul 6, 2026
ae34460
test(serving): cover admin/auth/compat HTTP handlers (#298)
Snider Jul 6, 2026
d12a76a
Merge branch 'coverage/serving-298' into dev
Snider Jul 6, 2026
4cf2889
test(eval/experiments): meet the house test standard (ax7 + examples …
Snider Jul 6, 2026
8e2b606
Merge test/t4 (test-standard: eval/experiments #310) into dev
Snider Jul 6, 2026
d695d11
test(serving/chat): AX-7 one-test-per-symbol triplets + Example* cove…
Snider Jul 6, 2026
0616a88
Merge test/t8 (test-standard: serving/chat #325) into dev
Snider Jul 6, 2026
41acf09
test(model): meet the house test standard (ax7 + examples + de-faked)
Snider Jul 6, 2026
a7c6248
test(engine/registry): merge registry_cover_test.go into registry_tes…
Snider Jul 6, 2026
ba33d35
test(engine/registry): split card_test.go into per-symbol SetCard/Get…
Snider Jul 6, 2026
a520408
test(engine/registry): add store_test.go — MemStore Good/Bad/Ugly tri…
Snider Jul 6, 2026
dcc1502
test(engine/registry): add entry_test.go — direct Filter.matches cove…
Snider Jul 6, 2026
6a87496
test(engine/registry): add {file}_example_test.go for all four source…
Snider Jul 6, 2026
1e0cb84
Merge test/t3 (test-standard: model #309) into dev
Snider Jul 6, 2026
7d5c41e
Merge test/t7 (test-standard: engine/registry #324) into dev
Snider Jul 6, 2026
c59f238
test(model/state/filestore): AX-7 Good/Bad/Ugly + Example coverage fo…
Snider Jul 6, 2026
7136763
test(model/state/filestore): AX-7 Good/Bad/Ugly + Example coverage fo…
Snider Jul 6, 2026
2528ca9
test(model/state/filestore): AX-7 Good/Bad/Ugly + Example coverage fo…
Snider Jul 6, 2026
da257fc
Merge test/t6 (test-standard: model/state/filestore #323) into dev
Snider Jul 6, 2026
766e069
test(train/lora): AX-7 triplets + Example tests for errors/eviction/l…
Snider Jul 6, 2026
d99f660
test(decode/tokenizer): bring to AX-7 test standard
Snider Jul 6, 2026
b4d4b7c
test(train/lora): AX-7 triplets + Example for inspect.go (AdapterInfo…
Snider Jul 6, 2026
60940f6
Merge test/t5 (test-standard: decode/tokenizer #322) into dev
Snider Jul 6, 2026
f29d9b7
test(train/lora): per-symbol AX-7 triplets + Example tests for Registry
Snider Jul 6, 2026
3e04544
test(train/lora): per-symbol AX-7 triplets + Example tests for Pool
Snider Jul 6, 2026
c89fb94
test(train/lora): flesh out the two test-stubs flags into real assert…
Snider Jul 6, 2026
42e5d9a
Merge test/t9 (test-standard: train/lora #311) into dev
Snider Jul 6, 2026
8c6ba48
test(serving/openai): meet the house test standard (ax7 + examples + …
Snider Jul 6, 2026
a5d6a7c
test(serving/provider/anthropic): AX-7 Good/Bad/Ugly + Example covera…
Snider Jul 6, 2026
3ae7e6b
test(serving/provider/anthropic): AX-7 Good/Bad/Ugly + Example covera…
Snider Jul 6, 2026
4d66919
test(serving/provider/anthropic): AX-7 Good/Bad/Ugly + Example covera…
Snider Jul 6, 2026
5795693
test(serving/provider/anthropic): AX-7 Good/Bad/Ugly + Example covera…
Snider Jul 6, 2026
9597ac7
Merge test/t2 (test-standard: serving/provider/openai #308) into dev
Snider Jul 6, 2026
e4e0e40
Merge test/t10 (test-standard: serving/provider/anthropic #321) into dev
Snider Jul 6, 2026
44c43dc
test(jsonenc): rewrite jsonenc_test.go to the AX-7 Good/Bad/Ugly stan…
Snider Jul 6, 2026
7c89de8
test(jsonenc): rewrite jsondec_test.go to the AX-7 Good/Bad/Ugly stan…
Snider Jul 6, 2026
8eadbec
test(jsonenc): add Example tests for all 23 exported symbols
Snider Jul 6, 2026
67697bd
Merge test/t12 (test-standard: jsonenc #320) into dev
Snider Jul 6, 2026
843e1b6
test(model/merge): close ax7/example/file-presence gaps on merge_copy.go
Snider Jul 6, 2026
9176495
Merge test/t17 (test-standard: model/merge #317) into dev
Snider Jul 6, 2026
4cad2d4
test(train): prefix train.go/train_checkpoint.go triplets to the hous…
Snider Jul 6, 2026
63f3ae0
test(train): split model_entry_test.go into file-matched sft_model/ss…
Snider Jul 6, 2026
b7c7ab6
test(train): sft.go/score_cascade.go triplets, Metrics coverage, and …
Snider Jul 6, 2026
4d1ad95
test(train): prefix ssd_eval.go triplets to TestSsdEval_<Symbol>_{Goo…
Snider Jul 6, 2026
16dfc48
test(train): ssd.go triplets for the 5 untested constructors + RunSSD…
Snider Jul 6, 2026
1934179
test(train): command.go had zero tests — add RunSSDCommand/RunSFTComm…
Snider Jul 6, 2026
f7d528f
test(model/state/session): meet the house test standard (ax7 + exampl…
Snider Jul 6, 2026
1962021
test(model/safetensors): real Good/Bad/Ugly coverage for ShardCache +…
Snider Jul 6, 2026
a2c7769
test(model/safetensors): Good/Bad/Ugly naming + direct Load coverage …
Snider Jul 6, 2026
c5c9004
test(model/safetensors): Good/Bad/Ugly triplets for LoadDir/LoadDirMm…
Snider Jul 6, 2026
1ac5246
test(engine/driver): AX-7 triplets + Example* for provider.go
Snider Jul 6, 2026
3ffc867
test(model/safetensors): Good/Bad/Ugly triplets for LoadMmap/Mapping.…
Snider Jul 6, 2026
3720c85
test(engine/driver): AX-7 triplets + Example* for inference.go
Snider Jul 6, 2026
0f60274
test(engine/driver): AX-7 triplets + Example* for admin.go
Snider Jul 6, 2026
87c6291
test(engine/driver): AX-7 triplets + Example* for driver.go
Snider Jul 6, 2026
2cb0a96
Merge test/t13 (test-standard: train #319) into dev
Snider Jul 6, 2026
fb9ddde
Merge test/t1 (test-standard: model/state/session #307) into dev
Snider Jul 6, 2026
11dc4d4
Merge test/t14 (test-standard: engine/driver #318) into dev
Snider Jul 6, 2026
96ec72f
Merge test/t11 (test-standard: model/safetensors #312) into dev
Snider Jul 6, 2026
0b94cab
test(decode/parser): grammar.go — house naming + missing Ugly/Example
Snider Jul 6, 2026
e7cf99e
test(decode/parser): selector.go — add missing correctness + example …
Snider Jul 6, 2026
6dd682b
test(decode/parser): types.go — add missing test + example siblings
Snider Jul 6, 2026
5b3a7ef
test(decode/parser): registry.go — fill AX-7 + Example gaps per symbol
Snider Jul 6, 2026
218a7bb
test(serving): serve_auth.go AX-7 triplets + Example coverage
Snider Jul 6, 2026
6e5dbe9
test(decode/parser): thinking.go — fill AX-7 + Example gaps per symbol
Snider Jul 6, 2026
4af876a
test(serving): add serve_test.go + serve_example_test.go
Snider Jul 6, 2026
9a2ebe4
test(decode/parser): gemma_tools.go — rename/split onto the AX-7 trip…
Snider Jul 6, 2026
c63774a
test(serving): serve_draft.go AX-7 triplets + Example coverage
Snider Jul 6, 2026
48d9c57
test(serving): add serve_resolver_example_test.go
Snider Jul 6, 2026
21297c0
test(serving): de-stub the six ≤2-line test bodies test-stubs flagged
Snider Jul 6, 2026
8cb165c
Merge test/t19 (test-standard: decode/parser #315) into dev
Snider Jul 6, 2026
ddf5a50
Merge test/t18 (test-standard: serving #316) into dev
Snider Jul 6, 2026
18a81b0
test(model/state): rename ExportArtifact triplet to the Artifact_ prefix
Snider Jul 6, 2026
5edc538
test(model/state): store.go to the AX-7 + Example standard
Snider Jul 6, 2026
6d00329
test(model/state): memory.go + agent_memory.go to the AX-7 + Example …
Snider Jul 6, 2026
72e5e6e
test(model/state): add identity.go test file (file-presence)
Snider Jul 6, 2026
11b9f90
test(model/state): project_seed.go to the AX-7 + Example standard
Snider Jul 6, 2026
8061172
Merge test/t16 (test-standard: model/state #314) into dev
Snider Jul 6, 2026
8064756
test(engine): model.go + trainer.go to the CoreGo test standard
Snider Jul 6, 2026
0588d68
test(engine): session.go to the CoreGo test standard
Snider Jul 6, 2026
d6100a3
test(engine): vision.go to the CoreGo test standard
Snider Jul 6, 2026
f8481de
Merge test/t15 (test-standard: engine #313) into dev
Snider Jul 6, 2026
0a6545d
test(engine/metal): add diffusion_attention_test.go + example (attent…
Snider Jul 6, 2026
85c48b1
test(engine/metal): add audio_attention_test.go + example (attention/…
Snider Jul 6, 2026
502b02a
test(engine/metal): AX-7 triplets + example for mtp_attn.go SDPACausa…
Snider Jul 6, 2026
ee4f9db
test(engine/metal): AX-7 triplets + example for rope.go RoPE/RoPEInto…
Snider Jul 6, 2026
075195c
test(engine/metal): AX-7 triplets + example for rope_freqs.go RoPEFre…
Snider Jul 6, 2026
db6d43b
test(engine/metal): AX-7 triplets + example for qknorm_rope.go QKNorm…
Snider Jul 6, 2026
ac939ff
test(engine/metal): AX-7 triplets + example for sdpa_paged.go SDPAPag…
Snider Jul 6, 2026
2d749c1
test(engine/metal): AX-7 triplets + example for sdpa.go SDPA/SDPA2Pas…
Snider Jul 6, 2026
f67cb4d
test(engine/metal): AX-7 triplets + example for attention.go Attentio…
Snider Jul 6, 2026
771e8ea
test(engine/metal): add sdpa_multiq_test.go (attention/sdpa/rope clus…
Snider Jul 6, 2026
0202456
test(engine/metal): add sdpa_multiq_ring_test.go (attention/sdpa/rope…
Snider Jul 6, 2026
231dd2f
Merge test/t20 (test-standard: engine/metal attention/sdpa/rope #326)…
Snider Jul 6, 2026
93143fe
chore(go): apply Go 1.26 modernizations via modernize -fix
Snider Jul 6, 2026
12dfe70
fix(engine/metal): MTP draft inputs — proportional-rope pairing + bou…
Snider Jul 6, 2026
7f88e21
fix(engine): gemma4 chat turns — <|turn> dialect + turn-close stop (w…
Snider Jul 6, 2026
b2b0571
feat(engine): generation_config stops + gemma4 <|think|> prelude + sa…
Snider Jul 6, 2026
39b90e7
perf(engine/metal): fused single-command-buffer drafter step — MTP pa…
Snider Jul 6, 2026
74d408c
fix(engine): nil-receiver guards on TextModel accessors (#328)
Snider Jul 6, 2026
434982b
perf(engine/metal): batched K-row verify head — one command buffer fo…
Snider Jul 6, 2026
526b3a3
perf(engine/metal): K-row lm_head argmax kernel — one weight pass for…
Snider Jul 6, 2026
a58f113
perf(engine/metal): K-row verify head hits 1.98ms — function-constant…
Snider Jul 6, 2026
b06f09d
perf(engine/metal): quant-PLE batched verify forward over the ICB rep…
Snider Jul 7, 2026
1fbd790
feat(engine/metal): projectRows batched-projection capability + MLX q…
Snider Jul 7, 2026
f29e78e
test(engine/metal): qmm_t verification closes against the fp32 oracle…
Snider Jul 7, 2026
b931398
perf(engine/metal): quant prompt prefill through the qmm fold — 8.6x …
Snider Jul 7, 2026
1ef5ea5
perf(engine/metal): quant GPU PLE slab — prompt prefill 1,110 -> 717m…
Snider Jul 7, 2026
1a7add8
perf(engine/metal): lift the multiQ SDPA knee at prompt scale — prefi…
Snider Jul 7, 2026
7b678d2
fix(serving): DefaultMaxTokens 2048 -> 8192; correct the draft-block …
Snider Jul 7, 2026
9dc826c
feat(engine/metal): width-generic GPU embed gather — 6-bit gains the …
Snider Jul 7, 2026
e79301a
feat(engine/metal): width-generic quant head gates — 6-bit decode 114…
Snider Jul 7, 2026
1986904
docs(engine/metal): the quant no-copy "NaN mystery" was offset alignm…
Snider Jul 7, 2026
fc3e0e2
fix(engine/metal): bf16 head weight view demands the alignment its ke…
Snider Jul 7, 2026
8bbf098
perf(engine/metal): MoE decode Stage A — drop the per-layer waits, 26…
Snider Jul 7, 2026
23ddb1d
fix(engine/metal): only session states own the MoE scratch (#338)
Snider Jul 7, 2026
142a1c9
perf(engine/metal): fully-encoded MoE block — zero command-buffer bre…
Snider Jul 7, 2026
66e44c3
feat(engine/metal): megakernel local MLP in the encoded MoE lane, arr…
Snider Jul 7, 2026
829f1fe
perf(engine/metal): all-routes expert gathers — 26B decode 36.9 -> 50…
Snider Jul 7, 2026
823443f
fix(engine/metal): paged sliding window inert when it covers the whol…
Snider Jul 7, 2026
4ceea73
fix(engine/metal): MoE expert gates widened bits==4 -> affineBitsSupp…
Snider Jul 7, 2026
6cecfeb
feat(engine/metal): width-specialised FFN megakernel (4/8-bit) — 8-bi…
Snider Jul 7, 2026
ee8c3fa
perf(engine/metal): GPU family profiler + K-specialised router topk —…
Snider Jul 7, 2026
0e67c64
perf(engine/metal): router topk simd-reduction merge — 26B 65.0 -> 82…
Snider Jul 7, 2026
76cd81e
feat(engine/metal): chained live decode for MoE — one cb per token (#…
Snider Jul 7, 2026
5796fca
perf(engine/metal): fused MoE expert combine — 26B 85.5 -> 93.6 tok/s…
Snider Jul 7, 2026
affb332
perf(engine/metal): fused MoE norm/combine tail — 26B 93.6 -> 97.0 to…
Snider Jul 7, 2026
c25bcd3
test(engine/metal): GPU-span vs wall readout in the 26B host profile …
Snider Jul 7, 2026
76785c8
perf(engine/metal): concurrent-pass MoE encode — 26B 97.0 -> 110.0 to…
Snider Jul 7, 2026
ba6d3d1
perf(engine/metal): submit-ahead live decode — 26B 110.0 -> 126.3 tok…
Snider Jul 7, 2026
28746fd
feat(engine/metal): row dimension on the MoE topk/wsum/combine kernel…
Snider Jul 7, 2026
56b9ac3
perf(engine/metal): batched MoE prefill — 26B 3.5k prompt 49.4s -> 2.…
Snider Jul 7, 2026
f2a656a
fix(decode/generate): CLI output through the shared thinking extracto…
Snider Jul 7, 2026
c2eea08
test(engine/metal): LEM_MOE_PROFILE_CTX — deep-context family profile…
Snider Jul 7, 2026
26fd889
perf(engine/metal): split-window paged SDPA — 26B deep-context decode…
Snider Jul 7, 2026
02b58c8
perf(engine/metal): vec4 SDPA reads + ring submit-ahead — 26B deep de…
Snider Jul 7, 2026
b5d215e
perf(engine/metal): concurrent attention half — 26B 124.8 -> 137.4 sh…
Snider Jul 7, 2026
d7739e3
fix(engine/metal): interface-box once in the attention half — the red…
Snider Jul 7, 2026
a440b21
fix(engine/metal): empty paged-KV pages are a state, not an error (#3…
Snider Jul 7, 2026
3900cc2
fix(jsonenc): delete dead defensive code + honest CountJSONArrayEleme…
Snider Jul 7, 2026
4df592b
fix(engine): declare the gemma4 thought-channel suppressor as a model…
Snider Jul 7, 2026
a0f6928
style: gofmt alignment debt across engine/metal + model tests
Snider Jul 7, 2026
43ccee6
test(engine/metal): clear the point-defect analysers (#306)
Snider Jul 7, 2026
fc8ce73
test(engine/metal): rmsnorm.go to full house standard (#306 exemplar)
Snider Jul 7, 2026
70df410
test(engine/metal): softmax + gemv + embed_gather + rmsnorm_residual …
Snider Jul 7, 2026
9bebd52
perf(engine/metal): fc-specialised lean MoE gather — retire the shape…
Snider Jul 7, 2026
cc8ec8d
perf(engine/metal): attn sub-seams for the family GPU profiler (#340)
Snider Jul 7, 2026
6154b96
perf(engine/metal): single-dispatch fused MoE router — capability kep…
Snider Jul 7, 2026
a74ac9d
perf(engine/metal): sdpa single-cell P1-final — skip pass 2 at short …
Snider Jul 7, 2026
9a864ac
fix(engine/metal): clamp the FFN megakernel to its receipted shape fa…
Snider Jul 7, 2026
3626b64
perf(engine/metal): hop-tax microbench — the #341 campaign instrument
Snider Jul 7, 2026
5d1be81
perf(engine/metal): carry one concurrent encoder across the per-layer…
Snider Jul 7, 2026
852a3bd
perf(engine/metal): gelu-fused down-projection kernels (#341 phase 1,…
Snider Jul 7, 2026
bc2488d
perf(engine/metal): gelu-fold wiring — token-identical, routed OFF by…
Snider Jul 7, 2026
452ed73
perf(engine/metal): ICB go/no-go instrument — phase 3 CLOSED by rule …
Snider Jul 7, 2026
e15ba1e
perf(engine/metal): submit-ahead generalised to a depth queue — depth…
Snider Jul 7, 2026
6f4c6a4
perf(metal): bf16 sessions record the arch ICB — encode-bypass for th…
Snider Jul 7, 2026
7afee1b
perf(metal): bf16 GPU next-inputs seam — chained/pipelined decode for…
Snider Jul 7, 2026
582409b
fix(metal): attnFold slabs did not grow with the wide tail-absorbed p…
Snider Jul 7, 2026
da0b67c
perf(metal): recorded ICB fans global-layer SDPA over the 2-pass pair…
Snider Jul 7, 2026
0007b21
perf(generate): warm the kernels on a bounded prompt prefix, not the …
Snider Jul 8, 2026
6574440
perf(metal): deep-prompt global-layer SDPA rides a steel GEMM composi…
Snider Jul 8, 2026
d340206
feat(serve): the defaulted conversation store is ephemeral — wiped ea…
Snider Jul 8, 2026
84a54cd
feat(metal): wide-chunk prefill experiment (LTHN_PREFILL_WINDOWS) + d…
Snider Jul 8, 2026
b67e9cf
test(gemma4): #348 diagnostics — 31B-geometry ICB case, arch/layer du…
Snider Jul 8, 2026
3fef1cb
test(metal): host float reference anchors the arch quant forward (#34…
Snider Jul 8, 2026
5f4e225
test(metal): #348 ladder rungs A-D + loader/share-map dumps — every s…
Snider Jul 8, 2026
841d47b
fix(metal): fused rms-residual silently dropped dims past 4096 — the …
Snider Jul 8, 2026
9b92428
fix(metal): looped fused rms-residual — the wide-dModel tail-drop fix…
Snider Jul 8, 2026
ad85f8a
fix(metal): rows-rms threadgroup over 1024 silently dropped — 31B pre…
Snider Jul 8, 2026
7f54d8d
perf(metal): grouped-GEMM MoE prefill — 26B 32K prefill 28.2s -> 15.7…
Snider Jul 8, 2026
4cfe79b
feat(engine): budget-triggered context fold — retained conversations …
Snider Jul 8, 2026
d10ee1d
fix(metal): close the latent rms-threadgroup class + legalise the ICB…
Snider Jul 8, 2026
b2ba6b7
fix(metal): odd-offset tensor slices upload as copies — no-copy wrap …
Snider Jul 8, 2026
f0eb67b
perf(metal): assistant full-vocab logits head on the GPU — 12B draft …
Snider Jul 8, 2026
89ae0b6
perf(metal): MTP verify at qmv occupancy — multi-row qmv via the lean…
Snider Jul 8, 2026
8651b6a
feat(metal): 4-bit MTP assistants load — affine-quantised drafters de…
Snider Jul 8, 2026
bdeba91
perf(metal): register-tiled M-row qmv (lthn_qmv_rows) — weight stream…
Snider Jul 8, 2026
509f4b9
feat(model,metal): gemma4_unified encoder-free vision embedder — payl…
Snider Jul 8, 2026
e42fc57
feat(metal): unified vision end-to-end — kernel-grouped patchify, eng…
Snider Jul 8, 2026
46bfade
feat(metal): bidirectional image-span prefill — unified vision serves…
Snider Jul 8, 2026
4b70b75
feat(engine,metal): gemma4_unified audio — raw-waveform tokens end-to…
Snider Jul 8, 2026
ab8a2d3
feat(serving): OpenAI input_audio content part — audio turns over /v1…
Snider Jul 8, 2026
19c4cbf
feat(metal): WAV ingest accepts any rate + channel count — Kaiser-sin…
Snider Jul 8, 2026
1a838dc
feat(engine,metal): gemma4_unified VIDEO lane — timestamped frame blo…
Snider Jul 8, 2026
78b42db
feat(metal): MTP rate-gated re-engagement — low-accept bail becomes a…
Snider Jul 8, 2026
e212443
feat(metal): sampled lane joins MTP re-engagement; policy extracted t…
Snider Jul 8, 2026
24c6115
perf(metal): pair/warm prompt prefill rides the batched lane — 16K pa…
Snider Jul 8, 2026
9d1fd7d
perf(metal): MoE verify batches at small K — 26B verify 35.7ms -> 15.…
Snider Jul 8, 2026
959b7fd
perf(metal): drafter KV export reads winner caches only — 12B@16K pai…
Snider Jul 8, 2026
fe76c56
perf(metal): GQA-shared paged SDPA pass 1 — half the K/V traffic on d…
Snider Jul 8, 2026
07e7f04
perf(metal): #356 anatomy bench + 2-row batched-softmax unroll — 26B …
Snider Jul 8, 2026
b91205b
perf(metal): geometric KV page growth — deep-scan dispatch count goes…
Snider Jul 8, 2026
ce61085
perf(metal): parallelise the gqa2 SDPA merge across all 256 threads —…
Snider Jul 8, 2026
763615d
perf(metal): dim-parallel paged-SDPA pass 2 — 26B @16K 110.7 -> 116.2…
Snider Jul 8, 2026
cae1dbb
feat(metal): MTP deep-bootstrap — the pair measures plain economics a…
Snider Jul 8, 2026
d3ee969
feat(metal): q8 paged-KV core — int8 pages + f32 group scales, host q…
Snider Jul 8, 2026
85e3035
feat(metal): q8 paged KV end-to-end — landing hop, per-layer opt-in, …
Snider Jul 8, 2026
5237c40
docs(backends): document the engine/metal runtime levers
Snider Jul 9, 2026
cc1289c
style: gofmt drift across engine + engine/metal (9 files, formatting …
Snider Jul 9, 2026
72fdb1d
feat(metal): MTP confidence-capture instrument — LTHN_MTP_CONF + cali…
Snider Jul 9, 2026
38e2f4f
feat(metal): MTP dynamic draft cap — depth-gated additive raises off …
Snider Jul 9, 2026
59c3104
docs: rewrite CLAUDE.md to the engine era + add docs/handover.md for …
Snider Jul 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 0 additions & 12 deletions .forgejo/workflows/security-scan.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .forgejo/workflows/test.yml

This file was deleted.

122 changes: 122 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Build the sovereign `lem` binary for every target and ship the zips.
# One binary named `lem` per platform (the GPU backend — metal/rocm/cuda — loads
# its kernel sidecar at runtime); targets are separated by build folder, not by
# binary name. Zips flow to a rolling `dev` prerelease.
name: Build

on:
push:
branches: [dev, main]
workflow_dispatch:

permissions:
contents: read

Check notice

Code scanning / SonarCloud

Read permissions should be defined at the job level Low

Move this read permission from workflow level to job level. See more on SonarQube Cloud

jobs:
build:
name: lem · ${{ matrix.goos }}/${{ matrix.goarch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: macos-latest, goos: darwin, goarch: arm64, metal: true }
- { os: ubuntu-latest, goos: linux, goarch: amd64 }
- { os: ubuntu-24.04-arm, goos: linux, goarch: arm64 }
- { os: windows-latest, goos: windows, goarch: amd64 }
env:
CGO_ENABLED: "1"
GOWORK: "off"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive # metal needs external/mlx

- uses: actions/setup-go@v5
with:
go-version: "1.26"

- name: Install Task
run: go install github.com/go-task/task/v3/cmd/task@latest

- name: Build lem
shell: bash
env:
METAL: ${{ matrix.metal }}
run: |
set -e
if [ "$METAL" = "true" ]; then
task metallib && task build:embed # self-contained metal lem
else
task build:native # plain lem (GPU sidecar loads at runtime)
fi

- name: Assemble build folder (build/dist/<target>/lem)
shell: bash
env:
TARGET: ${{ matrix.goos }}-${{ matrix.goarch }}
run: |
set -e
mkdir -p "build/dist/$TARGET"
cp bin/lem* "build/dist/$TARGET/"

- uses: actions/upload-artifact@v4
with:
name: lem-${{ matrix.goos }}-${{ matrix.goarch }}
path: build/dist/${{ matrix.goos }}-${{ matrix.goarch }}/

release:
name: Zip + rolling dev prerelease
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: dist # one subfolder per target (lem-<goos>-<goarch>/lem)

- name: Zip each target
run: |
set -e
cd dist
for d in */; do (cd "$d" && zip -r "../${d%/}.zip" .); done
ls -la *.zip

- name: Publish rolling dev prerelease
uses: softprops/action-gh-release@v2

Check failure

Code scanning / SonarCloud

External GitHub Actions and workflows should be pinned to a commit hash High

Use full commit SHA hash for this dependency. See more on SonarQube Cloud
with:
tag_name: dev
name: dev (rolling)
prerelease: true
files: dist/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

sdk:
name: SDK clients (OpenAPI)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.26"
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: actions/setup-java@v4 # openapi-generator runs on the JVM
with:
distribution: temurin
java-version: "21"
- name: Install generators
run: |
npm install -g @openapitools/openapi-generator-cli@7.22.0
go install github.com/go-task/task/v3/cmd/task@latest
- name: Generate SDKs (lem spec -> OpenAPI 3.1 -> typed clients)
run: task sdk
- uses: actions/upload-artifact@v4
with:
name: lem-sdks
path: build/sdk/
if-no-files-found: warn
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Portable CI for go-inference — the default-tag (no-GPU) test + coverage lane.
# go-inference is a Metal/CGO project; the FULL lem build (engine/metal, the
# metallibs) needs macOS 26 / Metal 4 and lives in build.yml on a self-hosted
# runner. This lane runs the portable suite (Taskfile `test`/`cover`) on any OS.
name: CI

on:
push:
branches: [dev, main]
pull_request:
branches: [dev, main]

permissions:
contents: read

jobs:
test:
name: Portable test + coverage
runs-on: ubuntu-latest
env:
GOWORK: "off" # resolve deps from go/go.mod tags, not the workspace
CGO_ENABLED: "1" # go/ links duckdb (go-duckdb/v2 ships prebuilt linux libs)
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.26"

- name: Portable tests + coverage (default tags — engine/metal excluded)
working-directory: go
run: go test -count=1 -covermode=atomic -coverprofile=coverage.out ./...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: go/coverage.out
flags: portable
fail_ci_if_error: false
46 changes: 46 additions & 0 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Dependency-bump issue tracker — Core ecosystem Go repos.
# Copy to .github/workflows/deps.yml in each repo.
#
# Opens/updates a single 'deps'-labelled issue listing dappco.re/* dependencies
# that have a newer published release (and closes it when all are current). Open
# 'deps' issues across every repo then ARE the ecosystem's version-bump work
# queue — filter by the label to see exactly what's outstanding.
#
# Triggers:
# - schedule → daily safety-net poll
# - workflow_dispatch → run on demand (set dry-run to preview the issue body)
# - repository_dispatch → an upstream release can ping {"event_type":"dep-bump"}
name: Deps

on:
schedule:
- cron: "0 7 * * *"
workflow_dispatch:
inputs:
dry-run:
description: "Preview the issue body without touching issues"
type: boolean
default: false
repository_dispatch:
types: [dep-bump]

permissions:
contents: read
issues: write

jobs:
deps:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
# go-inference is dev-canonical (main is the stale release branch), so the
# tracker scans dev's go.mod even when dispatched/scheduled from main.
- uses: actions/checkout@v4
with:
ref: dev

- uses: dAppCore/build/actions/deps@dev
with:
go-mod-dir: go
dry-run: ${{ github.event.inputs.dry-run || 'false' }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@
.core/
.idea/
.vscode/
# build / test artefacts
*.test
*.out
.DS_Store
*.bak
go.work.sum
/build/
*.air
cmd/lem/*.metallib.gz

# compiled lem binary (build artefact — built via Taskfile/go build)
go/lem
19 changes: 15 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
[submodule "external/go"]
path = external/go
url = https://github.com/dappcore/go.git
branch = dev
[submodule "external/mlx"]
path = external/mlx
url = https://github.com/ml-explore/mlx.git
[submodule "external/rocm-hip"]
path = external/rocm-hip
url = https://github.com/ROCm/HIP.git
branch = release/rocm-rel-7.2
[submodule "external/rocm-clr"]
path = external/rocm-clr
url = https://github.com/ROCm/clr.git
branch = release/rocm-rel-7.2
[submodule "external/rocr-runtime"]
path = external/rocr-runtime
url = https://github.com/ROCm/ROCR-Runtime.git
branch = release/rocm-rel-7.2
37 changes: 0 additions & 37 deletions .woodpecker.yml

This file was deleted.

68 changes: 62 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,73 @@ assert behavior directly against the symbol named by the test. A triplet named
`TestOptions_WithMaxTokens_Bad` must invoke `WithMaxTokens` in its own body,
not route through a dispatcher helper.

## Writing Tests, Examples & Benchmarks

Every source file ships three siblings — extend them, never create monolithic
compliance files, versioned test files (`_v2`), or `ax7*` files:

| Sibling of `foo.go` | Holds | Verified by |
|---------------------|-------|-------------|
| `foo_test.go` | one `Test<Symbol>_<Case>` per exported symbol per variant | `task test` |
| `foo_example_test.go` | one `Example<Symbol>` per symbol, with an `// Output:` block | `task test` (runs + diffs the output) |
| `foo_bench_test.go` | one `Benchmark<Symbol>` per hot symbol | `task bench` |

**Tests — name the symbol, exercise it directly.** A test asserts against the
symbol its name claims: `TestOptions_WithMaxTokens_Bad` must call
`WithMaxTokens` in its own body, not route through a dispatcher/table helper.
A test that never names its symbol is fake coverage the audit flags. Write the
AX-7 triplet for each symbol — `_Good` (valid input, happy path), `_Bad`
(invalid input is rejected), `_Ugly` (malformed / boundary / empty). Production
functions that can fail return `core.Result`: the `_Good` test asserts `r.OK`
then reads `r.Value`; the `_Bad`/`_Ugly` tests assert `!r.OK`.

**Examples are compiled documentation.** `func ExampleWithMaxTokens()` ends with
a `// Output:` block so `go test` runs and diffs it — a stale example fails the
build. Print with `Println` from `dappco.re/go`, never `fmt.Println`.

**Benchmarks measure the load path.** Shape:

```go
var sinkResult core.Result // package sink — stops the compiler eliding the call

func BenchmarkDiscover(b *testing.B) {
dir := writeFixtureModel(b) // setup OUTSIDE the timed loop
b.ReportAllocs()
b.ResetTimer() // discount the setup
for i := 0; i < b.N; i++ {
sinkResult = Discover(dir) // assign to the sink so it can't be optimised away
}
}
```

Read **B/op as hard as allocs/op** — the biggest wins (whole-slice clones,
full-file reads) leave allocs/op flat while B/op screams. allocs/op is only
trustworthy at steady state, so `task bench` runs `-benchtime=20x`; a cold
3-iteration number is inflated by setup.

## Working Locally

Use the same commands as the compliance brief before handing work back:
Run the Taskfile gates before handing work back (portable lanes need no GPU;
`*:metal` lanes need `task metallib` first):

```sh
task qa # gofmt check + go vet + portable tests — the pre-handback gate
task test # portable suite (default tags, runs anywhere)
task test:metal # engine/metal suite (-tags metal_runtime; needs task metallib)
task cover # coverage.out + total — must clear the 95% codecov target
task bench # every benchmark with -benchmem (allocation regressions)
```

`codecov.yml` enforces **95%** on both the project and each patch, measured on
the portable `task cover` profile (the surface a Linux CI compiles; engine/metal
is Darwin-only and covered by `task test:metal`).

For core/go idiom compliance specifically, the audit script is the work
provider — a change is not complete until it reports `verdict: COMPLIANT` with
every counter at zero:

```sh
GOWORK=off go mod tidy
GOWORK=off go vet ./...
GOWORK=off go test -count=1 ./...
gofmt -l .
bash /Users/snider/Code/core/go/tests/cli/v090-upgrade/audit.sh .
```

The audit script is the work provider for compliance tasks. A change is not
complete until it reports `verdict: COMPLIANT` with every counter at zero.
Loading