Skip to content

Qwen 3.8 Next (Flash-Next): native Qwen4 provider integration and qualification - #1030

Merged
jonathan308 merged 15 commits into
Layr-Labs:masterfrom
jonathan308:codex/qwen38-next-support
Sep 17, 2026
Merged

jonathan308 merged 15 commits into
Layr-Labs:masterfrom
jonathan308:codex/qwen38-next-support

Conversation

@jonathan308

@jonathan308 jonathan308 commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

SDK merged and provider repinned — 2026-09-17

The consumer gitlink libs/mlx-swift-lm now pins 729fa45c67a8b1cb26b1debeacf7f1d16ef3a21e, the merged commit of SDK PR #149. Gajesh2007 approved the exact review head ae3ecdc835a895091f8929749fdb3e14383295a9; the GitHub-verified merge contains that head and has an identical complete Git tree.

This follow-up changes only the dependency gitlink and dependency documentation/changelog. No new inference code, model weights, numerical baseline, MTP defaults or private prefill/memory experiments are included. The provider PR remains open; this does not deploy a release or alter HF/R2 artifacts.

Repin checks: merged-head ancestry and complete-tree equality; unchanged core/C/MLX-Swift and package-resolution pins; locked release provider build; documentation impact and 305-file documentation lint. GPU performance testing was paused at the human's request. Earlier model results below retain their original source/binary scope, and the 4K MTP performance follow-up and existing open gates are not declared resolved by this repin.

Prior runtime qualification — native Qwen4 loading and MTP memory (2026-09-17)

Paired review heads: provider 6b313942f8cc5235075d865e653988fe85ca4c9d, SDK ae3ecdc835a895091f8929749fdb3e14383295a9. Runtime qualification binds provider 77d1d1d86; the later provider commit is documentation-only.

This update includes the native SSD-offload loading bound and physical-reclaim recheck, bounded MTP catch-up, consistent cold/restored unprimed carry, and ordered selected-page KV reads. It also includes the reviewed generic reasoning-control and recurrent output-gate fixes. Weights, tokenizer, trained heads, default SSD ngram offload, version 0.9.5, and other models' loading policy are preserved. Experimental prefill/NAX ports are excluded.

  • Full-weight native retained/rejected state, trained-head replay/discard, serialized suffix and final output budgets pass on M5 Max.
  • All 118 required local Chat/Responses/tool/reasoning cells pass across MTP OFF/AUTO; replay checks pass.
  • Mixed queued text/tool/image requests match isolated outputs; this is not native multirow qualification.
  • Complete 35-file artifact readbacks before/after pass.
  • Full cached lifecycle: the repeated request still sometimes falls back cold with correct output. The original failure and the clean-package repeat failure remain visible; a separate immediate-repeat diagnostic reused 6,144 tokens three times. Cause is not yet established.
  • All required end-to-end release gates complete: not claimed. Existing generic M5 FP32/default-TF32 numerical failures and prior release/trust/quality limitations remain recorded.

The selected load estimate is 75.026 GiB plus unchanged serving headroom (81.526 GiB total), not the former generic 89.5 GiB requirement. Actual MLX weight residency is about 69.2 GiB. On the clean package, the bounded 4K/192-token counting screen measures about 43 tok/s OFF and 79 AUTO with full acceptance; these are client proxies, not universal speeds. No 1.2K–2.5K prefill claim is made.

Source-bound results, evidence identity, failures and scope. Local compatibility is not hosted OpenRouter certification. This is a review update, not a merge, deployment, model upload, or all-green production sign-off.

Prior qualification notes (historical source scopes retained)

Integrates Qwen 3.8 Next (Flash-Next) using native Qwen4, retained multimodal processing, SSD n-gram/PLE, embedded MTP, paged storage and complete prefix checkpoints. This is not the 27B model or a Qwen3.5 architecture alias.

Current provider head: 5dc058abde416872525d7f3696de97d80c9c610e. Companion mlx-swift-lm #149 is pinned to publicly fetchable, GitHub-verified 559c045fd61bfc2d55fc2e0c149f34d208149a66. Provider/coordinator version metadata is 0.9.5; the historical App Attest safety floor is unchanged. These updates do not merge or deploy either PR.

Latest review fixes and upstream reconciliation

  1. Snapshot verified conversion metadata before shard processing; use those pinned bytes for the final license, tokenizer, template and config copies. Mutation/removal/late-addition regressions retain the original pin assertions. The selected published checkpoint was not found corrupt and its weights are unchanged.
  2. Through the SDK pin, preserve all semantic Qwen4 Codable fields; bind and validate PLE resources before factory return, release failed loads and keep PLE history/convolution state request-owned.
  3. Route the ordinary Qwen4 CLI benchmark through native paged CBv2 with production EOS, explicit target-only/cache-OFF scope, complete duration accounting and lifecycle cleanup. Generic unsupported generation fails recoverably. Other-model dispatch/JSON5 handling stays intact.
  4. Retain the native incremental fusion-materialization hook, explicit Responses message boundaries and generic-engine sampling refusals, without changing target math, weights, sampler, MTP controller or native API support.
  5. Enable the existing full-KV/PV32/early-layer-submission profile by default. The operator no longer needs to export the three switches. Preserve explicit 0 rollback, compact-KV opt-in, all geometry/fault/media gates and existing prefill policy.
  6. Include upstream 0f7b1e6113efd91bb0a7a6586b57589527192724, retaining its contributor/docs-impact checks, warm-pool telemetry and security reports. Resolve documentation stamps and retain both the Qwen and security report links. The merge does not change the tested provider Swift sources, manifests or SDK pin.

The earlier native prompt/tool framing, normalization-v5, metadata/usage, media-prefix, mixed-position and CI-isolation fixes remain included. No argument repair, weaker oracle, precision change or replacement numerical baseline is introduced.

Default performance profile

Control New default Rollback / scope
DARKBLOOM_QWEN4_QSA_PARALLEL_FULL_KV ON when unset Explicit 0 selects original dispatch; independent QK plus unchanged ordered PV
DARKBLOOM_QWEN4_QSA_PARALLEL_VALUE_PARTITIONS 32 for full KV Valid caller/environment overrides retain precedence; compact-KV default is unchanged
DARKBLOOM_QWEN4_LAYER_ASYNC ON when unset Explicit 0 selects original scheduling; singleton native text widths 1–6 only

These paths primarily affect decode and short MTP verification. Larger prefill chunks retain existing paths; blocked GDN, shape-eligible affine QMM and PLE gather were already ON. The change does not establish 1.5K–2K prefill. Shell overrides still follow the documented foreground/local versus LaunchAgent passthrough boundary.

Matched M3 Ultra/256-GiB HTTP target-only runs on the unchanged selected artifact preserve output/usage and improve approximately 18 → 34 tok/s. Two warmed repeats give approximately 850–910 tok/s prefill TTFT proxies across natural and repeated-text fixtures; warmup is separate. Native 19-arm fixed-depth OFF/ON/unset comparisons retain exact token IDs and MTP traces, with new defaults matching the old explicitly enabled profile. Different prompt/acceptance distributions are not a like-for-like comparison to earlier ~60 tok/s measurements. Adaptive MTP settings are unchanged.

Validation ledger for this update

  • Selected artifact retains 21 shards/3,748 entries, 76 embedded MTP entries, 333 BF16 vision entries and 384 PLE entries/128 parts. Full native payload hashes pass; no conversion, quantization, tokenizer, template or head edit is included.
  • Converter 36/36 CPU regressions, semantic Codable tests, tiny actual LLM/VLM factory lifecycle checks, request-cache isolation and generic-server/Responses regressions pass on the reviewed source.
  • Fresh default SDK: 912 XCTest/18 skips/0 failures, 1,246 Swift Testing aggregate/182 suites, 14 separately retained skips. Ten focused cases include 504 bit-exact attention cells with actual dispatch and layer fault/retirement safety.
  • Fresh selected checkpoint: 25 native state/logit/rollback/serialized-suffix cases and 19 fixed-depth performance/exactness arms pass. Prior selected-target output budgets 1–9 retain their original execution scope.
  • Provider default run: the Swift Testing main aggregate reports 2,963, with 51 explicit skip records retained separately; all six isolated groups pass. Ten entitlement early-return diagnostics are not hardware coverage. The 130-case XCTest run had two assertions in one obsolete default-OFF policy test; that fixture is corrected and its rebuilt focused check passes 1/1, zero skips. Original failures remain recorded. The test-only rebuild leaves the serving executable byte-identical; this is not relabeled as a fresh all-green full-provider rerun.
  • The preceding private review build, with all contract fixes and explicit performance profile ON, passed 118/118 required local OpenRouter-compatible cells across MTP OFF/AUTO, exact Chat/Responses replay, cache/media, queued concurrency and actual cancellation/unload/reload. These passes are not a newly executed unset-default API matrix or hosted OpenRouter certification.
  • Exact 0.9.5 candidate starts with the flags unset and passes authenticated generation, active-MTP and cache/paged posture checks. It is available for operator validation; no developer endpoint or credential is published here.
  • Signed commits, public SDK repin, bounded privacy scan and documentation checks. Fresh remote checks are tracked below.
  • Complete fresh unset-default provider/API sweep and controlled old/new peak-memory/high-acceptance speed comparison are follow-ups. The operator requested public updates and local access before those additional runs; no numerical failure or model-quality case was waived.
  • Native multirow long-prefix exactness remains unqualified and OFF by default; queued HTTP concurrency is not native multirow proof.
  • Physical 128-GiB admission/reload, ordinary coordinator deadline/cold-readiness findings, strict literal/visual/tool-history quality, original-BF16, signed persistence/trust and final exact-head CI/integration remain separate release gates.
  • All required end-to-end release gates complete, with current evidence.

Latest change: before / after

flowchart LR
  subgraph Before
    A[Verify source metadata then convert shards] --> B[Late metadata copy may use changed bytes]
    C[Ordinary Qwen4 benchmark] --> D[Generic loader and generation assumptions]
    E[Unset speed flags] --> F[Qualified paths inactive]
  end
  subgraph After
    G[Capture verified metadata bytes] --> H[Convert and copy only pinned payloads]
    I[Factory binds and validates native resources] --> J[Native CBv2 benchmark and bounded lifecycle]
    K[Paired SDK defaults full-KV PV32 and layer submission] --> L[Existing exact fast paths; explicit zero rollback]
    M[ProviderCore version and coordinator fallback] --> N[Matching 0.9.5 metadata]
  end
Loading

Reproduction: scripts/qwen38_validation/README.md, scripts/qwen38_conversion/README.md, and the SDK qualification guide. Runtime CLI SHA256 is cb575190ff2a413c82f76f20ca459bdfc24b10114068b2f7a5de8ebb7f749e42; metallib remains 2129f6132794d84243c02631bc7478417dba0e0dbd10467beab56c11bf20bdd2. These local artifacts are not signed-release/notarization claims.

Required/named constrained text tools and media remain target-only under the existing safety gates; eligible ordinary text/automatic tools retain MTP. Complete native caching, SSD learned-weight offload and one-row admission remain intact. After an approved SDK merge, repin to its observed merged SHA and recheck integration. Model visibility, uploads, PR merging, release signing, catalogs and deployment are separate operations.

Earlier qualification history — original commits, artifacts and limitations retained

The following is historical evidence from the preceding PR revisions. Statements marked “current” below refer to those earlier revisions, not the new update above.

Integrates Qwen 3.8 Next (Flash-Next) using native Qwen4, retained multimodal processing, SSD n-gram/PLE, embedded MTP, paged storage and complete prefix checkpoints. This is not the 27B model or a Qwen3.5 architecture alias.

The human-reviewed update includes all qualified native prompt/framing, response/accounting and cache fixes, with the existing speedups preserved. Provider head: a4692e70e12ed190391f8d35af291bea56c6cadc. Companion mlx-swift-lm #149 is pinned to signed, publicly fetchable 96199527fe3fb36dd0dfd656faaf36776df724f4.

The reviewed integration includes upstream 605651bb95d71c1da9bb122107925143e9441973. Seven documentation conflicts are resolved, retaining both the Qwen and upstream recovery/report content. SDK main also merges cleanly; its extra two workflow files change CI action pins, not runtime code. No upstream PR merge, deployment or model publication is performed.

Fixes included

  1. Preserve original messages and the trained template for native Qwen4 required/named text tools. Keep declaration filtering, native name/schema/cardinality validation and other-model/media policies. Swift/Rust/Go now use synchronized normalization v5; older cache contracts fail cold.

  2. Require a declared native function opening or framed JSON at every constrained tool-frame opening. Keep argument values opaque/model-generated and preserve reasoning boundaries; no heuristic unescaping, invented values/closures, tag stripping or weakened oracle is added.

  3. Preserve response ID and creation time on coordinator terminal extras. Report authoritative Responses usage totals and finalized reasoning-item status while preserving a truncated root response's incomplete status, provider signatures, hashes and job identity.

  4. Preserve validated cached-token/reasoning-token details on combined Chat finish-plus-usage events. A separate usage event takes precedence; do not duplicate details, invent missing usage or change token totals/content.

  5. Retain qualified full-KV parallel attention, early safe layer submission, canonical media-prefix reuse and mixed-position provenance through ordinary/direct MTP target paths. Weights, heads, numerical baseline, sampler and safety caps are unchanged.

  6. Add source-relocation, real-coordinator API, complete-manifest/catalog-binding and account-scoped cache regressions. The exact failing controls are retained; fixture corrections do not relax semantic assertions.

  7. Wire the two mandatory GPU-global CI assertions into separate opted-in test processes. Ordinary invocations clear inherited exclusive-test flags. Preserve the existing nonempty/no-skips guard, and continue the isolated gate even when another test invocation fails. That earlier CI-only cleanup changed no runtime or numerical assertions. The current merge additionally retains upstream Hugging Face test isolation and verifies its failure propagation.

  8. Fix standalone Responses reasoning/tool-call replay through the SDK pin, retaining explicit message/result boundaries and exact argument bytes. The coordinator prompt-contract implementation and normalization version are unchanged.

Before / after

flowchart LR
  subgraph Before
    A[Required or named text tool] --> B[Additional forcing prompt and older contract]
    C[Tool opener] --> D[Incomplete header boundary permits prose]
    E[Coordinator terminal extras] --> F[Changed identity or incomplete usage and reasoning status]
    G[Native SSD reuse] --> H[Combined terminal misses client cache detail]
  end
  subgraph After
    I[ToolChoicePromptPolicy and Rust normalization v5] --> J[Original native Qwen4 prompt with fail-cold contract parity]
    K[Qwen4NativeToolConstraint] --> L[Declared header or framed JSON plus final validation]
    M[Chat metadata and Responses builders] --> N[Stable identity, authoritative totals and item status]
    O[consumer_stream combined-terminal handling] --> P[Validated cache and reasoning detail exactly once]
  end
Loading

Narrow review follow-up — local validation complete

The reviewed finding affects a client replaying separate Responses reasoning and function-call items as the next input. It does not mean ordinary reasoning/tool generation was broken. Typed item provenance now keeps the thought and adjacent calls in one assistant turn without coalescing unrelated explicit messages or crossing tool-result boundaries. No output repair, argument rewriting or numerical-baseline change is added.

  • Rebuilt full native provider and SDK test products on the same selected artifact and unchanged MLX/core/C pins.
  • 189 real SDK/server tests in 22 suites, zero failures/skips, including the actual streaming output-to-input replay regression and existing model/parser compatibility cases.
  • Full default SDK: 891 XCTest tests/12 skips/0 failures; 1,221 Swift Testing pass records/14 skips (aggregate 1,235). Skips remain explicit opt-in/fixture/diagnostic limits.
  • Five allocator/composition gates run individually, no skips. Real selected-artifact Qwen4 tests pass 25 bit-exact target/rollback/serialized-state cases and trained-MTP final budgets 1–9. The five-draft setting is test-only, not a serving-default change.
  • Rebuilt native standalone 118/118 required local API cases across MTP OFF/AUTO: reasoning OFF/ON, tool choice/cardinality/history, Chat/Responses streaming/nonstreaming and invalid-control privacy. Two unsupported-effort observations are separate; this is not hosted OpenRouter certification.
  • Eight real Chat/Responses replay-equivalence pairs retain exact answer/reasoning bytes and prompt/output token counts across reasoning modes and both MTP postures.
  • Two long OFF/AUTO continuations preserve outputs/finish/usage with observed speculative activity. This is a losslessness check, not a new throughput or general acceptance-rate claim.
  • Nine cache/lifecycle cases pass: real 6,144-token repeat/suffix/readmission reuse, cancellation/drain, half-close and native image admission with the existing no-media-speculation gate. Cache keys are local/ephemeral; this is not signed persistence.
  • Four concurrent mixed text/tool/image HTTP requests match isolated references and drain. Default native one-row admission remains unchanged; this does not qualify the disabled multirow opt-in.
  • Public-safe source/export review: only the two SDK Responses input-decoding files change at runtime. Qwen4 model math, kernels, trained weights/heads, PLE offload, cache algorithms, sampling and speed settings are unchanged.
  • Fresh exact-head GitHub CI is tracked in Checks after this push; prior CI results are not relabeled as current.

Responses replay: before / after

flowchart LR
  subgraph Before
    A[Responses reasoning then function_call items] --> B[OpenAIResponseInput requires previous toolCalls]
    B --> C[Reasoning-only assistant turn plus separate call turn]
  end
  subgraph After
    D[OpenAIResponseInputMessage.Kind retains item origin] --> E[OpenAIResponseInput coalesces adjacent reasoning and calls]
    E --> F[One assistant turn with unchanged reasoning and arguments]
    F --> G[Existing native template and model]
  end
Loading

Current rebuilt native binary: e6212230902052fd1c84ec9695dcc7a20bae8c92b3a5e204a4dcf56146fde788; source-matched metallib remains 2129f6132794d84243c02631bc7478417dba0e0dbd10467beab56c11bf20bdd2.

  • Current provider defaults and required isolated gates pass: 129 XCTest tests/7 skips/0 failures, 2,919 Swift Testing pass records/51 skips. Ten entitlement early-return diagnostics are not native coverage.
  • Current coordinator regression with disposable PostgreSQL: 5,929 test/subtest pass events, zero failures, three explicit skips. A preserved local DSN-authority setup error was corrected in the private runner; no DB test oracle or repository DB code changed.
  • 10 CPU CI-routing checks, three watchdog checks and three release-toolchain checks pass. Original nonempty/no-skip tripwires and exclusive-GPU process boundaries are retained.

Earlier broader qualification and remaining release gates

Earlier broader record: docs/reports/2026-09-15-qwen38-native-api-qualification.md. Native executable assessed: e092f806305dbd9fe91e3558343dfbc9e5871f0b9d7eb3c6ea5ed437c0b264a3; metallib: 2129f6132794d84243c02631bc7478417dba0e0dbd10467beab56c11bf20bdd2. Those earlier results retain their original source scope. The current follow-up above binds the rebuilt binary and narrow decoder change; full Qwen4 model code and numerical controls remain unchanged. Fresh public CI builds have their own binary identities.

  • Final real-coordinator local OpenRouter-style core: 118/118 required cells, reasoning OFF/ON and MTP OFF/AUTO, supported Chat/Responses stream/plain, tool choice/history/cardinality, stream identity/totals, signature/hash pairing, encrypted dispatch and native drains. Two unsupported-effort observations are separate.
  • Extended matrix: 138 declared cases, no new regressions; 48 weather/history passes and 52 strict-fidelity/held-out wire passes. Semantic quality is not counted as an all-pass result.
  • Real account-scoped cache: 16/16, resolving all eight missing HTTP cache-detail cases; observed 4,096-token SSD reuse, account isolation and sidecar outage/recovery.
  • Default long-prefix cache: 24 waves/32 responses pass across MTP OFF/AUTO × cache OFF/ON, including queued/reversed requests and actual 6,144-token warm reuse.
  • Coordinator full regression: 5,876 pass events/0 failures/3 skips; race regression: 4,760/0/3. Both separate local opt-ins pass; live APNs remains unqualified.
  • Provider full suites per posture: 120 XCTest passes/7 skips; 2,917 Swift Testing pass records/52 skips, zero failures. Ten entitlement early returns are not passes.
  • SDK full suites per posture: 891 XCTest tests/9 skips; 1,210 Swift Testing pass records/14 skips, zero failures. Aggregates and individual pass records remain distinct.
  • 25 selected-target state/logit cases, trained-head replay/discard, suffix restore and budgets 1–9; 33 additional invocations include 360 full-KV exactness cells, PLE, vision, memory and lifecycle checks.
  • Media-cache mechanisms 14 reference/18 cached, nine cached lifecycle checks, six mmap checks and 24 encrypted loopback handler cells pass in their declared scope.
  • Matched 36-request text/image/code comparison preserves requests, outputs, finishes and counts; wall ratios 0.971784–1.008637, with no meaningful regression in this bounded workload. Human local validation passed.
  • 9 CPU-only CI-routing tests with a fake Swift executable verify selector/opt-in isolation, failure propagation, zero-test rejection and both Swift Testing/XCTest skip rejection. That earlier CI-only window kept the local model lane untouched; the current human-authorized maintenance pass also runs the isolated gates locally.
  • Fresh CI run 34992356121 passes on the previous dfe556c135 head. Both mandatory exclusive-GPU functions execute individually and pass without skips: the allocator/retained-alias assertion and paged decode batch-composition invariance. Seven CI jobs succeed; the push-only cache job is an explicit skip. The separate integration/benchmark workflows and Vercel deployment authorization remain separate checks.
  • Native multirow long-prefix/cache exactness remains a follow-up: 58 passing/16 failing waves in the opt-in recheck. Default serving stays one active native row; other requests may queue.
  • Strict fidelity per MTP mode: 13/20 exact, 20/20 wire, plus two NFC-equivalent values; held-out 3/6 exact, 6/6 wire. Multimodal quality 16/19. Literal-copy, brief-video and dependent media/tool-history failures remain visible, not repaired or relabeled.
  • Broader native cohort/state/stress, physical tiers, original BF16 equivalence, signed persistence/account trust and operational release gates require separate evidence.
  • Final exact-head public CI/integration results are separate from the completed local qualification.
  • All required end-to-end release gates complete, with current evidence.

The selected artifact is unchanged: 21 shards/3,748 entries, 76 embedded MTP entries, 333 BF16 vision entries, 384 PLE entries/128 parts, and 106,294,664,646 weight-file bytes. Its latest approximately 7K/192 code cases give client decode estimates of 32.25–32.43 tok/s OFF and 50.49–52.67 AUTO. These are not native-phase or sustained-agent rates. Original-artifact native fixed-depth measurements remain in the earlier performance report and must not be substituted for this target.

Serving and release boundaries

  • Native Qwen4 remains one active generation row by default. DARKBLOOM_QWEN4_BATCHED_QSA=1 is not promoted. The qualified speed switches remain explicit opt-ins, not a fleet activation.
  • Constrained required/named text tools and media remain target-only under the existing native gates; eligible ordinary text and automatic tools retain MTP. Slot head activation alone is not speculation proof.
  • Paging, complete prefix caching and SSD PLE remain intact. Native paged storage with gathered attention is not a direct paged-Metal-kernel claim. The shared Qwen35 wire-codec name does not select the model architecture.
  • Local compatibility uses synthetic account/trust fixtures. It is not hosted OpenRouter or signed production-account certification. Native NFC behavior is preserved; remaining value failures are not conclusively attributed solely to weights, quantization or the engine.
  • No credentials, real developer endpoints or raw private diagnostics are published. Generic loopback product behavior and synthetic fixtures remain.

After an approved SDK merge, repin to its observed merged SHA and recheck integration. Roll back paired pins together and retain the previous immutable model revision. HF/R2 writes, model visibility, merge, release signing, catalogs and deployment remain separate operations.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

@jonathan308 is attempting to deploy a commit to the EigenLabs Team on Vercel.

A member of the Team first needs to authorize it.

@jonathan308
jonathan308 marked this pull request as ready for review September 15, 2026 04:42
@Gajesh2007

Copy link
Copy Markdown
Member

@codex review this

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-16T04:27:30.937379Z 5dc058a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dfe556c135

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007 Gajesh2007 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent Qwen 3.8 Next verification for 0.9.5

Assessment: the native serving path has substantial passing evidence, but I would hold an unconditional release thumbs-up until the failures below are resolved or explicitly scoped. This review was prepared with Codex from local testing; the runtime source was not modified.

Tested provider a4692e70e12ed190391f8d35af291bea56c6cadc with SDK 96199527fe3fb36dd0dfd656faaf36776df724f4, Apple M5 Max / 128 GiB, macOS 27.0 / Swift 6.3.2. Artifact: EigenLabs/Qwen3.8-Flash-Next-MLX-4bit-mtp, revision e555958420096f695d449111693a6647b698479b; canonical serving ID DarkBloom/Qwen3.8-Flash-Next-Q4-mtp. All 21 shards and all 35 manifest-listed files passed SHA-256 verification: 3,748 tensors, 76 MTP entries, 333 BF16 vision entries, 384 PLE entries, 106,294,664,646 weight-file bytes.

The saved release executable reports 0.9.4, SHA-256 a9b97dc3a20c18829521cb74ffb1af85b6d07940cf43fd4b89da4ed10826bcc2; source-matched metallib 2129f6132794d84243c02631bc7478417dba0e0dbd10467beab56c11bf20bdd2. This is feature qualification for 0.9.5, not a signed 0.9.5 bundle certification.

Passing results

Check Independently observed result
Real coordinator Chat/Responses API matrices, OFF/AUTO 118/118 required cases pass; reasoning, tools/history, stream/plain, identity/usage, encrypted dispatch, signed/hash-bearing receipts and request/KV drains. Two unsupported-effort observations excluded.
Selected full-checkpoint native state 25/25 exact logit/KV/QSA/GDN/PLE retention, rollback and serialized continuation cells; actual trained-head replay/discard; output budgets 1–9 exact between target-only and MTP at test-only fixed depth five. The native SDK test binary was built at 3752331, with these test/fixture/math files verified byte-identical at 9619952; diagnostic grants and test-only draft depth five are not serving defaults.
Independent corpus Per mode: 24/24 wire and runtime checks, 18/20 exact semantic values, plus one additional NFC-equivalent value. All three image questions, malformed-input handling and cancellation/recovery pass.
Actual Responses output replay 4/4 per mode, including real returned reasoning and parallel function calls replayed with matching result IDs; bounded cleanup passes.
Bounded context 4,070- and 8,166-token prompts retrieve the opening value correctly; oversized-output rejection and recovery pass in both modes.
Cache mechanisms with a separately declared 30-second base 16/16 OFF/AUTO: tenant isolation, four 4,096-token hits per arm, return to the first tenant, sidecar outage cold fallback/restart hit, exact outputs/usage and accounting. Eight encrypted dispatches and eight signed/hash-bearing receipts per arm. AUTO actually executed 250 MTP rounds, 609 proposed / 238 accepted.

The 30-second diagnostic is not a normal-policy pass. The original 9-second-base failure below is preserved. The first diagnostic OFF attempt crossed midnight UTC and failed the unchanged accounting-date guard; a fresh unchanged diagnostic after midnight passed. No date/content/accounting assertion was bypassed. Likewise, an instantaneous post-response cleanup assertion was corrected only after preserved samples proved cleanup 4.1–4.2 ms later, before any next request; separate bounded drain probes then passed.

Fresh current coordinator checks also pass: 28 package suites, targeted races, and 413 native-Postgres store pass events without failures/skips. Earlier scoped prompt/sidecar checks included 126 byte-exact prompt vectors and 471 load requests. Earlier broad SDK/provider suites on this M5 needed MLX_ENABLE_TF32=0 for unrelated numerical fixtures; representative failures also reproduced on the pre-PR SDK. The real provider serving/API/performance runs used default precision and memory policy. The cache diagnostic changed only the deadline base; the SDK numerical fixtures used the explicit diagnostic grants/depth noted above. An initial cap-0.93 readiness experiment is excluded from normal-policy qualification.

Failures and proposed fixes

  1. Ordinary CLI benchmark crashes on first inference. With the full selected artifact, darkbloom benchmark --model DarkBloom/Qwen3.8-Flash-Next-Q4-mtp --iterations 1 --max-tokens 1 loads successfully, then SIGTRAPs at its first iteration. Matching-binary crash analysis identifies the PLE catalog error-handler trap. ModelBenchmark.run uses the generic factory/generation path, which lacks PLE binding; details and typed-error corroboration are on companion #149. Fix: route Next benchmarking through its supported native CBv2 loading/generation path and repair or explicitly reject unsupported generic SDK entrypoints. Disabling SSD offload is not a substitute.

  2. Warm long-prompt admission rejects a request just served within the allotted time. The unchanged TestIntegration_FlashNextCacheScope serves its 4,207-input/64-output unscoped reference with first content at 7.274 s, then rejects the identical-body first scoped cold miss: provider capacity/503, coordinator HTTP429. Its learned prefill EWMA is 582.189 tok/s; the existing 0.5 haircut predicts at least 14.452 s, exceeding the 11.373 s request budget. The test already inherits the documented production-like 9 s base + prompt allowance, not the 5 s unconfigured fallback. This policy predates the PR; this model/hardware combination exposes the mismatch. Fix: align model/provider throughput forecasts, routing token estimates and coordinator deadlines; retest both the unmeasured first request and subsequent measured misses. The larger-budget diagnostic proves the cache mechanisms, not this policy.

  3. A genuinely cold first request times out before loading finishes. A separate probe verified the model was not resident, omitted backend prewarming, and sent one short 8-token request under the normal 9 s base / 120 s queue policy. It returned HTTP429 after 9.015 s (timeout waiting for first response). Cache-enabled loading separately took about 173 s after registration, including intentional fresh pre/post artifact hashes. Fix: make readiness/routing account for model loading, or provide a distinct bounded loading phase before the inference first-content deadline. This is local reproduction, not a claim of a hosted outage.

  4. The provided AUTO cancellation/unload/reload gate fails on this 128 GiB host. Twice, actual quiet-prefill cancellation (two steps, no content), drain, readmission and weak model/PLE release checks passed, then the second load was refused: 65.1 / 61.6 GiB usable vs 89.5 GiB required. The correctly monitored test helper still had 51.07 GiB process footprint near the second rejection. Unload and the load gate already clear allocator cache. Investigate rather than assume a permanent leak: the fixture retains firstBridge, its weak checks cover the container/outer VLM model rather than every inner array owner, and ordinary production retirement may differ. Add phase-aligned MLX active/cache and OS availability observations; compare a diagnostic that releases the old handle, then fix ownership/reclaim/admission as the evidence warrants. Keep the unchanged failing gate visible.

  5. Cold-load headroom is understated. Repeated default loads peaked near 110.3 GiB, settling around 68–71 GiB. The current padded load requirement is about 89.5 GiB before the OS reserve. Header accounting finds 42.1875 GiB of split routed gate/up inputs; retaining them while creating fused outputs predicts almost exactly the observed peak. This is strong source/artifact evidence, not a per-buffer allocator trace or an observed OOM. Fix direction: incrementally materialize/release fusion staging and measure the result, or account for the real transient in admission. PLE is already filtered before evaluation and whole-shard prefetch is skipped, so charging all offloaded tables as resident compute is not the targeted remedy. 96 GiB support is a desired target, not verified support; steady footprint alone does not qualify that tier. Proposed details are in the existing memory thread and companion SDK review.

  6. Conversion metadata race confirmed. A controlled metadata mutation after initial pin validation still produces a success receipt. I am adding the independent reproduction to the existing thread, rather than duplicating that finding. The selected published checkpoint itself passed full hashing.

Performance and quality boundaries

Six matched warm 256-token text/code pairs: client-observed decode 40.5–41.8 tok/s OFF (median 41.3) versus 46.5–63.9 AUTO (median 58.5), median paired rate increase 41.6%; all six output/finish/usage comparisons exact. The client rate proxy is (completion_tokens - 1) / (terminal_time - first_visible_content_time); MTP chunking can affect that proxy. Median paired end-to-end time was also 28.7% lower. This is a bounded sample, not native-kernel or sustained throughput.

These serving runs used the default posture, with no explicit full-KV-parallel/layer-async opt-ins; an optimized-profile comparison remains to be done.

The generated maintenance-log 4,207-token sample recorded 7.223995 s internal prefill (582.365 tok/s), first content 7.274 s, and 63 post-first-token decode intervals over 2.467281 s (25.534 steps/s). Repetitive 4K/8K one-token probes yielded 876–971 prompt tok/s using client TTFT. These are different prompts and timing definitions. We have not established why another setup might reach 1.5–2K, isolated GPU-only prefill time, or causally attributed the difference to SSD PLE; identical-prompt warm-page/IO profiling and optimization-path checks are the next performance investigation. The admission haircut changes prediction, not execution speed.

Both modes preserve the visible limitations: literal <think> copying became <|im_start|> inside a tool value; decomposed Unicode normalized to NFC; the independent video answered dominant/first-frame red correctly but missed one brief blue frame (2/3). The frame sampler retained it. No output repair or weakened semantic oracle was used.

Before a blanket 0.9.5 approval, rerun the failed normal-policy/CLI/lifecycle gates after fixes and qualify the final signed bundle/catalog. Full positive 82K context, other physical tiers including 96 GiB, disabled multirow serving, BF16 equivalence, hosted traffic, live APNs and signed persistence/account trust remain outside this local qualification.

Comment thread e2e/flash_next_cache_scope_test.go Resolved
@Gajesh2007

Copy link
Copy Markdown
Member

@codex review this

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 5dc058abde

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch had an error being deployed

1 failed deployment
benchmarks — 2dc532d8 Deployed Sep 17, 2026 by jonathan308 via E2E Benchmarks #1417
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants