Repository navigation
Conversation
Add the M6 GPU profile and automatic mixed INT3/INT4 selection below 48 GiB with a 128K context default. Upgrade the bundled runtime to Python 3.14.10, pinned MLX HEAD, and nanobind 3.1.0, adapting thread-local random-state restoration and CI Metal compiler setup. Keep native-reference parity failures visible while exercising the remaining decoder checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apple M6 Macs are rejected by Rec, and the bundled INT4 profile targets machines with at least 48 GiB. This adds M6 support, a pinned mixed 3/4-bit checkpoint for 32–47 GiB Macs, selectable oQ3e weights, and measured prefill throughput. Both small-memory profiles default to 262,144 total input/output tokens.
Select a quant
Stop the existing server before switching.
--quantalso works withpullanddoctor;autopreserves RAM-based selection. An explicit profile cannot be combined with--manifest. Machines with 48 GiB or more retain the official INT4 default.mlx-community/flint-oQ3erevision274084481e0cafc1850408b315bb3375ec46a280, with SHA-256 verification for every downloaded file.language_model.prefix and routing-bias names without dropping bias values.oQ3e cache validation
On the tested 32 GiB M6, real weights loaded with approximately 18.5 GB peak MLX allocation. These are short smoke measurements, not an agent-quality benchmark.
Cached and uncached greedy output token IDs matched exactly. The packaged HTTP server separately reused 250 of 251 prompt tokens and returned identical answers. Both profiles advertise 262,144 tokens; a fully occupied 256K prompt was not memory-stress-tested on the 32 GiB Mac. oQ3e is a native decode path with different performance from the optimized mixed-bit path; switching quants has not been established to solve agent loops.
Runtime and prefill t/s
The runtime moves to CPython 3.14.10, nanobind 3.1.0, and MLX pinned to
fc344c986c4169d99f76b5d95ae6b4a58a359a63, including thread-local random-state compatibility and native ABI packaging. Prefill diagnostics append throughput computed from newly processed tokens; no completed rate is claimed for cancellation.Short runtime benchmark
Apple M6, 32 GiB, identical mixed 3/4-bit weights, temperature 1, top-p .95, top-k 20, 128 generated tokens. Medians of two measured runs after warm-up, alternating old/new/new/old; fast-sync enabled, prompt cache reset. Startup and HTTP overhead excluded. This compares the runtime stack, not quant quality.
The dedicated M6 profile retains the measured default schedule: 36/32/32 workers, 2048-token prefill, generic mixed experts. The 4096-token/M5-specialization combination did not improve the tested 8192-token prompt. Exploratory schedules, hardware references and limitations are in
engine/M6_TUNING.md. Architecture assertions include the testedapplegpu_g18gandapplegpu_g18s.Anthropic cache reporting
Preserve actual prefix-cache reads in both JSON and streaming Messages responses so Claude Code sessions and RSIWatch can report reuse. Chat counts cached tokens inside
prompt_tokens; Messages now splits those into newinput_tokensandcache_read_input_tokenswithout double counting. For example, 100 prompt tokens with 80 reused tokens reports 20 new input tokens and 80 cache reads. Cache creation remains zero because Rec uses automatic local KV-prefix reuse rather than billed cache-creation tiers.Streaming sends the final cumulative usage split in
message_delta, replacing provisional counts frommessage_start. Existing transcripts that recorded zero cache reads cannot be reconstructed by this fix.0.1.0-dev-anthropic-cache; restart Rec to load the updated runtime.Validation
0.1.0-dev-oq3e-cache; verified quant selection, unknown-profile rejection, 262,144-token status and real packaged HTTP generation/cache reuse.Known limitation — keep draft
Independent native-versus-resident parity for the existing optimized mixed-bit path remains unresolved: 72 exact comparisons failed, with maximum absolute logit difference 41. The prior MLX 0.32.0 runtime also reproduced that failure on M6. No tolerances were relaxed. A matched-history audit agreed on the top token at 44/48 positions for new native versus new Rec and 46/48 for old versus new Rec. These are numerical consistency measurements, not task-accuracy results. oQ3e uses native MLX instead of that resident path.