速度測試
gemma-4-31B-v2-MLX-4bit
M5 Pro 48GB · mlx · mlx-vlm 0.6.3 / mlx 0.32.0.dev20260702+e9463bb (qmv_wide) · int4
jdfelo社群2026年7月3日
解碼
33.4tok/s
預填
251tok/s
首個 token 延遲
596ms
總計
—
峰值 VRAM
34.2GB
上下文長度
2K
KV 深度
—
批次大小
1
功耗
—
驗證
未驗證 — 實驗性結果
已驗證的執行使用標準測試提示詞,並記錄足夠的資料以核對結果。
啟動命令
python3 -m mlx_vlm server --host 127.0.0.1 --port 8080 --model ~/.cache/hf-vlm4 --draft-model mlx-community/gemma-4-31B-it-assistant-bf16 --draft-kind mtp --draft-block-size 4 # + patch_mlx_vlm_fast_verify.py (adds gemma4 speculative_argmax_from_hidden); mlx built from git main for the qmv_wide M>=2 kernel (PR #3764)
Theoretical memory ceiling
Can't estimate a ceiling for speculative decoding runs unless the run reports how many draft tokens were accepted.
模型
- 晶片
- M5 Pro
- 記憶體
- 48 GB
- OS
- macOS
引擎
- 引擎
- mlx
- 版本
- mlx-vlm 0.6.3 / mlx 0.32.0.dev20260702+e9463bb (qmv_wide)
- 量化
- int4
- 後端
- metal
- Spec decode
- 已啟用
- MTP
- 已啟用
執行設定
- 上下文
- 2,048 個 token
- 批次大小
- 1
- 提示詞 token
- 149
- 預填 tok/s
- 250.7 tok/s
- 輸出 token
- 400
- 備註
- Gemma 4 31B (abliterated v2), 4-bit affine gs64 decoder; vision tower + embed/lm_head bf16 per config. MLX MTP speculative decoding via mlx-vlm, official gemma-4-31B-it-assistant drafter, draft-block-size 4 (optimum on this build). Measured on M5 Pro 48GB, macOS 26.5, greedy temp 0. tokSOut = median of 4 timed iterations (range 32.8-35.5), decode throughput over the inter-token window (completion_tokens / (t_last-t_first)) from the OpenAI-compatible stream; ~250-tok code workload, exact usage.completion_tokens. Drafter acceptance ~69.8%, ~3.09 accepted tok/round. Byte-identical to dense greedy (fast-verify patch adds the missing gemma4 speculative_argmax_from_hidden hook: one batched norm->lm_head->softcap over K+1 positions). Speedup vs dense 4-bit (~15 tok/s, ~94% of the 276 GB/s measured-bandwidth ceiling) ~2.2x. peakVramGb is process phys_footprint_peak and includes MLX's Metal buffer cache growing under a 36GB wired limit; true resident weights+drafter+KV ~= 18-20GB (steady footprint 26.5GB). wheel: mlx qmv_wide (PR #3764) built from git main; without it b3 tops out ~24.6 tok/s. Model repo public; base jdfelo/gemma-4-31B-v2 is gated.
已記錄的證據
- 提示詞雜湊(SHA-256)
- —
提示詞樣本—
輸出樣本—
此模型在此硬體上的更多執行
此模型在此硬體上尚無其他已核准的執行。
