Replies: 2 comments
|
How are you testing that? I've also got some oQ quants that I've been curious about. |
0 replies
|
eQ qants are OK, problem is with MTP at bf16 MLX converted model. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Environment
Qwen/Qwen3.8-27B(released 2026-08-14;model_type: qwen3_5,Qwen3_5ForConditionalGeneration, 15mtp.*tensors in HF checkpoint,text_config.mtp_num_hidden_layers = 1,mtp_use_dedicated_embeddings = false)Summary
Lightning MTP produces 0/N acceptance (0.0%) on a bf16 MLX conversion of Qwen3.8-27B, while an oQ8e conversion of the same source checkpoint reaches 71.5% acceptance (tok/cycle 2.55, 35.2 tok/s) on the same machine, same prompt, same oMLX build. MTP-head tensors of both artifacts were verified identical in structure, naming, and norm calibration (means match to 3 decimal places). The only remaining difference between the artifacts is quantization, which points at the non-quantized (bf16) MTP verify path — possibly related to
qwen35_verify_qmmbeing an affine 4/8-bit path (MTP verify qmm patch applied (M=2..6 affine 4/8-bit)), with the bf16 fallback branch broken or untested for this architecture.Reproduction
mlx_vlm.convert --dtype bfloat16from HF checkpoint (sanitize dropsmtp.*), then re-attach the 15 originalmtp.*tensors underlanguage_model.mtp.*(bf16 preserved,mx.eval+ read-back verification), then apply the MLX RMSNorm gamma convention (+1) to all 7 head norms — final means match the oQ8e artifact exactly (see table).Speculative backend: Lightning MTP (model_type=qwen3_5, active)), send a short chat request.Results (same prompt, same build)
MTP head norm means (identical on both artifacts, after +1 convention)
input_layernorm +1.036 · post_attention +1.206 · k_norm +1.779 · q_norm +1.791 · mtp.norm +2.252 · pre_fc_norm_embedding +0.539 · pre_fc_norm_hidden +0.843(raw HF means for reference: +0.036 / +0.206 / +0.780 / +0.791 / +1.252 / −0.461 / −0.157 — i.e. Qwen3.8 ships zero-centered gammas on all seven head norms, including
input_layernormandpre_fc_norm_*, whichnorm_repair.pycurrently assumes are always converted correctly; with a raw re-attached head,repair_legacy_head_normsfixes only a subset — worth noting for the heuristic, though it is not the cause of this issue: the 0% result reproduces with fully corrected norms and repair active or disabled.)Also observed (minor)
mlx_vlm.convertdropsmtp.*tensors for qwen3_5 VLM (expected upstream behavior, mentioned for context).Ask
Could the bf16 (non-qmm) MTP verify branch be checked for qwen3_5 with
mtp_use_dedicated_embeddings=false(Qwen3.8)? Happy to run diagnostics/patches on the bf16 artifact — we keep it as a reference build and can reproduce on demand.All reactions