Problem
Loading Ternary-Bonsai-2-27B PQ2_0 on Metal with GEIST_WEIGHT_MMAP=0 (arena mode) fails with weight arena exhausted at blk.63.attn_output. The arena comes up about 7.7 MB short. The mmap-alias mode loads, and its logits match cpu_neon.
Reproduced on main a99ab7c, M1 Max. Found while checking #464 against ternary models; main and the #464 branch behave the same.
Likely cause (inferred, not verified)
compute_weight_arena_capacity (src/archs/transformer/weight_load/tensor_views.c) adds a second staging copy plus the F32 copy only for small F16/BF16 matrices, plus 64 MB of headroom. Bonsai's 96 BF16 DeltaNet alpha/beta tensors, together with other widened or derived buffers on Metal, appear to exceed that headroom on the 27B.
Expected
The arena capacity counts every buffer the loader derives on this backend, so arena mode loads the model.
Problem
Loading Ternary-Bonsai-2-27B PQ2_0 on Metal with
GEIST_WEIGHT_MMAP=0(arena mode) fails withweight arena exhausted at blk.63.attn_output. The arena comes up about 7.7 MB short. The mmap-alias mode loads, and its logits matchcpu_neon.Reproduced on main a99ab7c, M1 Max. Found while checking #464 against ternary models; main and the #464 branch behave the same.
Likely cause (inferred, not verified)
compute_weight_arena_capacity(src/archs/transformer/weight_load/tensor_views.c) adds a second staging copy plus the F32 copy only for small F16/BF16 matrices, plus 64 MB of headroom. Bonsai's 96 BF16 DeltaNet alpha/beta tensors, together with other widened or derived buffers on Metal, appear to exceed that headroom on the 27B.Expected
The arena capacity counts every buffer the loader derives on this backend, so arena mode loads the model.