Qwen3.8-Flash-Next-metal-experts-4bit-final

This is ArthurZ/Qwen3.8-Flash-Next-metal-experts-4bit with the always-on nn.Linear layers stored pre-quantized (Metal affine 4-bit, group 32, with the per-group clipping search). The expert banks and the n-gram table are unchanged.

It is made by make_final_qwen38_checkpoint.py from the stream-experts benchmark notes. Loading it performs no on-the-fly quantization:

quantized 0 nn.Linear: 4g32c, fused 192 sibling groups
on-the-fly quantization calls: 0

Only the 52 checkpoint files that held the dense bf16 layers are rewritten; the expert and n-gram files are byte-identical to the parent checkpoint.

Why

The parent checkpoint stores ~10.2 GiB of dense weights in bf16 and quantizes them at every load. On a 32 GB Mac the load-time quantization peaks near the Metal working set (lm_head alone can take the process to ~24-26 GB), and it is unnecessary work. With this checkpoint the model occupies ~3.5 GiB of MPS memory after load and needs no quantization pass.

Measured on an M3 Ultra (512 GB) with the Metal allocator capped to a 32 GB-class 24.96 GiB working set, transformers stream-experts @ e6e0218, torch 2.15.0, kernels 0.18.3, expert cache 6 GiB:

Run on-the-fly quantize peak process footprint peak MPS driver correctness
parent checkpoint + chunked quantization 1480 calls 13.81 GiB 12.70 GiB n/a
parent checkpoint, no chunking 1450 calls 24.35 GiB 11.79 GiB n/a
this checkpoint 0 calls 13.82 GiB 10.81 GiB compiled == eager 128/128

The parent run without chunking is the one that hits the 32 GB wall; the final checkpoint never enters that path.

Use

git clone -b stream-experts https://github.com/huggingface/transformers
cd transformers/benchmark_v2/experts_offload
PYTHONPATH=../../src python verify_generate.py ArthurZ/Qwen3.8-Flash-Next-metal-experts-4bit-final 4g32c 6

Use run_qwen38_metal_final.sh in this repository for the 32 GB workarounds (uncached expert reads, streamed embed_tokens, tiled affine_qmm_t, MPS events off). It sets REQUIRE_NO_QUANT=1 and fails if anything is quantized at load.

bash run_qwen38_metal_final.sh 6
Downloads last month
46
Safetensors
Model size
73B params
Tensor type
U32
路
BF16
路
I64
路
F8_E4M3
路
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Model tree for ArthurZ/Qwen3.8-Flash-Next-metal-experts-4bit-final

Finetuned
(1)
this model