Repository navigation
perf(flint): pin SDK speedups, chain constrained decode, serve at paged width - #1555
Conversation
…ed width Pins mlx-swift-lm claude/flint-perf (0349802): larger decode command buffers, fewer paged decode dispatches and host uploads, a fused MoE FP32 expert combine, batched sliding-window prefill attention, final-layer KV-only evaluation chunks, and constrained decode chaining with cached device masks. Every SDK change is byte-identical to the previous path. FlintNativeProtocolConstraint and FlintAnswerStopConstraint opt into chained decode and key their cached masks by constraint state, since the allowed set depends only on the state while output budget remains. RecursiveSI/flint-int4 joins the automatic paged list, so it serves at the legacy paged width (8) on M5 Pro, Max and Ultra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Threat model review — advisoryReviewed head Review not completed for this head. Previous findings are superseded, not confirmed resolved. Reviewers: anthropic/claude-sonnet-5.5: first pass completed; anthropic/claude-opus-5.5: selected depth completed (9 batches); openai/gpt-6.1-sol: selected depth completed (1 batches) Scan incomplete: 1 file(s) could not be fully read as text. Binary, Git LFS and submodule changes require manual review. Models: budgeted Sonnet / selective Opus / selective Sol 6.1. Findings require human validation; this review never requests changes or blocks merging. Coverage: 45/45 source units; cross-file integration complete. 0 selected depth batch(es) pending. All threat definitions indexed; relevant full definitions selected. Unchanged callers are not scanned. Cost this run: $0.0000 reported, $0.0000 reserved with unknown cost; 0 paid request(s), 0 reused batch(es), 0 provider cache-hit tokens. Saved findings and earlier report · Historical findings are not confirmed resolved. Bedrock: 21 request(s), 921144 uncached + 0 cache-read + 47795 cache-write input / 15224 output tokens; 0 request(s) with unknown usage. OpenRouter backup used 0 time(s). Dollar amounts above cover OpenRouter only; AWS billing is reconciled separately. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atch) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fbd2cd0d is the Flint speedup branch with mlx-swift-lm main (f77b384c, master's previous pin) merged in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flint serving speedups on the paged path. Pins merged mlx-swift-lm
mainat993f7060(Layr-Labs/mlx-swift-lm#336, merged) and mlx-swift67dc752(currentmain). Independent of #1554 (paged-only defaults).Changes
libs/mlx-swift-lm→993f7060(merged fix(coordinator): snapshot AttestationResult on store (fix -race data race) #336): decode command buffers, fewer paged decode dispatches and uploads, fused MoE FP32 expert combine, batched sliding-window prefill attention, final-layer KV-only evaluation chunks, constrained decode chaining with cached device masks. All byte-identical; details and exactness evidence in mlx-swift-lm#336.FlintNativeProtocolConstraintandFlintAnswerStopConstraintopt into chained decode (allowsChainedDecode) and exposemaskCacheKey. The key is the constraint state while output budget remains, because the allowed set depends only on the state: the existing per-state allowed-token cache already ignores the remaining budget (FlintNativeProtocolConstraint.allowedTokenIDs), and a scanning answer-stop state returns its base state's set. A matched stop and an exhausted budget get distinct keys.RecursiveSI/flint-int4joins the automatic paged list (EngineV2KVBackendPolicy.preferredBackend), so it serves at the legacy paged width (8 concurrent) on M5 Pro, Max and Ultra instead of the default 4. Without this, served throughput stops scaling at 4 concurrent requests.inference.mdNative Flint) and changelog.Measured through a real served endpoint (
darkbloom start --local, M5 Max, paged/native/native, production sampling, Flint protocol constraint on, unique prompts; old and new builds alternated with equal cool-downs):Before — served request path
After — served request path
Blue is input, amber is overhead on the critical path, green is the optimized path, red is the old result.
Validation (M5 Max,
MLX_ENABLE_TF32=0)evidence/served-*)make changelog-check/make docs-impact-check BASE=origin/masterNot in this PR: a reviewed serving performance profile for widths above 8, and runs on M1–M4 hardware (code paths are family-agnostic; see mlx-swift-lm#336).
🤖 Generated with Claude Code