论文

MXFP4 与 NVFP4 4-bit 量化对可穿戴动作识别模型的影响对比

What Does 4-Bit Microscaling Cost a Wearable Activity Recognizer?

精选理由

有人在真实可穿戴传感器模型上实测了 MXFP4 和 NVFP4 两种 4-bit 格式,结果 NVFP4 全面占优,还找到了 MXFP4 掉分的具体原因,做端侧部署的可以看看。

研究训练了一个 159,492 参数的 1D CNN,在 Hang-Time HAR 腕部加速度计数据上识别四种篮球动作,采用按玩家分组的五折交叉验证。全精度模型 macro-F1 为 69.26%,TFLite FP16 和 INT8 损失不超过 0.16 个百分点。仅权重量化到 4-bit 时,MXFP4 损失 1.45 点,NVFP4 损失 0.72 点;权重和激活都量化到 4-bit 时,MXFP4 损失 5.14 点,NVFP4 仅 0.75 点,且在全部五折中领先。消融实验显示 MXFP4 的主要损失来自 scale 取整规则:scale 向上取整可恢复 3.18-3.63 点,改用 8-bit 浮点 scale 再增加 0.84-1.20 点。

原文 · arXiv cs.LG

What Does 4-Bit Microscaling Cost a Wearable Activity Recognizer?

Wearable sports sensors can recognize actions on the device itself, where lower-precision numbers reduce model storage and memory traffic. Two 4-bit block-scaled formats, MXFP4 from the Open Compute Project, introduced in 2023, and NVFP4 from NVIDIA, introduced in 2025, are drawing interest. Published evaluations cover general deep-learning benchmarks and large language models; to our knowledge, nobody has yet measured what they cost a small wearable-sensor model. We train a 159,492-parameter 1D CNN to recognize four basketball actions from wrist-accelerometer data in Hang-Time HAR and test it on players it has never seen, using five-fold cross-validation grouped by player. Every comparison between number formats is made fold by fold. In full precision the model reaches 69.26\% macro-F1. Measured TFLite FP16 and INT8 models lose at most 0.16 percentage points. In simulation, 4-bit weights cost 1.45 points with MXFP4 and 0.72 points with NVFP4. When activations are quantized to 4 bits as well, MXFP4 loses 5.14 points and NVFP4 only 0.75, and NVFP4 comes out ahead in all five held-out-player folds. The ranking survives two alternative simulator settings, with NVFP4 leading by 3.49 to 4.40 points. A $2 \times 3$ ablation with 4-bit weights and activations (two block sizes and three scale rules) points to scale selection as the main source of MXFP4's loss. The reference MXFP4 conversion we simulate rounds the scale down, which can pick scales that are too small, so many blocks clip their largest values. Rounding the scale up recovers 3.18 points with 32-value blocks and 3.63 points with 16-value blocks, and switching to an 8-bit floating-point scale, as NVFP4 does, adds another 0.84 and 1.20 points. Block size matters less. Under this round-down rule, 16-value blocks score 0.44 points below 32-value blocks in all five folds; under the other two rules there is no consistent effect.