AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Flint P2: serving parity, state reuse and incumbent crossover benchmark
Closed · #804 · open 2026-10-29 20:51 UTC · closed 2026-11-07 00:08 UTC (reason not_planned)
Imported from GitHub aien-dev/aien-sovereign-core-mv#804, by drakestapleton
Labels: retired
drakestapleton wrote on 2026-10-29 20:51 UTC
Evidence: qwen36_batch.rs blob 476f138a71e4107a7647326e2c0e523564b494a6 implements row stepping, prompt chunks, prefix matching and bounded backpressure. omega_engine.rs implements whole-prompt/device routing and persisted prefixes. Reuse these contracts under #753; adapt Flint state and tokenizer.
Depends on P0 correct forward and P1 bounded allocations. Existing #715, #718-#721, #730, #742 and CUDApp#33 retain their ownership.
Add Flint via existing engine/model registration; preserve HTTP/SSE cancellation, row isolation, queue limits, shutdown and errors. Count queue time separately from inference.
Use Flint template and EOS/control IDs from pinned tokenizer, preserve reasoning_content/tool-call continuation and trusted-template boundaries. Test fragmented streamed tool arguments, multiple calls, malformed output, tools returning control-token text, output exhaustion and long multi-turn sessions.
Complete state snapshot: full/sliding KV, ring positions and absolute token count, consumed/emitted boundary and sampler state where needed. Cache identities include model/adapter/tokenizer/template/layout/precision/backend. Test COW, branch order, corruption and interrupted restores. RAM/disk decision uses measured total restore-plus-suffix cost, extending existing policy.
Speculation off for baseline. Add only after identifying a compatible draft method, proving rejection/rollback and measuring verify cost. No assumed Qwen MTP transplant or shared token IDs across tokenizers.
Freeze workloads and quality thresholds before timing: Omega compilation/tests on unseen tasks, repository fixes, tool chains and general coding regressions. Use same user tasks with each tokenizer's actual counts. Report reasoning and final tokens separately and successful tasks/minute.
Run independent reference Flint, native Flint, live-equivalent 35B and qualified 30B if available. Keep matched same-model backend comparisons separate from cross-model results; report unavailable historical artifacts explicitly.
Matrix B=1,2,4,8 and prompt T=4096,16384,49152 plus 131072/262144 where admitted. Include equal-prefix/no-prefix, cold/warm, prefill-heavy and decode-heavy, short Hive jobs and long tool chains. Prompt+output must fit each model.
Randomize run order, warm up, repeat, report raw samples and uncertainty with source-pinned binaries/weights/flags, clocks/temperature/power mode and uncontended GPU lease. Measure TTFT/TPOT p50/p95, goodput, OOM/refusals, resident/load peaks and energy only with an instrument.
Publish measured Flint/incumbent, GEMV/GEMM, KV/weight and speculation crossover surfaces with confidence/unknown regions. Adopt only improvements preserving precommitted quality and stability. Readiness needs reviewable PRs, actual GB10 receipts and rollback validation.
Parent: https://github.com/aien-dev/aien-architecture-mv/issues/353. Status PROPOSED; implementation/physical qualification NOT_RUN. Reuse existing owners, reconcile current PRs/comments/consumer pins before edits, claim one worktree per path. First-party source/tests/automation are seeded .om; canonical CUDApp handles device execution. References may use independently pinned external frameworks. Each PR includes actual checks, negative controls, immutable source/compiler/model/config receipts and remaining NOT_RUN gates. Keep the incumbent service and recovery path intact.
drakestapleton wrote on 2026-11-07 00:08 UTC
35B retired (Drake 2026-11-06): Omega LLM only. Flint P2 (outside weights): serving parity and crossover benchmark for Flint. — issuecov/I3 (Hermes worker subagent of lead issuecov, claude-opus-5-5, anthropic)
did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:17 UTC
Host dependency record: what serves Flint today (not Omega)
Until this issue (P2) ships native serving, Flint is served by an outside engine. This comment records that dependency, as the policy requires for non-Omega code in the serving path.
Field
Value
What
llama-server from ggml-org/llama.cpp, run as the docker container flint-r1-kvu
Exact version
image ghcr.io/ggml-org/llama.cpp@sha256:dfe42bda81c6bd53df864dfcf65e2423e9703f9991c238cfa7aaa893063e2977, label version b11804, revision c7fc5094179bf8a9c73c18593db714f8da41a402 (built 2026-10-22)
Model
flint-nvfp4.gguf (sha256 97cc8009ff9b132d…), alias flint
What it does for us
Serves an OpenAI-compatible endpoint on 127.0.0.1:18300 for the iMac courier and the Flint eval. Runs with 4 slots, 131072-token unified KV (--kv-unified), f16 KV and flash-attn, holding 26148 MiB of unified memory on the GB10.
Omega replacement
This issue (P2): Flint inside the existing engine through qwen36_batch.rs / omega_engine.rs contracts, on top of P0 (#802 forward, KV decode in draft #809) and P1 (#803 bounded allocations).
Status
DEPLOYED as a host dependency, not Omega. Native P2 is PROPOSED.
Operational notes, observed 2026-10-30:
At 17:08:26Z the container was recreated with the same image and args. The only change is a healthcheck that probes :18300/health; the image's default healthcheck probed :8080, so the container always showed unhealthy. Docker now reports healthy. Smoke test: 17*23 returned 391 at 94.3 tok/s.
--kv-unified is required. With an explicit --parallel 4 and no unified KV, requests on non-contiguous slots decoded in separate ubatches, measured 1.68–1.82× lower aggregate decode (~/handoffs/flint-eval-20261030/split-kv/).
For P2's reasoning and template work: Flint ignores chat_template_kwargs.enable_thinking=false and reasoning_budget=0. With a 1024-token cap, a chat-style request produced 1024 tokens of reasoning_content and empty content (finish_reason=length). Clients must enforce their own think budget, as the courier's --think-budget does. Native P2 needs a server-side budget or a forced think close.
did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:21 UTC
Host dependency record, addendum (2026-10-30T20:15Z): a KV admission gate now sits in front of Flint (not Omega)
This adds to the 17:13Z record and does not edit it. The serving topology changed at 19:33:30–19:33:59Z, with 29 s of downtime and Drake's approval:
Field
Value
Public endpoint
127.0.0.1:18300 is now the gate. Clients (iMac courier, eval) are unchanged.
Backend
llama-server container flint-r1-kvu (same image digest dfe42bda…, b11804 / c7fc5094), moved to 127.0.0.1:18310
What the gate is
~/.local/state/flint-serve/flint_gate.py, 391 lines, sha256 0e403faf5d09a14e7c9d1cd894504720ee1453227edf7affa2e1555a981bc823; run as systemd user unit flint-gate (CPUAffinity 0-5, Restart=always)
Exact runtime
CPython 3.12.3 (/usr/bin/python3), standard library only: argparse, asyncio, collections, itertools, json, time
Admits a request only if Σ min(prompt + n·max_tokens + 16, 131072) over all admitted requests fits the 131072-cell unified pool. Strict FIFO. A request without max_tokens reserves the whole pool. Prompt length is counted with the backend's own template and tokenize routes.
Why
llama.cpp b11804 checks a prompt only against n_ctx_slot (server-context.cpp:3949). On pool exhaustion it fails every in-flight task with HTTP 500 Context size has been exceeded. (server-context.cpp:4569-4597). That is the 17:20Z incident.
Evidence
4 concurrent chats (≈32.5k-token prompts + 2500 forced output tokens, ≈140k cells): direct to :18310, 4/4 HTTP 500; through the gate, 4/4 HTTP 200, 2500/2500 tokens each. The 4th waited 122.7 s and the server logged 0 overflow lines. Gate prompt counts equal the server's usage.prompt_tokens. Scripts and table: ~/handoffs/flint-eval-20261030/{gate_flood.py,gate_smoke.py,REPORT.md}.
Status
IMPLEMENTED, EXERCISED, DEPLOYED on this host. Not GPU-qualified as a component; not in any repository.
Omega replacement
PROPOSED: admission control belongs in the native serving scheduler this issue (P2) owns, which reserves KV cells before admitting work. The gate is retired when native serving owns the pool.
Serving-contract check against the pinned NVFP4 README (6ec43e19):
The deployed file's sha256 97cc8009ff9b…6b8bde equals the revision's LFS hash.
--jinja, flash-attn on, f16 K/V and --swa-full unset all match the README.
Deviation: the running container uses llama.cpp's default min_p 0.05 (/props); the README sets --min-p 0. The start script now passes --temp 1 --top-p 0.95 --top-k 20 --min-p 0 for the next recreate. The container was not restarted for this. The quality eval in progress pins 0.05 explicitly so that a resume stays consistent.