Repository navigation
Releases
Qwegn v0.48.2
Patch release delivering HyperStream & speculative-decoding performance optimizations across Apple Silicon M1–M6 (0-ULP deferred GDN state replay, 128-GPR HC/AQ/MoE specialization unlocked on both M5+ and M1/M2, 0 B-spill HQ4_G32 GEMV across M1–M6, Apple9 96-GPR tier + Metal 3.2 QSA simdgroup_half8x8 MMA + 65K two-stage radix top-K, pipelined greedy DFlash-2 + on-device GPU PLE hashing), offline qwg export-taps with canonical tap == numLayers capture, .pkg SHVQ LUT bundling, FC 242 MoE softcap deduplication, and Wave P1–P2 host/loader/door-planner convergence.
Performance Gains (5-Sample Paired Interleaved A/B, --kv-mode q4 --no-profile, 0 Steady Allocs)
Native Apple M5 Max (40-Core Apple10 NAX, 128 GiB UMA) — Pre-Wave 2 Baseline (c81fca67) vs v0.48.2
| Model / Workload | Baseline | v0.48.2 |
Paired Ratio (±MAD) | Gain | SHA-256 Parity |
|---|---|---|---|---|---|
Qwen4-35B-A3B-QWP_4 (code_edit, d=3 hybrid, --strict) |
206.99 tok/s | 324.43 tok/s | 1.608× ±0.052 | +60.8% | Exact |
Qwen4-35B-A3B-QWP_4 (code_edit, w=8 ngram, --strict) |
206.79 tok/s | 318.13 tok/s | 1.564× ±0.016 | +56.4% | Exact |
Qwen4-35B-A3B-QWP_4 (code_edit, d=0 serial, --strict) |
108.69 tok/s | 136.12 tok/s | 1.235× ±0.026 | +23.5% | Exact |
Qwen4-35B-A3B-QWP_4 (novel, d=3 hybrid) |
127.95 tok/s | 165.37 tok/s | 1.287× ±0.025 | +28.7% | 1-ULP tie* |
Qwen3.8-Flash-Next-QWP-Mixed + DFlash-2 (w=8 k=16) |
62.08 tok/s | 94.98 tok/s | 1.533× ±0.012 | +53.3% | Exact |
Qwen3.8-Flash-Next-QWP-Mixed + DFlash-2 (w=8 k=1) |
61.13 tok/s | 93.29 tok/s | 1.520× ±0.029 | +52.0% | Exact |
Qwen3.8-27B-QWP_4 + DFlash-2 (w=8 k=1) |
55.98 tok/s | 61.28 tok/s | 1.082× ±0.065 | +8.2% | Exact |
GigaChat4-37B-A4B-QWP_4 + DFlash-2 (w=8 k=1) |
90.69 tok/s | 96.18 tok/s | 1.074× ±0.098 | +7.4% | Exact |
Qwen3.8-Flash-Next-QWP-Mixed (d=1 ngram, M=2 HQ4_G32 fix) |
89.21 tok/s | 89.38 tok/s | 1.015× ±0.0003 | +1.5% | Exact |
Qwen4-35B-A3B-QWP_4 r=8 verify GPU latency dropped from ~30.1 ms (pre-Wave 2) to 19.01 ms med (Wave 2) and 17.61 ms med (17.33 ms min) in v0.48.2 (+6.58% ±1.03% Wave 2 to Wave 3 direct gain on d=3 hybrid to 343.31 tok/s, and 339.05 tok/s post-M1/M2 non-regression check 1.0042× ±0.0058). novel reflects a single 1-ULP FP32 tie-break between simd_sum (fast1_body) and simd_shuffle_xor (mr_body).
Apple M1/M2 (.staticM1M2, Simulated applegpu_g13g + kernel_m3.metallib, --strict) — 128-GPR Unlock & HQ4_G32 Zero-Spill
| Model / Workload | Pre-Fix (.staticM1M2 on lowGPR) |
v0.48.2 (128-GPR + 0 B HQ4_G32) |
Paired Ratio (±MAD) | Gain | SHA-256 Parity |
|---|---|---|---|---|---|
Qwen4-35B-A3B-QWP_4 (code_edit, w=8 ngram) |
179.78 tok/s | 293.36 tok/s | 1.701× ±0.006 | +70.1% | Exact |
Qwen4-35B-A3B-QWP_4 (code_edit, d=3 hybrid) |
197.98 tok/s | 329.84 tok/s | 1.671× ±0.008 | +67.1% | Exact |
Qwen4-35B-A3B-QWP_4 (code_edit, d=0 serial) |
99.35 tok/s | 122.16 tok/s | 1.237× ±0.016 | +23.7% | Exact |
Offline metal-tt on applegpu_g13g/applegpu_g14s also verified 0 B inner-loop stack spills across qwg_gemv_q4g_f32_v4 (#m2: 128r/176sp -> 72r/0sp, #m4: 128r/192sp -> 104r/0sp), _am#m4 (128r/160sp -> 100r/0sp), and _am2 (128r/160sp -> 68r/0sp).
Added
- HyperStream 0-ULP Deferred GDN State Replay (
qwgdn_f32.metal,QWGDNF32.swift,FNGPUWeights.swift,FNGPUScratch+Budget.swift,FNGPULayer.swift,FNGPUDecodeStack.swift,FNGPUSession.swift,FNPrefixCache*.swift,FNGPUBatchScheduler.swift,Scripts/agx_codegen_ceilings.json,Qwen4Wave2ParityTests.swift):- Eliminated intermediate
[VH, DK, DK]GDN state-ring DRAM writes during2..8-row speculative verification (503 MB -> 63 MBonQwen4-35B-A3Batr=8,0 BAGX stack spill across M1–M6,qwg_gdn_recurrent_rows_f32ceiling93 -> 96in same 96-GPR granule) by logging only per-row(k, delta, exp(g))rank-1 vectors into a double-buffered2×12-row replay log and writingS_endonce. - On partial draft rejection,
rollbackVerifyRowstracks the accepted log prefix for exact0-ULP (#pragma clang fp contract(off) reassociate(off)) in-register replay on the next step, fusingT=1drain, single-S_midbank flips whenpending + (T - 1) > 12, and explicitR=0materialization beforeT>8prefill, prefix-cache save, andFNGPUBatchSchedulerslot sync (+6.58% ±1.03%onQwen4d=3 hybridvs Wave 2,r=8GPU median19.01 -> 17.61 ms/ min17.33 ms,100%SHA-256 bit-exact acrossQwen4&Flash-Next).
- Eliminated intermediate
- Qwen4 / HyperStream Wave 2 Speculative & Multi-Row Verify Unblock (
qwhc_aq.metal,qw_dequant_multi_b.metalh,qw_dequant_f32.metalh,qw_gemm_f32_common.metalh,qw_moe_f32_common.metalh,qw_moe_compact_hq_aq.metal,qwple.metal,qwdflash_capture.metal,QWGemmF32.swift,QWGemmMoE+CompactQWP.swift,QWMoEOperator.swift,FNGPUHCEncoders.swift,FNGPUPLEEncoders.swift,FNGPUScratch+Budget.swift,FNGPUHead.swift,FNGPUDecodeStack.swift,FNGPUPrefillStack.swift,FNGPUDFlash.swift,QWDFlashDrafter*.swift,DriverPrefill.swift,DriverDecode.swift,MTPVerification.swift,QwgExportTaps.swift,Scripts/agx_codegen_ceilings.json,Scripts/kernel_inventory.json,Qwen4Wave2ParityTests.swift):128-GPR (!QW_LOW_GPR) Fast HC Mixers, AQ GEMV, and MoE Specialization: Restored zero-barrier in-registerqwg_hc_{norm_down_inject,up_mix_h32}_aq_f32_fast1_body(grid.y = rowssingle-dispatch forrows = 1..8on.gpr128Max,4.4×faster HC atT = 8), fastActSliceAQ GEMV (m1), parallel single-x-load 4-row AQ GEMV (m4), and register-residentActSlice#m1MoE paths on!QW_LOW_GPR, while preserving0 B-spillQW_LOW_GPRpaths across M1–M6 (g13g–g17s+M6).- Concurrent
<= 4-Rowf32_v4/f32_v4_amChunking & Direct CompactQWP Grid: Chunkedrows > 4inencodeHQ4F32V4andencodeHQ4F32V4Argmaxinto concurrent<= 4-row zero-spill#m4/#m2/#m1passes (removing redundantrows4_m8helpers), replaced same-encoderdispatchThreadgroups(indirectBuffer:)inQWGemmMoE+CompactQWP.swiftwith direct upper-bounded host grids (min(experts, pairs)), tightenedcanCompactQWP.f32dnAccchecks, and fixedFNGPUScratch.MemoryBudgetqsaVerifyLayersto include DFlash. - Pipelined Greedy DFlash & On-Device GPU PLE Hashing: Added
qwg_ple_ngram_row_idson-device 64-bit n-gram hashing (bit-exact with CPUwriteRowIds, zero host PLE waits when GPU-resident while preserving--stream-ngramsSSD overlap), fused greedy unconstrained DFlash proposal (encodePropose) + verify across pipelined[0, 1, 8, 40]decodeCuts(forwardRowsFusedWithDFlash, zero host wait between DFlash and verify), tiledqwg_dflash_capture_{target,hc}_hiddenacross256threads/TG ([[threads_per_threadgroup]]), and trimmed redundant pre/post capture barriers. - Canonical
tap == numLayersCapture: WidenedQWTapCaptureSink,QWDFlashDrafter, andqwg export-taps --layersto0...layerBound, capturingFNGPUHead.mixedHidden(post-hyper_connection_mixer) onQWHyperStreamRuntime(encodeMixerOnly/encodeCaptureMixedTaps) and post-finalNormln1/normalizedonQWEngineDriveruniformly withQWInkling2Runtimewithout altering existing0..<numLayersdrafters.
- Qwen4 / HyperStream Wave 1 Spill Elimination &
65KQSA Two-Stage Radix Top-K (qw_dequant_f32.metalh,qwdflash.metal,qwqsa.metal,qwrouter.metal,QWQSACacheState.swift,QWQSAEncoders.swift,FNGPULayer.swift,FNGPULayer+Batch.swift,FNGPUScratch+Budget.swift,FNGPUHead.swift,FNGPUDFlash.swift,Scripts/agx_codegen_ceilings.json,Scripts/kernel_inventory.json,QWKernelInventory.swift,Qwen4Wave1ParityTests.swift):- Stacked Wave 1 improvements atop
perf/m4-hyperstream-decode(df606b38): eliminated remaining offlinemetal-ttstack spills in#m4qwg_gemv_q4g_f32_v4(336–752 -> 0 Bong15g–g17s) and_am, andqwg_dflash_rmsnorm(80 -> 0 B), and unionedqwrouter.metalQWRUnionScratch(6164 -> 5960 Btgmem). - Added dynamic
tgmemonqwg_qsa_scores(16384 -> 0 Bstatic) + 2-stage 8-partition register-resident radix top-K (qwg_qsa_topk_part_radix&qwg_qsa_topk_merge_radix,32–37r/0spacross M1–M5). - Removed the redundant GDN
inProjBA/qkvbuffer barrier inFNGPULayer.swift, wired fusedFNGPUHeadencodeFnHCNormDownInjectDecode(..., hc: 0), and enabledskipGreedyLogitson greedy unconstrained DFlash verify (FNGPUDFlash.swift).
- Stacked Wave 1 improvements atop
- Banner PLE Residency Telemetry (
FNPLEBackingMode,FNGPUPLEEncoders.swift,QWEngineReport.swift,QWHyperStreamRuntime*.swift,QWModelBackend.swift,QWHardwareInfo.swift,QWHardwareInfoTests.swift): Surfaced the resolved PLE backing mode (GPU shared (UMA zero-copy),CPU mmap stream, orCPU pread stream) and GPU byte footprint in the headlessQWServerstartup banner viapleResidencyNotewhenever PLE layers are present. - Wave P1.1 HAL Intrinsics & M6 AGX Codegen Coverage (
QWHal.swift,QWHal+Diagnostics.swift,Scripts/check_metallib_target.py,QWHALTests.swift): AddedQWRegisterBudgetTier(.staticM1M2,.gpr96Proviaapplegpu_g17p,.gpr128Max),QWDeviceCaps.architectureName(withQW_SIMULATE_GPU_ARCHoverride),QWDeviceCaps.slcBudgetBytes(forGPUCores:)(6/12/24/48 MiBtiers), architecture-keyedreferenceBandwidth(applegpu_g17sfallback-safe),fallbackGPUCores = 16,arch=... regTier=... slcMiB=...PSO diagnostic header fields, and optionalM6_AGX_ARCHS(applegpu_g18{g,p,s,d}at27.0) offline codegen validation. - **Apple9 (
M3/M4) ...
Qwegn v0.48.1
Patch release adding automatic poisoned MTLCommandQueue fault recovery and QW_CMD_BUFFER_DIAG=1 encoder diagnostics across QWHyperStreamRuntime, QWEngineDriver (DriverBatchDecode, QWStandardTrunkExecutor, MTP guard fallbacks), speculative drafters (DFlash/DSpine, ECHO, DSpark, QWMTPDraftChain), and QWInkling2Runtime, wiring 128 GiB HyperStream prefill scratch eviction and PLE live-memory admission, deferring streaming HTTP 200 OK headers with atomic QWSSESession.cancelPreStartIfUnstarted() pre-start cancellation so prefill failures return HTTP JSON errors (with named mid-stream event: error frames without trailing data: [DONE]), filtering server auto-discovery through supported primary models (QWServerConfigurationResolver.swift), restoring HyperStream ple: true layer-kind validation, unifying hybrid HQ8_G32 onto interleaved Block_AQ8_G32 with fail-loud planar rejection, enforcing the macOS 26.2 NAX runtime OS floor with dynamic HCA SLC chunking, and completing Wave P0 architecture/code hygiene.
Changed
- Wave P0 Architecture & Code Hygiene (
QWHead.swift,QWHead+BF16.swift,QWLayerKernel.swift,QWGemmF32.swift,QWMTPBatchedMLP.swift): Removed all 8 throw-onlyHyperStreamPLELayerKernelBasestubs (QWQSALayerKernels.swift), collapsedQWHeadWeightintotypealias QWHeadWeight = QWWeightView, cleaned the dead|| trueexpression inQWGemmF32.selectDenseSGBm(preserving thev0.47.0DIRECT_STOREBM=64default), and removed the redundant!weight.isSHVQ/minSimdRowsbranch inQWMTPBatchedMLP.encodeProjection.
Fixed
- Server Auto-Discovery Supported-Model Filter (
QWServerConfigurationResolver.swift): Filtered fallback model discovery through$0.supportedusing the configuredmodelsDirso alphabetically earlierDFlash2/DSpinedrafter packs or unsupported folders cannot hijack primary-model auto-discovery. - HyperStream
ple: trueLayer-Kind Validation (QWHyperStreamRuntime.swift,QWLayerKernel.swift): ReplacedQWLayerKernelRegistry.resolve(plan:)inQWHyperStreamRuntime.initwithQWHyperStreamRuntime.validateLayerKinds(plan:)after commit394b4c02removed unusedple: truestubs fromQWLayerKernelRegistry, restoring model loading for PLE-equipped packs (Qwen3.8-Flash-Next,Qwen4-35B-A3B) while keeping(ple=...)explicit in missing-kernel errors. - Command-Queue Poison Recovery,
QW_CMD_BUFFER_DIAG=1, HyperStream 128 GiB Scratch Eviction & Deferred SSE Error Framing (QWHal+CommandQueueRecovery.swift,QWHal.swift,QWHyperStreamRuntime.swift,QWHyperStreamRuntime+Seam.swift,FNGPUDecodeStack.swift,FNGPUPrefillStack.swift,FNGPUBatchScheduler+Drive.swift,QWEngineDriver.swift,DriverDiagnostics.swift,DriverDecode.swift,DriverPrefill.swift,DriverBatchDecode.swift,QWStandardTrunkExecutor.swift,MTPVerification*.swift,QWDFlashDrafter*.swift,QWDSparkDrafter*.swift,QWEchoDraftEncoder.swift,QWMTPDraftChain.swift,QWInkling2*.swift,QWSSESession.swift,QWHttpServer+{ChatCompletions,Completions,Anthropic,Responses,OllamaChat,OllamaGenerate}.swift,FNGPUPLEEncoders.swift,QWQSAEncoders.swift,FNGPUHCEncoders.swift,check_metallib_target.py):- Detected
MTLCommandBufferErrorDomain/IOGPUCommandQueueErrorDomainqueue faults acrossQWHyperStreamRuntime,QWEngineDriver(DriverBatchDecode,QWStandardTrunkExecutor, async/MTP verification commits and guard fallbacks,DriverDecisionEval,QWActivationTracer, weight conversion), speculative drafters (DFlash/DSpine,ECHO,DSpark,QWMTPDraftChain), andQWInkling2Runtime(including Wavefront, DSpark, DFlash, Echo, and prefix-cache paths), automatically replacing poisonedMTLCommandQueueinstances, re-priming residency, enablingMTLCommandBufferDescriptor.errorOptions = .encoderExecutionStatusdiagnostics (QW_CMD_BUFFER_DIAG=1or post-fault viahal.makeCommandBuffer(retained:)), preserving underlying Metal error domains across async/drafter boundaries, and invalidating stale session/KV state so later requests recover instead of failing in~3 ms. - Wired
QWPrefillScratchEvictionPolicy.shouldEvict(wiredEngineBytes:)(>= 75%UMA ceiling on128 GiBhosts) intoQWHyperStreamRuntime(--evict-prefill-scratch auto) instead of hardcodingramGB <= 36.5, and forwardedosReserveGiB+QWLiveDeviceMemorySnapshotSourceintoFNGPUPLETableadmission. - Deferred streaming
HTTP/1.1 200 OKheaders and initial role/message_start/response.createdchunks inQWSSESession.armDeferredBeginuntil first token emission or keepalive firing, added atomicQWSSESession.cancelPreStartIfUnstarted()to prevent pre-start keepalive races so prefill failures return HTTP500/400JSON errors, and updatedQWSSESession.finishWithOpenAIErrorto emit namedevent: errorframes without trailingdata: [DONE]. - Routed additional HyperStream PLE/HC/QSA 256-thread dispatches through
dispatchCheckedThreadgroups/dispatchCheckedThreadsand added core HyperStream QSA/PLE/HC kernels toCRITICAL_KERNELSinScripts/check_metallib_target.py(applegpu_g13g–g16s).
- Detected
- Hybrid
HQ8_G32Convergence & Fail-Loud Planar Rejection (Scripts/quantize/pack.py,QWAdmission.swift,QWQuantTypes.swift,QWCheckpointTensorLoader.swift,QWRuntimeDoorPlanner+Quant.swift): Unifiedpack.py --hybrid-hq8-fromonto interleaved36 BBlock_AQ8_G32(hq8_g32), updatedQWAdmission.hybridModelResidentBytesfrom34 Bto36 Bper 32-element group, removed orphanedQWQuantError.hq8SwitchOffand silentQWRuntimeDoorPlannerhq8_offmisrouting, and enforced explicitQWCheckpointLoaderError.unsupportedLegacyPlanarHQ8rejection for deprecated planarhq8_offplanes. - macOS
26.2NAX Runtime Guard & HCA SLC Chunk Scaling (QWHal.swift,QWHCAAttnOperator+Snapshot.swift): AddedQWDeviceCaps.supportsMetal4OSFloor(ProcessInfo.isOperatingSystemAtLeast(26.2.0)) gatingisMetal4TensorCapableandsupportsMetal4Library, and replaced the hardcoded24 MiBSLC chunking inQWHCAAttnOperator.encodeGroupedWoAwithQWGemm.naxRowChunk.
Qwegn v0.48.0
Minor release adding Day-0 Qwen4 Dense and Qwen4-MoE family support (Qwen4-35B-A3B-QWP_4), generalized GDN/QSA/Hyper-Connections/HyperPLE/YaRN mscale runtime & quantization paths across Apple Silicon M1–M5, QWHyperStreamRuntime & Metal kernel throughput optimizations, chat-template reasoning_effort / <tool_call> decoding harmonization, and M1–M5 dispatch and capability hardening.
Added
- Day-0
Qwen4Dense & MoE Family Support (QWModelDescriptor+Qwen4.swift,QWModelDescriptor+{Capabilities,ConfigEnvelope,Decode,Families,Hybrid}.swift,QWAdmission.swift,QWHyperStreamRuntime.swift,FNGPUWeights.swift,FNPackLoader.swift,QWQSACacheState.swift,QWQSAEncoders.swift,QWGDNF32.swift,QWRopeCPU.swift,qwattn_prep.metal,qwqsa.metal,qwgdn_f32.metal,Scripts/quantize/{pack,pack_ngram,audit_release}.py,Scripts/oracle/emit_pack_identity.py,Tests/QWFlashNextMetalTests/Qwen4Day0OracleTests.swift): Added Day-0 config decoding, capability seams,GDNoutput_gate_type(sigmoid/silu/swish), generalizedQSA/ Hyper-Connections (hc_count/hc_lowrank) / partial-layerHyperPLE(ple_layer_ids), YaRNmscaleRoPE support, HyperStream memory admission pricing (HC projections,index_qk_proj,VQ2PLE tables,indexK/pooled, and MTP KV),--stream-ngrams/--no-stream-ngramsforwarding onqwg index,--source-idprovenance sanitization inpack.py, andQwen4Day0OracleTests(QWP1HQ4_G64+VQ2_G32PLE onQwen4-35B-A3B-QWP_4acrossM1–M5).
Changed
QWHyperStreamRuntime& Metal Kernel Throughput Optimizations (FNGPUDecodeStack.swift,QWGDNPrefill.swift,QWHyperStreamRuntime+Seam.swift,QWAdaptiveDraftPolicy.swift,FNGPUSession+Speculative.swift,FNGPUHead.swift,FNGPUMTP.swift,QWGemmF32.swift,qw_gemm_f32_common.metalh,qwhc_aq.metal): Added early GPU PLE cut flush,.concurrentGDN prefill barriers, quarter-SIMD AQ HC up-mix (nBlocks <= 8 && realHC == 4, keepingR = 512untouched), division-free 4-way unrolled RMSNorm, optional skipping of unused full-vocab DRAM logit writes during greedy decode/verify, and calibrated sparse-MoEactiveScale < 0.85MTP acceptance priors +QWAdaptiveDraftPolicy.neuralDepthCapchain capping (withQWG_MTP_CHAINenv override), liftingQwen4-35B-A3B-QWP_4(d=3) to192.89–196.48 tok/s(+5.46tok/s max overQwen3.6-35B-A3B-QWP_4) and improvingQwen3.8-Flash-Next-QWP-Mixed(d=3) from84.07–85.33to88.98–88.99 tok/swith bit-exact parity.
Fixed
- Chat Template
enable_thinking/reasoning_effortHarmonization & Special Tool-Envelope Token Decoding (QWChatTemplate.swift,QWChatPolicyResolver.swift,QWServerSchema.swift,QWChatTurnPreparer.swift,QWEngineLifecycleActor+Chat.swift,qwg.swift,QwgReplAndServe.swift): Added structuralQWChatTemplate.supportedReasoningEffortsdetection andnormalizeReasoningEffort(..., supportedEfforts:)mapping (e.g."medium"→"high"for('xhigh','high','low','off')templates) while omittingreasoning_effortwhen thinking is disabled, and preserved active tool-envelope special token IDs (<tool_call>/</tool_call>) inChatStreamCapturewhenhasActiveToolsis true. - M1–M5 QSA Dispatch Guards & HyperStream Fail-Closed Safety (
QWQSAEncoders.swift,QWQSACacheState.swift,FNGPULayer.swift,FNGPUWeights.swift,FNPrefixCache.swift,QWHyperStreamRuntime.swift,DriverStartup.swift,QWModelCapabilities.swift,QWModelDescriptor+Qwen4.swift,Scripts/verify_m_family.sh): Added PSO threadgroup ceiling guards (effectiveMaxThreadsPerThreadgroup+dispatchCheckedThreadgroups) onqwg_index_prep,qwg_index_pool, andqwg_qsa_scores_mat, aligned NAXout16attention output checks inFNGPULayer.swift, eliminated force-unwraps and added explicit dimension guards inFNGPUWeights.swift/QWQSACacheState.swift, resolvedFNPrefixCacheindex head dim from recorded KV geometry, fixedcomputeEchoPromptLogprobsgreedy logit write inQWHyperStreamRuntime.swift, rejected non-HyperStream packs declaring QSA or HyperPLE inDriverStartup.swift, exposed.ropeYaRNwhenyarnRopeConfig != nilinQWModelCapabilities.swift, and wiredQWFlashNextMetalTestsacross allapple7/apple8/apple9simulation passes inScripts/verify_m_family.sh.
Qwegn v0.47.4
Patch release restoring M2 / Apple8 sparse-MoE NextN speculative verification throughput and B >= 2 batch coalescing via a register-resident 512-thread GDN verify kernel, fused zero-allocation verify argmax across .f16/.bf16/quantized heads with finite-logit rejection, and deterministic QWSpeculationBackoff, alongside BSD pgrep preflight and internal release runbook fixes.
Fixed
- M2 /
Apple8Sparse-MoENextNBatch Coalescing, 512-ThreadGDNVerify Kernel, Fused Verify Argmax & Deterministic Speculative Backoff (DriverBatchDecode.swift,DriverDecode.swift,EngineSession.swift,QWEngineSessionState.swift,QWGreedyGenerationLoop.swift,QWEngineDriver+Init.swift,QWRuntimeDoorPlanner*.swift,QWGDNDecode.swift,qwgdn_decode*.{metal,metalh},QWHead+BF16.swift,qwhead*.metal,qwgemm_shvq_dense.metal,QWVerifyWindow.swift,MTPVerification*.swift,check_metallib_target.py,kernel_inventory.json,QWKernelInventory.swift, fixes #3):- Kept concurrent
B >= 2sparse-MoENextNdecoding coalesced (allowsSpeculativeBatch) while keepingDFlash/DSparkMoE dropping to solo atB == 2, validated all batched head token readbacks against0..<geometry.vocabbefore session/KV mutation, and gated batched greedy argmax onsoftcap == 0 || QWHead.supportsStage1SoftcapArgmax(headStorage). - Added register-resident 512-thread
qwg_gdn_recurrent_rows_k4forApple8speculative verification (hd == 128), sharing suffix-stability helpers inqwgdn_decode_types.metalhwith0 Bspill acrossApple7–Apple9(g13g–g16s). - Enabled zero-logit-allocation fused verify argmax (
QWHead.encodeBatchedGreedyArgmaxwith symmetric FWHT32 input restoration on.f16/.bf16) for unconstrained greedy rounds, rejected non-finite (NaN/±Inf) logits with-1across batched and single-row (Q4G/AQ/SHVQ/MTP) fused GEMV argmax paths,DriverBatchDecode/EncodeKernels+HeadAndEmbed/encodeGreedyQ4gchecked (rejectNonFinite: true) fallbacks, andqwg_head_argmax_fin_variationalwhile preservingqwg_head_argmax/qwg_head_argmax_softcapIEEEtotalOrder(so-Infconstraint masks keep ranking strictly below finite tokens) and preserving non-finite values acrossqw_head_softcap(.bf16) andqwg_head_softcap_f32, retainedhead_f16_*for.bf16doors, and prewarmed batched head/argmax/_m16/SHVQ pipelines. - Added session-snapshotted integer-threshold
QWSpeculationBackoff(neuralDraftBackoff) recording non-PLD neural acceptance oncommitPreparedVerificationand decrementing on serial and batched decode steps, while letting zero-cost PLD/canonical drafts run through cooldown acrosscanRunSpeculativeRound,prepareAsyncNeuralDraft, andproposeHybridRound.
- Kept concurrent
- Preflight BSD
pgrepCo-Runner Regex, Engine-Lock Detection & Internal Skill Runbooks (Scripts/preflight.sh,Scripts/test_sdlc_scripts.py,.agents/skills/{qwegine-sdlc-and-architecture,qwegine-inference-qa-and-sampling,qwegine-release}/SKILL.md): Replaced BSD-incompatible\swith[[:space:]]inScripts/preflight.sh(detectingqwg serve/runon custom ports,xctest, andqwegn_gymtraining while excludingqwg-smc-helper), added live.qwg/qwg-engine.lockPID checking to--require-quiet-gpu, and updated internal SDLC, inference QA, and release skills with sibling-conversation timer coordination, three-space drafter vocabulary rules, and asynchronousgh run rerunattempt polling.
Qwegn v0.47.3
Patch release separating DFlash 2 and DSpine physical codebook rows, target sampling vocabulary, and sliced/unpadded candidate bounds across QWHyperStreamRuntime, QWEngineDriver, and QWInkling2Runtime, while hardening constrained speculative verification, stop/budget rollback, single-slot drafter batch isolation, and conv_kernel_size == 0 layer residual progression.
Fixed
- Cross-Model
DFlash 2/DSpineVocabulary Separation, Constrained Speculation & Multi-Slot Isolation (qwdflash_selector.metal,qwdflash_mla.metal,QWDFlashDrafter+{Capture,Propose,Stochastic,DSpine,MLA}.swift,QWDFlashConfig.swift,QWDFlashFootprint.swift,FNGPUDFlash.swift,FNGPUSession+Speculative.swift,QWHyperStreamRuntime*.swift,FNPrefixCache*.swift,FNGPUBatchScheduler+Drive.swift,MTPVerification+Hybrid.swift,QWInkling2Runtime*.swift,QWServerConfigurationResolver*.swift,QWServerLogger.swift,specs/08-agentic-speculation-and-radix-scheduling.md): Separated physical codebook rows (codebookVocab), ambient target sampling vocabulary (distributionVocab), and sliced/unpadded candidate bounds (scoreVocab) acrossQWDFlashDrafter,selectStochastic,selectDSpineStochastic, andqwg_dflash_selector_greedy(buffer(13)), resolving stochasticQWMTP protocol: Gumbel proposal does not match the reserved roundfailures under sliced draft heads (98,304vs248,320onQwen3.8-Flash-NextandQWG_DRAFT_VOCAB) and padded vocabularies (unpadded_vocab_sizeonInkling-2) while preservinganchorToken >= scoreVocabcodebook lookups and clampingencodeStagePropindices to physicalembedTablerows; wireddraftVocabandtargetVocabintoQWEngineDriver; enforced row-by-rowQWTokenConstraintverification (greedyHead: false) onQWInkling2RuntimeDFlash 2and dynamic serial/cooldown/DSpark fallback after unconstrained<think>prefixes; enforcedstopIDsandremainingMaxNewtruncation with exact draft-row rollback onQWHyperStreamRuntime(FNGPUDFlashandFNGPUMTP), preservedQWMTPRandomStreamstochastic verification on canonical and.ngramrounds while keeping GPUQWVariationalAcceptancefast paths on unconstrained greedy rounds, and isolated single-slotQWDFlashDrafter(sessionSlotCount: 1) from multi-slot batch prefill/decode/cache paths; wiredconv_kernel_size == 0layer residual and norm progression across GQA and non-sandwich MLADFlash 2drafters (mode == 3), sliced.bf16heads inencodeSlicedHeadLogits, generalizedadjustedPerTokenKVBytesfromQWModelDescriptor, validatedconv_kernel_size(0or2) andcontext_input_normwhile lifting the393,216vocab cap; recorded load-phase breakdown timings onQWHyperStreamRuntimeandQWInkling2Runtime; inferredmtpBackend/mtpDraftsfrom--dflash-draft-pack; and eliminated duplicateqwg.logwrites for preformatted child lines inQWServerLogger.logChildOutputLine.
Qwegn v0.47.2
Patch release calibrating Scripts/check_metallib_target.py AGX register/spill ceilings across Xcode 26.6 (macos-26) and Xcode 27.2 toolchains while fixing an out-of-bounds uLatOut test allocation (QWMLAAttnOperatorTests), packaging all v0.47.1 cross-family Metal kernel speedups, Cognitive Vault v2 recall, and security hardening.
Fixed
- Cross-Toolchain Xcode 26.x AGX Ceiling Calibration & Violation Aggregation (
Scripts/check_metallib_target.py,Scripts/test_sdlc_scripts.py): Addeddetect_xcode_major()andeffective_ceiling(...)so Xcode 27+ enforces exact per-kernel(temp_regs, spill_bytes, tgmem_bytes)ceilings while Xcode 26.x (macos-26Xcode 26.6) retains exacttgmembounds with bounded register/spill headroom (min(128, max_r + 16)regs,max(max_spill * 2, 1024)spill, resolvingapplegpu_g15gqwg_moe_route_decode27r/16spillvs26r/48spill), and collected all violations across all four passes before raising. - MLA NAX
h32Parity Test Allocation (Tests/QWAttnTests/QWMLAAttnOperatorTests.swift): Allocated fullrows * qHeads * rank(512) instead ofrows * qHeads * halfRank(256) foruLatOutintestSparseAttnNAXH32BitExactMatchesH16AcrossKVModes, eliminating intermittentkIOGPUCommandBufferCallbackErrorPageFaultcrashes from trailing writes past the 16 KiB VM page boundary.
Cumulative Highlights Since Previous Public Release (v0.47.0 -> v0.47.2)
- Eliminated or shrank AGX register spills across M1–M5 Metal 3.2 & NAX/SHVQ/AQ/GDN/MLA/HCA/QSA/MBSA/Vision kernels (enforcing
0 Bspill across51+9m1critical AGX kernels), delivering quiet-GPU simulated M2 (apple8) decode speedups of+11.81%(Qwen3.8-Flash-Next-QWP-Mixed, bit-exact),+6.84%(GigaChat4-37B-A4B-QWP_4,+2.83%prefill),+5.23%(ERNIE-5.5-Flash-Preview-QWP-Mixed-Fast,+4.37%prefill), and+2.58%(Inkling-2-Mini-QWP-Mixed-Fast, bit-exact) with0regressions on M5 Max and0steady-state allocations across all 80 measured invocations. - Verified
6/6flagshipllmprobeconformance at211/211 (100%),100%greedy token fidelity,100.0%top-1 greedy parity (3/3paths identical,KLD mean 0.0000–0.0007), and0server errors (Qwen3.6-35B-A3B,GigaChat4-37B+DFlash2,Qwen3.8-Flash-Next,ERNIE-5.5-Flash,Qwen3.8-27B+DSpine,Inkling-2-Mini). - Shipped Apple9 (
M3/M4) Metal 3.2kernel_m3*.metallibrouting (-mmacosx-version-min=15.0), extension-agnostic Cognitive Vault v2 structural span recall +occurrencesmode,Inkling-2standalone.qwcacheCortex parity, SMC fan helper & HTTP server hardening, and CLI/MenuBar/WebUI knob parity.
Qwegn v0.47.1
Cross-family Metal kernel spill elimination and compatibility release across M1–M5 (Apple7–Apple10), alongside Universal Cognitive Vault v2 structural span recall, Inkling-2 standalone .qwcache Cortex parity, SMC/HTTP security hardening, and CLI/MenuBar/WebUI parity — verified at 211/211 (100%) llmprobe API conformance, 100% greedy token fidelity, and 100.0% top-1 agreement across 6 flagship model packs.
Verified Performance & Quality
Benchmark / Verification (master f358ee6b, quiet GPU) |
Baseline (4708d878 / 3e8fb74f) |
Candidate (f358ee6b) |
Gain / Parity |
|---|---|---|---|
Qwen3.8-Flash-Next-QWP-Mixed (apple8 M2 sim, q4, 2K+64) |
661.1 pre / 50.65 tok/s dec |
655.6 pre / 56.18 tok/s dec |
+11.81% decode (1.1181× ± 0.0182, bit-exact SHA-256, 0 allocs) |
GigaChat4-37B-A4B-QWP_4 (apple8 M2 sim, q4, 2K+64) |
1,178.7 pre / 86.52 tok/s dec |
1,211.5 pre / 92.21 tok/s dec |
+6.84% decode (1.0684× ± 0.0026) · +2.83% prefill (1.0283× ± 0.0050, 0 allocs) |
ERNIE-5.5-Flash-Preview-QWP-Mixed-Fast (apple8 M2 sim, q4, 2K+64) |
315.0 pre / 40.68 tok/s dec |
331.9 pre / 43.14 tok/s dec |
+5.23% decode (1.0523× ± 0.0067) · +4.37% prefill (1.0437×, 0 allocs) |
Inkling-2-Mini-QWP-Mixed-Fast (apple8 M2 sim, q4, 2K+64) |
819.4 pre / 68.16 tok/s dec |
844.5 pre / 68.81 tok/s dec |
+2.58% decode (1.0258× ± 0.0096, bit-exact SHA-256, 0 allocs) |
Native M5 Max non-regression (GigaChat4, Inkling-2, Qwen3.8-27B) |
89.62 / 70.50 / 31.61 dec |
90.93 / 71.44 / 31.38 dec |
0 regressions (all within 1 MAD, 0 allocs) |
llmprobe 6-pack sweep (35B, GigaChat4+DF2, Flash-Next, ERNIE-5.5, 27B+DSpine, Inkling-2) |
211/211 conf · 100% fid (3e8fb74f) |
211/211 (100%) · 100% fid · 0 srv err |
100.0% top-1 greedy parity (3/3 paths identical, KLD mean 0.0000–0.0007) |
Added
- Universal Language- & Format-Agnostic Cognitive Vault v2 Recall & Occurrences Mode (
QWDocumentIngestor.swift,QWMemoryInvertedIndex.swift,QWMemorySymbolGraph.swift,QWMemorySemanticIndex.swift,QWMemoryVault.swift,QWMountedVaultSet*.swift,QWEngineLifecycleActor+VaultV2.swift,QWHttpServer+VaultV2.swift,QWMCPTools+CognitiveAndVault.swift,QwgIndex.swift): Added extension-agnostic structural span segmentation (extractStructuralSpans), persisted"QWGIDX01"span-level Okapi BM25 + exact-identifier + decompounded inverted index (span_index.qidx), universal indented declaration parsing (7,357AST declarations across971files including3,468Swiftfuncs),24 KiBhead/mid/taile-meanssampling, multi-span dense.qvecchunking, query/declaration-centered windowing, non-destructive screening with default fastlocal-onlymode on trusted packs (savingrerank: truefor explicit model reranking), andmode: "occurrences"+path_prefixes/exclude_pathsfilters onqwg_vault_queryand/v1/memory/query(raising 32-query code recall from14/32to30/32, eliminating3/32zero-hit drop-outs, reducing#L1blind header truncation from75%to6.8%, and cutting 32-query replay time from35.0 sto5.43 s). - Standalone
.qwcacheCortex Parity onQWInkling2Runtime(QWInkling2PrefixCache+Save.swift,QWInkling2Runtime+TrunkConformance.swift,QWInkling2Forward.swift,specs/08-agentic-speculation-and-radix-scheduling.md): Implemented atomic0o600binary.qwcache(QWGINK2C) export, validation (geometryDigestV3Hex,kvMode, sliding window,visitKVs,DSpark/DFlash/LSAstate), and shared-base pinning (buildStandalonePrefixCache,mountStandalonePrefixCache, andunmountSharedBasePrefixes()viaremoveSharedBaseEntries()), extending standalone.qwcacheCortex support across all three generative runtimes.
Security
- Privileged SMC Fan Helper Hardening (
QWSMCHelperManager.swift,QWSMCHelperProtocol.swift,QwgFanHelper.swift): Removed unverifiedCommandLine.arguments.firstelevation fallbacks, enforced non-writable regular-file + parent checks (S_ISREG,(st_mode & 0o022) == 0) andSecStaticCodeCheckValidityteam-ID / UID validation before admin elevation or system daemon installation, restricted defaultallowedUIDs == nilUnix-socket peer auth touid 0,geteuid(), or the active console user (SCDynamicStoreCopyConsoleUser), scopedumask(0o117)aroundbind, and replaced blocking single-client socket reads with a250 mspollbudget so the15 swatchdog cannot be starved. - HTTP Server Containment, DNS-Rebinding, Redirect & Log Hardening (
QWHttpServer+Routes.swift,QWHttpServer.swift,QWHttpSecuritySupport.swift,QWHttpIncrementalParser.swift,QWServerLogger.swift,QWModelPullService.swift,QWCli+PullAndQuantize.swift,QWUpdateDownloader.swift,QWEpisodicTranscriptStore.swift,QWHttpServer+Cognitive.swift,QWImageDecodePolicy.swift): Enforced registered pack-path containment (validateRegisteredPackPath) ondecisionModelPackPathanddflashDraftPackPathinPOST /v1/settings; restrictedlogDirupdates to loopback peers with sensitive credential-directory exclusions; created server log files with0o600(O_CLOEXEC); added loopbackHostheader validation (isLoopbackHostHeader, bracketed IPv6-safe) on unauthenticated loopback listeners; tightened HTTP/1.x request-line parsing; enforced.ephemeralURLSessions withwillPerformHTTPRedirectionhost allowlisting across Hub, CLI pull, and Updater downloads; cappedQWEpisodicTranscriptStore/ shadow route JSONL logs at16 MiBwithDarwin.lstatregular-file checks,O_CLOEXEC | O_NOFOLLOW0o600appends, andlimitclamped to1...100; tightenedQWImageDecodePolicy+QWPinnedHTTPResponseParseragainst ASCII control scalars and colonless/whitespace header smuggling with monotonicheaderScanOffset; scopedQWDFlashDrafter+SafeTensorsbuffer reads outside GPU waits; converted manual.lock()/.unlock()in async/concurrent paths (PrefixCache,QWHttpServer,QWEngineLifecycleActor,QWCli+PullAndQuantize,QWModelBackend,QWSMCClient,QWSystemMetricsSampler) tolock.withLock; and synchronized mutable state insideQWChatStreamParser,StreamBlockState, andStreamLogprobBox.
Performance
- Apple10 M5-Family Wave 3 Spill Elimination in MLA
DFlash 2,AQGDNin_proj& CompactSHVQDecode (qwdflash_mla.metal,qwgemm_aq_gdn.metal,qw_moe_compact_shvq_fast.metalh,Scripts/check_metallib_target.py): Unrolled4uchunk/RoPE loops withhalf4context tile registers inqwg_dflash_mla_attn(89r/464B -> 103r/0Bong17g/g17s/g17d,91r/464B -> 96r/32Bong17p,96r/496B -> 104r/0Bong13g); replaced 8 row/group pointers with base + stride offsets and 4-rowmBasechunking inqwg_gemv_aq_gdn_inproj_rows4_m_body(aq3:126r/528B -> 107r/0Bong17g/g17s/g17d,96r/608B -> 96r/48Bong17p;aq4:160B -> 64B); wiredslice_dot_rows4_m1_accintoQW_AQ_SINGLE_ROWqwg_moe_compact_shvq_gateup_impl(shvq15_g64_gateup#srow:96r/32B -> 80r/0Bong17p,102r -> 84rong17g/g17s;shvq4_g32_gateup#srow:96r/32B -> 61r/0Bong17p,99r -> 62rong17g/g17s,112r -> 60rong13g); tightenedM5_CODEGEN_CEILINGS,M5_SINGLE_ROW_KERNELS, andM1_CODEGEN_CEILINGSinScripts/check_metallib_target.py; and verified on idle M5 Max via quiet-GPU paired interleavedABBAacross8/8runs (100%bit-exact SHA-256,0steady allocs,0regressions,GigaChat4-37B-A4B-DFlash2decode121.41 -> 124.71 tok/s+2.71%/+16.67 MAD,ERNIE-5.5-Flashprefill1424.4 -> 1442.8 tok/s+1.25%/+2.05 MAD). - Apple10 M5-Family (
M5/M5 Pro/M5 Max/M5 Ultra) Kernel Spill Elimination, Occupancy-Aware NAXBMSizing & 4×G17Codegen Gates (qwattn_decode_general.metal,qwgdn_prefill.metal,qwdspine.metal,qwgemm_shvq_mlp_gdn.metal,qwgemm_aq_mlp.metal,qw_dequant_multi_b.metalh,qw_quant_traits*.metalh,qw_moe_f32_common.metalh,QWGemmF32.swift,QWGemmAQ.swift,EncodeKernels.swift,QWDFlashDrafter+Quant.swift,QWGemmM2M3UltraTests.swift,Scripts/check_metallib_target.py): Zeroed or cut M5-family (applegpu_g17g/g17p/g17s/g17d) per-thread stack spills acrossqwg_decode_combine_general_row(32 B -> 0 Bvia#pragma unroll+half4packing),qwg_gdn_prefill_solve(1,296 B -> 528 Bviathreadgroupdecay tables within9,344 BTG mem),qwdspine(464–752 B -> 0 B,<= 94regs via 4-candidate chunking + streamedxreads),SHVQ/AQsilu_pair&rows4_mdecode (0 Bspill ong17g/s/d, streamedw=0..3using raw FP16 step-scaledqwg_shvq_unpack_oct8_tg<15>), and MoEgateup_f32_r1_body(16 B -> 0 Bong17psingle-row,544 B -> 48 Bmulti-row viahas_streamed_rows4()+ hoistedQW_AQ_SINGLE_ROW); addedQWGemm.selectDenseNAXBm(BM=32whennTiles * ceil(rows/64) < gpuCores) across all 5 NAX dense dispatchers; addedM5_AGX_ARCHS(g17g/g17p/g17sat26.2, optionalg17dat27.0),M5_CODEGEN_CEILINGS, and96-GPRM5_SINGLE_ROW_KERNELS(FC 238=True) gates inScripts/check_metallib_target.py; and verified on idle M5 Max via quiet-GPU paired interleavedABBA(7/7causal LM packs100%bit-exact SHA-256,0steady allocs,0regressions,GigaChat4decode99.77 -> 101.2 tok/s+0.84%/+6.70 MAD,Qwen3.8-27B-DSpineprefill+2.10%/+2.93 MAD).
Fixed
- **Zero-Spill Vision Flash Attention, M1–M4 QSA Split-K & MBSA Metal 3.2 MMA Prefill (
qwvision.metal,qwattn_sparse.metal,qwattn_sparse_nax.metal,qwattn_mbsa_mma.metal,QWQSAEncoders.swift,QWQSACacheState.swift,QWMBSAAttnOperator.swift,QWNaxKernelRegistry.swift,Scripts/nax_kernels.json,QWKernelInventory.swift, `Scri...
Qwegn v0.47.0
Delivers major cross-family Apple Silicon (M1–M6) performance breakthroughs — double-buffered cross-layer cold MoE prefill prefetch (2.10× on M1 Pro 16 GB, +29–32% cold on M5 Max) with 1024-row cold chunks, 16–32 GB adaptive UMA auto-sizing (2.4×–2.7× out-of-the-box cold MoE decode), zero-spill Metal 3.2 MMA prefill attention/MLA/HCA & qwg_moe_route, BM=64 dense SG prefill GEMMs, rows2 decode tier (M2/M3 Max & UltraFusion), #m1 AQ/SHVQ/MoE PSO specialization, and 16 KiB packed SHVQ4 LUT — alongside strictly-offline WebUI Mermaid diagrams (12 families), offline syntax highlighting, live allowedWorkspaceRoots overrides, and composer Reasoning Effort + Decision Sidecar observability.
Performance Improvements
Workload (q4 KV, paired interleaved ABBA on fresh release binaries) |
Baseline (v0.46.0) |
v0.47.0 |
Gain / Impact |
|---|---|---|---|
Qwen3.6-35B-A3B-QWP_4 (M1 Pro 16 GB, cold MoE 1.6K / 3K prefill) |
172.0–174.9 / 179.2–181.6 tok/s |
363.6–364.4 / 327.1–336.1 tok/s |
2.10× (99.1% GPU util) · 1.85× at 3K (100% SHA-256) |
Qwen3.6-35B-A3B-QWP_4 & GigaChat4-37B-A4B-QWP_4 (M1 Pro 16 GB, out-of-the-box decode) |
5.76 / 2.89 tok/s |
15.57 / 7.00 tok/s |
2.70× (+170.3%) · 2.42× (+142.2%) (Ink2 FAIL -> 13.84) |
GigaChat4-37B-A4B-QWP_4 (M1 Pro 16 GB, cold MoE 1.6K prefill cumulative) |
145.6–145.7 tok/s |
232.0–232.4 tok/s |
+59.4% cumulative (+36.3% prefetch + +12.5% BM=64, 99.7% GPU) |
SenseNova-Loop-9B-QWP_4 (M1 Pro 16 GB, decode / 2K / 4K prefill) |
16.57 / 80.5 / 71.5 tok/s |
18.87 / 100.7 / 91.1 tok/s |
+14.0% dec · +25.1% 2K pre · +27.4% 4K pre (3.8× attn) |
Inkling-2-Mini-QWP-Mixed-Fast (M1 Pro 16 GB, matched-flag decode) |
11.37–11.38 tok/s |
13.79–13.84 tok/s |
+21.5% (88 -> 72 ms/tok, 16 KiB packed SHVQ4 LUT + #m1) |
M5 Max 128 GB cold Qwen3.6 (res=96) & resident non-regression |
3,909–3,932 cold · 6,260–6,313 res |
4,927–5,183 cold · 6,272–6,328 res |
+29–32% cold · 1.00× resident parity (0.00 GiB delta, exact SHA-256) |
Performance
- Apple7–Apple9 (
M1/M2 Max/M3/M3 Max/M3 Ultra/M4)BM=64Dense SG Prefill GEMMs,rows2Decode Tier, UltraFusion48 MiBSLC Chunking, Pre-MoEskipRot32, & Zero-Spillqwg_moe_route(qw_gemm_sg.metalh,qwgemm_sg_*.metal,qwgemm.metal,qwrouter.metal,QWGemmF32.swift,QWGemmAQ.swift,EncodeKernels.swift,QWGemmM2M3UltraTests.swift,QWM2M3UltraDispatchTests.swift):- Upgraded dense simdgroup prefill GEMMs (
qwg_gemm_*_sg,qwg_gemm_*_sg_f32,qwg_gemm_*_sg_gdn_inproj, and fusedqwg_gemm_*_sg_swigluacrossHQ4/AQ/SHVQ) fromBM=32(8 KiB) toBM=64(10 KiB,DIRECT_STOREfor dense/F32 and 2-phase coalescedtg.cepilogue forsplitGdn/SwiGLU) with GPU-core-awareQWGemm.selectDenseSGBm(>= 2TGs/core, scaling cleanly from 10-core M3 to 80-core M3 Ultra), halving weight DRAM reads and dequant ALU during prefill while keeping0 Bstack spill acrossg13g/g14s/g15g/g16s. - Wired the
rows2(0x8000_0000,8rows/TG) middle decode tier inEncodeKernels.selectIncumbentGemvRowsMode(n >= gpuCores * 48on!isMetal4TensorCapable, M5+ untouched) and addedqwg_gemv_q4g_gdn_inproj_rows2_bodyinqwgemm.metal, eliminating theN = 4,096rows4 → rows1cliff on 38-core M2 Max & 40-core M3 Max and theN = 4,096..8,192cliff on 60–80-core M3 Ultra. - Added an UltraFusion
gpuCores >= 56(48 MiB/1024-row) SLC tier inQWGemm.naxRowChunk, unlockedcanSkipPreMoERot32forM1–M4resident MoE prefill (supportsSimdgroupMMA), and eliminated the1,008 B(g13g/g14s) /976 B(g15g/g16s) per-thread stack spill inqwg_moe_route(1,008 B / 976 B → 0 B,19–20regs) via scalar bitmasks and threadgroup scratch. - Verified with
metal-tt(0 Bspill across all 12 kernels × 4 AGX archs),MTL_DEBUG_LAYER=1(0errors,0steady allocs), and paired interleavedABBAon fresh release binaries (100%bit-exact SHA-256 parity): on real M1 Pro 16 GB,GigaChat4-37B-A4B-QWP_41.6K prefill206.5–211.4 → 232.0–232.4 tok/s(+9.9%to+12.5%,99.7%GPU util),SenseNova-Loop-9B-QWP_42K prefill92.6–92.7 → 96.3–100.7 tok/s(+4.0%to+8.7%),Qwen3.6-35B-A3B-QWP_41.6K GPU prefill337.3–363.7 → 372.3–375.2 tok/s; on M5 Max 128 GB, residentQwen3.6(6,260–6,313 → 6,272–6,328 tok/s) andGigaChat4(4,450–4,469 → 4,435–4,448 tok/s) confirmed0regression and bit-exact SHA-256 parity.
- Upgraded dense simdgroup prefill GEMMs (
- Generalized
M1–M6Double-Buffered Cross-Layer Cold MoE Prefill Prefetch &1024-Row Cold Prefill Chunking (DriverColdPrefetch.swift,QWWeightAllocationPlan.swift,DriverTypes.swift,ColdExpertStreamer.swift,DriverWeightLoading*.swift,QWCommandFrame.swift,DriverResidency.swift,DriverPrefill.swift,QWMoELayerKernel.swift,QWScratchArenaBuilder.swift,QWColdPrefillPrefetchTests.swift):- Added a capability-gated ping-pong second cold-expert staging bank (
coldE > 0 && moeLayerCount >= 2;0extra bytes and untouched codepaths when residentcoldE == 0) withPrefillColdPrefetcher, overlapping layerk+1NVMe cold-expert reads on a dedicated background queue behind layerk's unified single-passtileFilter: .allMoE GEMMs + layerk+1's Attention/GDN/Router/SharedExpert command buffer while eliminating mid-layercurCB.waitUntilCompleted()stalls, split double-SiLU dispatches, and redundant per-chunk GPU-to-GPU LRU copies. - Promoted default cold-streaming MoE prefill chunks from
512 → 1024rows when scratch delta<= 192 MiBand resident-expert cost<= 4(respecting explicit user--prefill-chunk-sizeoverrides and leaving resident models unchanged), cutting total NVMe expert passes per long prompt by up to50%. - Verified via paired interleaved
ABBAon fresh release binaries (0steady allocs,0post-freeze PSOs,MTL_DEBUG_LAYER=1PASS,100%bit-exact SHA-256 parity): on real Apple M1 Pro 16 GB,Qwen3.6-35B-A3B-QWP_41.6K prefill172.0–174.9 → 363.6–364.4 tok/swall (2.10×,99.1%GPU util) and 3K prefill179.2–181.6 → 327.1–336.1 tok/swall (1.85×, bit-exact vsbaseat1024),GigaChat4-37B-A4B-QWP_41.6K prefill157.0–159.9 → 215.7–215.9 tok/s(+36.3%,99.8%GPU util) and 3K prefill154.9–156.3 → 197.9–198.0 tok/s(+27.2%,99.9%GPU util); on Apple M5 Max 128 GB, residentQwen3.6(6,315–6,384 → 6,379–6,444 tok/s,21.72 GiB) andGigaChat4(4,194–4,305 → 4,253–4,282 tok/s,21.04 GiB) show0.00 GiBdelta and zero regression, while cold-streamingQwen3.6(res=96) jumps3,909–3,932 → 4,927–5,183 tok/s(+29–32%, bit-exact with resident output).
- Added a capability-gated ping-pong second cold-expert staging bank (
- Apple7–Apple9 (
M1–M4) 16–32 GB Adaptive UMA Auto-Sizing, Zero-Spill MLA/HCA MMA Prefill,#m1SHVQ/MoE Specialization & 16 KiB Packed SHVQ4 LUT (QWCapacityPlan.swift,QWResidencyAdmission.swift,DriverResidency.swift,QWScratchArenaBuilder.swift,QWInkling2Runtime+Admission.swift,qwattn_mla_mma*.metal,qwattn_hca.metal,qwgemm_shvq_*.metal,qw_dequant_shvq.metalh,qw_moe_f32_common.metalh,QWGemmAQ.swift,QWGemmMoE.swift,QWHead*.swift,QWRuntimeDoorPlanner*.swift):- Scaled default OS reserves and live-memory headroom on 16–32 GiB Macs (
4 / 5 / 6 GiBbase reserve;6.25 / 7.5 GiBMoE reserve and2 / 3 GiBheadroom on 16 GB) while keeping>= 64 GiBdefaults unchanged (8 / 16 / 24 GiB), fixingavailable=0.00 GiBresident-expert collapse on cold-streaming MoE packs andmaxFitting=0startup refusal on~10 GiBresident packs on 16 GB Macs. - Eliminated
8,480 Bper-thread stack spills across all 5 Metal 3.2 MLA/DSA/HCA simdgroup MMA prefill kernels (qwg_mla_sparse_attn_mma{,_split},qwg_mla_dsa_sparse_attn_mma{,_split},qwg_hca_attn_mma:8,480 B → 0 Bonapplegpu_g13g) via split 1Doacc0[16]/oacc1[16]accumulators andalways_inline#pragma clang loop unroll(full)helpers. - Extended
QW_FC_AQ_SINGLE_ROW(function_constant(238),#m1) to allSHVQGEMVs,SHVQhead argmax, andHQ4/AQ/SHVQMoEgateup_f32_r1&down_shared_combine_f32decode kernels (eliminating320–688 BMoE stack spills), and switched Metal 3.2 (__METAL_VERSION__ < 400, M1–M4 only; Metal 4 / M5+ untouched)SHVQ4dequantization from the32 KiBkShvqLut4DirectBitsconstant table to the bit-exact16 KiBkShvqLut4PackedU8table (0 / 16,384bit diffs). - Verified on real Apple M1 Pro 16 GB (
100%SHA-256 token parity,0post-freeze PSO misses,0steady allocs,MTL_DEBUG_LAYER=1PASS, and 3K-token out-of-the-box prefill stress PASS): out-of-the-box auto-sizingQwen3.6-35B-A3B-QWP_45.76 → 15.57 tok/s(+170.3%/2.70×,83.3%MTP accept),GigaChat4-37B-A4B-QWP_42.89 → 7.00 tok/s(+142.2%/2.42×),Inkling-2-Mini-QWP-Mixed-FastFAIL → 9.69 tok/s(mtp=3) /13.84 tok/s(mtp=0); paired interleavedABBA(matched flags)Inkling-2-Minidecode11.37–11.38 → 13.79–13.84 tok/s(+21.5%,88 → 72 ms/tok),GigaChat4res=64decode6.58–6.63 → 7.01–7.02 tok/s(+6.2%wall,-14%to-16%acrossSHVQ4GEMVs) and 1.6K prefill145.6–145.7 → 149.4–149.6 tok/s(+2.7%wall /+3.2%GPU,mla.sparse_attn-23%per chunk).
- Scaled default OS reserves and live-memory headroom on 16–32 GiB Macs (
- Apple7–Apple9 (
M1–M4) Zero-Spill MMA Prefill Attention & AQ4/HQ4 Decode Occupancy (qwattn_paged_mma.metal,qwattn_sink_rel_mma.metal,QWAttnPagedPrefillApply.swift,qwgemm_aq*.metal,qwgemm.metal,qw_dequant*.metalh,QWHAL,QWGemmAQ.swift,EncodeKernels.swift):- Eliminated
14,112 B(head_dim=256) and7,968 B(head_dim=128&sink_rel) per-thread stack spills across all 18 Metal 3.2 simdgroup MMA prefill kernels (14,112 B → 0 B,7,968 B → 0 Bonapplegpu_g13g) via ...
- Eliminated
Qwegn v0.46.0
Ships the unified WebUI Models Hugging Face Hub (qwegnai) with per-model download progress, parallel capability-scoped PSO prewarming (~30 s+ -> 1.51–2.04 s cold model load with 0 post-freeze misses), Apple7–Apple9 (M1–M3) threadgroup dispatch fixes (#2) and M1–M4 simdgroup prefill speedups (+3.1% to +9.3%), opt-in QW_DUMP_PSOS=1 / QW_TRACE_ACTIVATIONS=1 diagnostic tracing with bug-reporting guide and skill, standalone qwegnai/GigaChat4-37B-A4B-DFlash2-QWP_4, and standard npx skills MCP packaging.
Performance Improvements
Workload (q4 KV, paired interleaved A/B & live QWServer) |
Baseline (v0.45.0) |
v0.46.0 |
Gain / Impact |
|---|---|---|---|
Cold model load (QWServer parallel prewarm, 0 post-freeze misses) |
~30 s+ serial prewarm |
1.51 s (27B) · 1.78 s (Ink2) · 2.04 s (GigaChat4) |
~15×–20× faster load (0.01 s PSO time, 235/320/238 compiled) |
Inkling-2-Mini-QWP-Mixed-Fast (M1/M2/M4 profiles, prefill & decode) |
835.3–837.4 pre / 80.8 tok/s dec |
911.1–914.7 tok/s pre / 88.5 tok/s dec |
+9.1% to +9.3% prefill (1.0907×–1.0926×) · +9.5% decode |
Qwen3.8-27B-QWP_4 (M1/M2/M4 profiles, prefill) |
244.9–245.0 tok/s |
252.6–255.2 tok/s |
+3.1% to +4.2% prefill (1.0314×–1.0416×, 100% SHA-256 match) |
GigaChat4-37B-A4B-QWP_4 (M1/M2/M4) & native M5 Max non-regression |
1,374.3–1,385.9 / 857.4 / 3,697.9 / 2,839.4 |
1,376.7–1,378.9 / 856.1 / 3,692.3 / 2,851.5 tok/s |
0.994×–1.004× parity · 4/4 multi-turn QWServer QA (B=4, 0 misses) |
Added
- User & Agent Diagnostic Tracing (
QW_DUMP_PSOS=1,QW_TRACE_ACTIVATIONS=1) and Bug-Reporting Guide/Skill (QWHal+Diagnostics.swift,QWActivationTracer.swift,docs/reporting-bugs.md,.github/ISSUE_TEMPLATE/bug_report.md,skills/qwegn-bug-report/SKILL.md):- Added opt-in
QW_DUMP_PSOS=1inQWHALto log startup device/metallib metadata and deterministic per-PSO(name, metallib, maxTPTG, effMaxTPTG, simdWidth, staticTGMem)rows across lazy and prewarmed pipelines. - Added opt-in
QW_TRACE_ACTIVATIONS=1(withQW_TRACE_ACTIVATIONS_STEPSandQW_TRACE_ACTIVATIONS_LAYERSfilters) acrossQWEngineDriver(Dense/HybridMoE/GDN/mHC),QWInkling2Forward, andFNGPUSession(HyperStream) to log per-layer/per-stage(l2, min, max, nan, inf, sha256, first4)fingerprints andlogits_top5for one-round-trip cross-Mac bisection. - Upgraded
.github/ISSUE_TEMPLATE/bug_report.md, addeddocs/reporting-bugs.md(with human and external AI-agent workflows, isolation matrix, sanitization rules, and mandatory confirmation gate), and packaged the installableskills/qwegn-bug-report/SKILL.mdskill.
- Added opt-in
- Pre-Release M1–M4 Cross-Target & Dispatch Hardening Gates (
Scripts/check_metallib_target.py,Scripts/lint_metal_dispatches.py,Scripts/verify_m_family.sh,Makefile,Scripts/ci.sh): Added an offlineapplegpu_g13g/g14s/g15g/g16s(M1–M4) metallib cross-compilation and FlatBuffer__GPU_METADATA(tgmem <= 32 KiBand per-family register pressure) gate with content-addressed.build/metallib_cachestamp caching, a scope-awaredispatch_metallinter enforcingclamped*/effectiveMaxThreadsPerThreadgroup/checked dispatch guards onthreadsPerThreadgroup > 256and dynamic widths, andScripts/verify_m_family.shfor full M1–M4 metallib + Metal debug-layer simulated512-thread Apple8 test verification. qwegnai/GigaChat4-37B-A4B-DFlash2-QWP_4Standalone Hugging Face Release (docs/models.md): Published the standalone456.07 MiB(632.4 Mparams,6.05 bpw,51SHVQ4_G32+119BF16tensors) 5-layer Matrix-Absorbed MLADFlash 2speculative drafter pack to Hugging Face (qwegnai/GigaChat4-37B-A4B-DFlash2-QWP_4), cross-linked it fromqwegnai/GigaChat4-37B-A4B-QWP_4, and updateddocs/models.md.- WebUI
ModelsHugging Face Hub (qwegnai) & Per-Model Download Progress (QWCli,QWServer,QWMenuBar,/ui): Unified the WebUIModelstab (GET /v1/models/hub,POST /v1/models/pull,POST /v1/models/pull/cancel,POST /v1/models/reveal,css/models.css,js/models-hub.js) to list all availableqwegnaiHugging Face repositories alongside locally installed packs; added exact pack byte sizes (QWModelDiskStats//tree/mainaggregation), host UMA fit pills, filter chips (All,Installed,Available,Drafters) and search,HF Card ↗links, native<progress>download bars backed by a cancellable single-flightQWModelPullServicereusingQWCli.pullCheckpoint, pre-flight free disk space checks (409under2 GiBreserve), and a livemodelsDirsetting (~/.qwg/modelsdefault,QWG_MODELS_DIRoverride) acrossQWServerSettings,QWSettingsCoherence, WebUISettings, andQwegn.appSettingsView.
Changed
- M1–M4 (
!isMetal4TensorCapable) Simdgroup Prefill Optimizations (qwgemm_sg_*,qwattn_paged_mma,qwattn_sink_rel_mma,qw_ink2_ctrl_sg_batch,QWMoEOperator,EncodeKernels):- Switched dense
simdgroup_half8x8GEMM, GDNin_proj, SwiGLU (QWSGDenseSwigluMem), and BF16 SG kernels/dispatchers (QWGemmFP,EncodeKernels,QWGemmF32,QWGemmAQ,QWDFlashDrafter,QWBenchKernels) fromBM=64toBM=32, BN=64(8,192 BSRAM,4threadgroups/core, halved accumulator register footprint,2×grid parallelism), with a 2-phase8 KiBepilogue inQWSGSwigluMemfor MoEBM=64. - Tuned Metal 3 attention prefill kernels (
qwattn_paged_mma.metal+ new_hd128{,_q4,_q8}kernels,qwattn_sink_rel_mma.metal) toBM=16single-shared SRAM stages with preloadedQ/ relative-bias fragments (QWAttnPagedPrefillApply,QWAttnSinkRelApply,QWAttnSinkRel+Sparse,QWRuntimeDoorPlanner), cuttingattn.gqaandflashAttnlatency. - Added batched
simdgroup_half8x8Inkling-2 loop controller kernels (qwg_ink2_ctrl_down_sg_batchandqwg_ink2_ctrl_fg_blend_sg_batchinqw_ink2_ctrl_sg_batch.metal, registered inScripts/kernel_inventory.jsonand capability-gated inQWInkling2Forward/QWRuntimeDoorPlanner), cuttingloopResCtrlNorm>2× on M1–M4; also generalizedQWMoEOperator.encodeResidentsmallShNaxAct16shared-expert path tosupportsSimdgroupMMA.
- Switched dense
- Public-Safe Infographic & Doc Path Gate (
qwegine-infographics-and-cards,Scripts/lint_style.py,Scripts/test_sdlc_scripts.py): Enforceddocs/open-source-standards.mdRuleS11inScripts/lint_style.py(make lint) using context-managed file opens to reject leaked host/operator paths acrossassets/,docs/,README.md, andCHANGELOG.md, and updatedqwegine-infographics-and-cardswithS11public-safe naming and multi-series legend spacing rules. - Standard
npx skillsPackaging for Qwegn MCP Skills & ReorganizedREADME.md(skills/,.agents/skills/,.claude-plugin/marketplace.json,Scripts/lint_skills.py,README.md): Flattened the 5 external developer Qwegn MCP skills (qwegn-mcp-setup,qwegn-vault,qwegn-guard,qwegn-compaction-and-episodic,qwegn-orchestrate) andskills/README.mdto top-levelskills/with.claude-plugin/marketplace.jsonsonpx skills add qwegnai/qwegn -gand Claude Code plugin marketplaces discover only the public MCP suite; marked all 9 internal contributor runbooks in.agents/skills/withmetadata.internal: "true"enforced byScripts/lint_skills.pyruleS9; updatedqwegn-mcp-setupto cover both co-resident HTTP/proxy (qwg serve) and standalone stdio (qwg mcp -m d1-2B-bf16) modes; and reorganizedREADME.mdwith a Table of Contents, streamlined Quick Start, servercurlsmoke, and Qwegn MCP + Agent Skills installation and use-case reference.
Fixed
- M1–M6 Runtime Dispatch Guards,
64 * gqaRatioPrefill Fallbacks &qwrouter.metalPartial-SIMD Mask (QWHal+DispatchGuard.swift,QWHal.swift,QWGDN,QWAttn,QWGEMM,QWNorm,QWDFlashDrafter,QWBenchKernels,qwrouter.metal):- Added
QWHalSimulation,MTLComputePipelineState.effectiveMaxThreadsPerThreadgroup(honoringQW_SIMULATE_MAX_TPTGandQWDeviceCaps.probe), fixed under-SIMD/non-power-of-two clamping edge cases inclampedSimdThreadsandclampedPowerOfTwoThreads, and enforced fail-louddispatchCheckedThreadgroups/dispatchCheckedThreadsacross GPU operators andQWBenchKernels. - Fixed
qwg_moe_route_decode(qwrouter.metal) zero-masking out-of-range lanes beforeqwg_route_fwht32_f32whenIS % 256 != 0, correctedQWGDNDecodethreadgroup unit clamping tomax(128, headDim), added64 * gqaRatio <= effectiveMaxThreadsPerThreadgroupguards and Apple7–9 fallback paths acrossQWAttnPagedPrefillApply,QWHybridLayerKernels,QWAttnSinkRelApply,QWInkling2Forward+Attn,QWMBSAAttnOperator,QWAttnDecodeApply,QWMLAAttnOperator,QWNorm+Gated,QWGemmFP+MoE, andQWDFlashDrafter+MLA, and bound non-nil dummy buffers with flag bits for optionalqwgdn_conv/qwgdn_decodeMetal validation underMTL_DEBUG_LAYER=1.
- Added
- Apple7/Apple8 (
M1/M2) Silent Over-Threadgroup Dispatch Drops (#2,QWHal,QWGDN,QWHead,QWGEMM,QWAttn,QWMTP): Clamped>= 512-thread dispatches topso.maxTotalThreadsPerThreadgroupacrossQWGDNDecode,QWGDNF32,QWGemmMoERouter,QWGemmMoE,EncodeKernels,QWHead/QWTokenSelector,QWMTP/QWEcho/QWDSpark, andQWMLAAttnOperator, preventing Apple7/Apple8 static-register pipelines from exceedingmaxTotalThreadsPerThreadgroupand silently executing0threads during decode and--gdn-prefill naive. Madeqwg_gdn_recurrent,qwg_gdn_recurrent_batch,qwg_gdn_recurrent_rows,qwg_gdn_replay_state,qwg_gdn_rollback_rows,qwg_gdn_recurrent_f32,qwg_gdn_recurrent_rows_f32,qwg_head_argmax_fin,qwg_head_argmax_fin_variational, andqwg_mla_absorb_q[_sub2]adapt tothreads_per_threadgroupwith 0-UL...
Qwegn v0.45.0
Ships native GPU stochastic (T > 0) speculative MTP verification with batched Leviathan–Chen rejection sampling, fixes the Apple7–Apple9 (M1/M2/M3) LSA MTLCompilerService compiler crash and threadgroup WAR barrier races (#2), adopts the uniform QWP quantization naming convention (Law 35), and adds the GigaChat4-37B-A4B-QWP_4 12-suite peer evaluation card.
Performance Improvements
Workload (Apple M5 Max, 128 GB UMA, q4 KV, 32K ctx) |
Baseline (v0.44.1) |
v0.45.0 |
Gain / Impact |
|---|---|---|---|
Qwen3.6-35B-A3B-QWP_4 (T=0.6, top_p=0.95, seed=-1, 3 drafts) |
127.37 tok/s |
188.61 tok/s (peak 199.96) |
+48.3% (1.4829× paired median, 89.6% accept, 1.90 tok/rnd) |
Qwen3.8-Flash-Next-QWP-Mixed (T=0.6, --stream-ngrams, 3 drafts) |
76.14 tok/s |
81.92 tok/s |
+3.9% paired median (1.0387×, 79.50 GiB planned, 0 allocs) |
Greedy T=0 non-regression (35B-A3B / 27B+DFlash2 / Flash-Next) |
190.34 / 66.18 / 90.89 tok/s |
186.95 / 63.93 / 90.93 tok/s (1.0028× / 1.0073× / 0.9971×) |
5/5 stdout_sha256 exact match · 27/27 Law 28 QWServer QA |
Added
- Native GPU Stochastic (
T > 0) MTP Speculative Pipeline & Unified Resolution (QWHead,QWMTP,QWEngine,Flash-Next): Added GPU-filteredtop_k/top_pcandidate collection, canonicalPhilox-4x32-10sampling, and batchedB = D+1Leviathan–Chen ((p - q)^+) verification kernels inqwhead_spec_sample.metal+QWTokenSelector(Metal 3.2+,0 Bconstant LUTs); unified stochastic/constrained round resolution and adaptive draft depth (QWSpeculativeRoundResolver,QWAdaptiveDraftPolicy,QWDFlashAdaptivePolicycompatibility alias) acrossQWEngineDriver(MTPVerification+*,QWMTPDraftEncoder,QWEchoDraftEncoder,QWMTPAdaptiveDepth,DriverConfig.decodeAndMTPScratchBytes),QWHyperStreamRuntime(Flash-Next),QWInkling2Runtime, andQWDSparkDrafter, removing synchronous per-draft waits inT > 0speculative rounds and removing obsoleteQWMTPGreedySelector.swiftwhile preserving bit-exactT = 0greedy parity and Law 11 timing guards. qwegnai/GigaChat4-37B-A4B-QWP_4Hugging Face Release, Model Card & 12-Suite Peer Evaluation (assets/,docs/models.md,docs/benchmarks.md,README.md): Published the performance-winningGigaChat4-37B-A4B-QWP_4nativeQWP1pack (20.34 GiB,4.65 bpw,SHVQ4_G32) with its bundled456.07 MiB5-layer Matrix-Absorbed MLADFlash 2drafter (dflash_draft/),assets/qwegn_model_gigachat4_37b_a4b.svg,assets/qwegn_eval_35b_class_comparison.svg, and full 12-suitellmprobe(291/291API,100%37/37capability,67/88agentic,70/100Code-100,45/92Core-92in68.3Ktokens,29/50Hard-50) plus external multi-harness (90.9%/85.4%+HumanEval+,79.4%/66.7%+MBPP+,87.5%IFEval,50.0%GPQA Diamond,66.7%MMLU-Pro,20.0%AIME 2025,86.7%GSM8K,8/8Promptfoo) peer comparison againstQwen3.6-35B-A3B-QWP_4,Apex-35B-V1.0-QWP_4,Maxwell-V1-Flash,Inkling-2-Mini-QWP-Mixed-Fast,Qwen3.8-27B-QWP_4, andQwen3.8-Flash-Next-QWP-Mixed.
Changed
QWPModel Quantization Naming Convention (AGENTS.mdLaw 35,QWServer,QWMTP,docs/,Scripts/): Standardizedqwegnai/*Hugging Face repositories and~/.qwg/models/packs to<Model>-QWP_{4,8,3,2,15,1}for uniform packs and<Model>-QWP-Mixed[-Fast]for mixed-precision packs, with exact plane/group recipes documented in each model card; updatedQWEngineLifecycleActor.canonicalModelFamilyStem,QWDFlashConfig.stripQuantSuffixTokens,QWServerSettings.modelAffinityTokens, docs, and default script paths.- Apple7+ Diagnostic Messaging (
EncodeKernels.swift): Updated the stale GDN in-proj batched GEMM capability error string to"GDN in-proj batched GEMM requires Apple7+ simdgroup or Apple10+ NAX hardware".
Fixed
- Apple7–Apple9 (
M1/M2/M3) LSA Metal Compiler Crash & Threadgroup WAR Races (#2,qwlsa_select.metal,check_metallib_target.py): Replaced the runtime ternarythreadgroup_barrier(useSram ? ... : ...)inlsa_select_blocks_bodywith the compile-time constantthreadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup)to eliminate theMTLCompilerService@llvm.agx2.threadgroup.barrier.with.scopeinstruction-selection crash inqwg_lsa_select_blocksandqwg_lsa_select_finalizeon Apple7–Apple9 GPUs, added the missingthreadgroup_barrier(mem_flags::mem_threadgroup)WAR barriers beforetid == 0resetschosenBin = 1u; greaterAccum = 0u;after radix pass 3 and beforegreaterAccum += chunkTiesinlsa_select_blocks_body(eliminating intermittentQWLSASelectParityTestsfailures), and added constant-barrier static linting plus offlinemetal-tt(applegpu_g13g/applegpu_g14s/applegpu_g15g) regression gates toScripts/check_metallib_target.py. - Relaxed-Margin Stochastic GPU Verify, Arena Accounting & CDF Tail Guard (
MTPVerification+Pipeline.swift,FNGPUSession+Speculative.swift,qwhead_spec_sample.metal): Restricted GPU Leviathan–Chen fast verification (gpuVerifyEligible) toeffectiveRelaxedMargin == 0so relaxed/variational rounds preservereadAsyncDraftProposals; cleared stalesession.mtpDraftandsession.mtpActiveon non-sparse resync overflows inFlash-Next; guardedqw_sample_cdf_tgfallback index via the last positive-probability candidate (lastPos); and accounted forQWMTPDraftEncoder.allocationBytesinsideDriverConfig.decodeAndMTPScratchBytes.