Files
leleka/docs/experiments/2026-10-04-native-responses.md
T
Pavlo Ratushnyi 4013e0c9bd
Desktop foundation / core (ubuntu-latest) (push) Failing after 28s
Desktop foundation / core (macos-latest) (push) Canceled after 0s
Desktop foundation / core (windows-latest) (push) Canceled after 0s
Linux / verify (push) Canceled after 0s
Linux / keyless-cuda (push) Canceled after 0s
Linux / static-cuda-package (push) Canceled after 0s
Linux / hosted-cuda-package (push) Canceled after 0s
Linux / linux-static-cli (push) Canceled after 0s
Linux / linux-cli-container (push) Canceled after 0s
Linux / release-cli (push) Canceled after 0s
Import tracked Strata Next source snapshot
2026-10-05 18:15:08 +02:00

6.5 KiB

Native Responses API on the real IQ3_S model

Scope and provenance

This is a functional protocol and supervisor qualification on the RTX 5090, not a paired throughput benchmark or a completed agent-quality gate. The ordinary production endpoint was not switched.

  • Control plane: 0f1efa2 plus the accompanying RESUME/REUSED parser fix; Rust 1.99.0, release x86_64-unknown-linux-musl.
  • Static CLI: 16,983,824 bytes, SHA-256 ee1dd490c64efb636025da74868dad1a59662eb2f95409513f7b900b01d534be. Linux ELF inspection found no interpreter or required shared libraries. This describes the control-plane executable, not the separate CUDA engine.
  • Engine: existing baseline engine-fork-f80a3e0/build/strata, engine 0.1.35, SHA-256 0f62ffb4dd30561bd4e56cd5e4da412a09f56b7ef6a19f5e23d0cea7e4381b1f. Imported upstream provenance remains in docs/upstream.md.
  • Hardware: RTX 5090 32 GiB, Ryzen 9 9950X3D, 128 GB RAM; NVIDIA driver 595.91.07, CUDA 13.2.86, configured power limit 600 W.
  • Model: private Qwen3.8-Flash-Next IQ3_S source shards, 83,617,662,656 bytes. Previously verified SHA-256 identities, without another full-file scan: 4c1eb2ceb4915e1192f4f386021897bde56a97f40a0bb78bb86465e0f7d2aca3 and 316b46f3a2dbd68c900f43136ab9449f9dcc3725dfd8c794847c204bc161e113.
  • Configuration: one worker, 262,144 context, INT8 K+V, 32,768 resident KV, automatic expert cache/prefill, MTP spec4 with minimum probability 0.5, 700 MiB VRAM reserve; copied baseline engine arguments and environment. No KAR or V-only mode. Greedy requests, reasoning effort none.
  • Rust directly supervises C++; Python only drives these offline HTTP checks. Test endpoint: loopback port 18082. Private evidence directory on the Linux host: /home/para/.cache/strata-next/native-responses-20261004.

Defect found and fixed

The engine loaded and reached READY, but the first real generation got HTTP 503 because the Rust wire parser rejected RESUME 0 as an unknown tag. The supervisor correctly isolated the failed worker and initiated recovery. The failure is retained as text-json.pre-resume-fix.json and runtime.log.

Upstream emits RESUME <count> before prefill and REUSED <count> afterward. Both are now validated as unsigned counts and consumed as nonterminal metadata; DONE remains the source of final usage. Unknown tags, malformed/overflowing counts, and inconsistent terminal counters still fail closed. Regression coverage includes the real message order in the mock-worker exchange.

Text and tool calls after the fix

Each row is one functional request, sequentially after a fresh worker load. The tool SSE request reuses the preceding tool prompt; the other rows report zero prefix reuse. OS/model storage caches were not flushed. These short, different requests and cache states must not be compared as speed variants.

Request Result Input / output tokens Reused HTTP wall First visible delta
Text JSON: 2 + 2 4, completed 26 / 2 0 0.3424 s N/A
Text SSE: HELLO HELLO, completed 20 / 3 0 0.2287 s 0.1721 s
Tool JSON Correct typed call, completed 307 / 39 0 1.6837 s N/A
Tool SSE Correct typed call, completed 307 / 39 300 0.3076 s 0.3073 s

Both tool responses contain exactly one record_value call with integer value: 7 and string label: "native-smoke". Arguments are schema-validated before publishing. JSON and SSE agree on the semantic call. Both SSE responses have contiguous sequence numbers and exactly one terminal event. Output token usage includes protocol/end tokens, not only visible text. Raw synthetic responses and event sequences are retained privately.

Cancellation, recovery, and tool continuation

  • After four text deltas from a long generation, the HTTP client disconnected. The same worker accepted the next arithmetic request and returned 4. Disconnect through completed follow-up took 0.3925 s in the final run (an earlier successful check took 0.1819 s). These include the next request's inference, not an isolated STOP latency.
  • The test killed only the verified owned engine child during another active generation. The stream emitted exactly one response.failed; a new request returned HTTP 503, and readiness was false with no context. The supervisor started a different child after its configured two-second backoff, without replaying the failed generation.
  • Replacement readiness took 25.4056 s, including reload, with warm OS caches and a one-second readiness polling interval. A fresh post-recovery request returned 4 in 0.4369 s. The prior and replacement worker PIDs were 3992120 and 3993068. This is one recovery measurement, not a percentile or a cold-start promise.
  • An initial lifecycle-driver attempt stopped because it treated the expected HTTP 503 from /ready as an exception. The driver was corrected to read that response body; the final complete lifecycle run above used a fresh runtime. No runtime change was required for this driver defect.
  • A further actual-model two-turn check produced a valid typed record_value call, then received its result using function_call_output and previous_response_id. The model returned the exact tool confirmation RECORDED-731. The two requests took 1.7437 s and 0.3842 s.

All 102 Rust tests, format, Clippy with warnings denied, and diff checks passed. The regression keeps mock-worker token/terminal output unchanged while adding the real prefix metadata lines. No model weights or compute kernels changed. These checks establish supported protocol behavior; they do not establish full-model numerical parity across a recorded agent workload.

The isolated runtime was stopped after measurement. Temporary tokenizer assets, configuration, and uploaded CLI are removed; private scripts, logs, and result JSON files remain for reproduction. The latest static CLI is retained locally. Model shards and baseline artifacts were not changed. After cleanup, GPU usage returned to 34 MiB / 0%, and port 18082 had no listener. The temporary local musl release build was removed (93.8 MiB).

Remaining qualification

Live reasoning, structured output, full recorded Codex/MCP replay, sustained soak, and a paired end-to-end performance comparison remain open. Passing these small checks does not authorize switching the production console profile or enabling experimental V-only/KAR modes. Hosted GitHub Actions has not run; the project does not yet have its GitHub repository.