Skip to content

Admit dense JANGH down banks in named mmap - #20

Merged
jjang-ai merged 1 commit into
mainfrom
fix/jangh-dense-bank-admission
Oct 6, 2026
Merged

jjang-ai merged 1 commit into
mainfrom
fix/jangh-dense-bank-admission

Conversation

@jjang-ai

@jjang-ai jjang-ai commented Oct 6, 2026

Copy link
Copy Markdown

Mixed dense JANGH bundles name down-projection banks model.layers.N.mlp.down_proj.tq2_*. The named mmap API rejected these names even when their packed data and scales already satisfied the bank contract, preventing the actual model from loading. Admit this specific namespace only for a one-expert leading dimension, retaining rank, dtype, byte-size, layer bounds, registration and ownership checks. Routed-bank admission is unchanged.

Validation on local M5 Max2: the rebuilt native C++ library passed a Swift C-API regression covering packed/scales ownership, layer advice, release, and malformed-name/shape rejection. The real Diplodocus mixed bundle then loaded and completed eight native BatchEngine generations including two tool/result continuations and a fresh SSD-coordinator replay. Added equivalent C++ regression coverage; that C++ test runner has not been executed separately.

This change makes no claim about whole-model Python/Swift numerical parity, speed parity, or low resident footprint; those remain separate runtime qualifications.

@jjang-ai

jjang-ai commented Oct 6, 2026

Copy link
Copy Markdown
Author

SOURCE EVIDENCE: head 93682f62865df3a4077835fb3a8bbb022715770b, mlx/io/safetensors.cpp: the production file SHA256 2850ac10cc17662b981b6ba57be0b73fe4965c10d1dbfb14d9064ed3fe36bf0f matches the source captured before the local qualification build. Dense admission is restricted to canonical down banks with leading dimension 1; existing routed validation remains intact.

LIVE EVIDENCE: local Max2 Release build plus the C-API regression JANGHDenseNamedMmapTests.testDenseNamesRetainMappedOwnershipAndRejectInvalidBanks passed. It checks both packed and scale mappings, exact tracked-byte accounting, layer/expert advice, owner release, invalid namespaces, malformed layer IDs, wrong leading dimension/dtype/size. The real mixed bundle also loaded and completed eight native BatchEngine generations with natural stops, 38.8–41.3 tok/s, and a fresh-coordinator SSD restore matching 1,038 tokens; paged RAM stayed off. Local receipts: diplodocus-flash-runtime-20261005/qualification/test3.log, behavior-001-receipt.json, and per-turn JSON.

The equivalent newly added C++ test-runner case has not been executed separately. Whole-model numerical parity and Osaurus consumption are tracked separately; this merge claims only the bounded named-map loader correction.

@jjang-ai
jjang-ai merged commit 6d72771 into main Oct 6, 2026
7 of 8 checks passed
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.

1 participant