[PR #1549] [MERGED] fix(book): swap inverted MobileNet quantization values + align caption with figure #8257

Closed
opened 2026-04-27 17:36:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1549
Author: @profvjreddi
Created: 4/26/2026
Status: Merged
Merged: 4/26/2026
Merged by: @profvjreddi

Base: devHead: fix/issue-1318-quantization-figure


📝 Commits (1)

  • b970393 fix(book): swap inverted MobileNet quantization values + align caption with figure

📊 Changes

1 file changed (+6 additions, -6 deletions)

View changed files

📝 book/quarto/contents/vol1/optimizations/model_compression.qmd (+6 -6)

📄 Description

Closes #1318.

Summary

Reporter observed that the "Quantization Impact" figure in the Model Compression chapter (@fig-quantization_impact) doesn't match its caption. Inspection revealed two compounding issues.

Issue 1: Inverted MobileNet data

In the original TikZ source, MobileNet_v1's FP32 and INT8 values were swapped in both panels:

Panel Was (broken) Now (fixed)
Inference Time FP32=30 ms / INT8=700 ms FP32=700 ms / INT8=30 ms
Model Size FP32=4 MB / INT8=45 MB FP32=45 MB / INT8=4 MB

The original direction was physically impossible — quantization cannot produce a slower, larger model. The other two models (Inception_v3, ResNet_v2) had the correct direction.

Issue 2: Caption claim ≠ figure data

Even after the swap, the gains vary substantially by architecture (Inception ~1.5–2×, ResNet ~1.85–4.3×, MobileNet ~10–23×), so the original "up to 4 times" claim under-described the figure and contradicted what readers actually see.

Caption rewritten to acknowledge per-architecture variability and the role of mobile-class INT8 hardware in MobileNet's outlier behavior. Body prose updated for consistency.

Test plan

  • Pre-commit hooks all green
  • Spot-check rendered TikZ figure post-merge: all three models should now show FP32 > INT8 (orange segment larger than blue)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1549 **Author:** [@profvjreddi](https://github.com/profvjreddi) **Created:** 4/26/2026 **Status:** ✅ Merged **Merged:** 4/26/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `fix/issue-1318-quantization-figure` --- ### 📝 Commits (1) - [`b970393`](https://github.com/harvard-edge/cs249r_book/commit/b970393d131ef69b3e24dc85f6010a75cd7da562) fix(book): swap inverted MobileNet quantization values + align caption with figure ### 📊 Changes **1 file changed** (+6 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `book/quarto/contents/vol1/optimizations/model_compression.qmd` (+6 -6) </details> ### 📄 Description Closes #1318. ## Summary Reporter observed that the "Quantization Impact" figure in the Model Compression chapter (@fig-quantization_impact) doesn't match its caption. Inspection revealed two compounding issues. ## Issue 1: Inverted MobileNet data In the original TikZ source, MobileNet_v1's FP32 and INT8 values were swapped in **both** panels: | Panel | Was (broken) | Now (fixed) | |---|---|---| | Inference Time | FP32=30 ms / INT8=700 ms | FP32=700 ms / INT8=30 ms | | Model Size | FP32=4 MB / INT8=45 MB | FP32=45 MB / INT8=4 MB | The original direction was physically impossible — quantization cannot produce a *slower*, *larger* model. The other two models (Inception_v3, ResNet_v2) had the correct direction. ## Issue 2: Caption claim ≠ figure data Even after the swap, the gains vary substantially by architecture (Inception ~1.5–2×, ResNet ~1.85–4.3×, MobileNet ~10–23×), so the original "up to 4 times" claim under-described the figure and contradicted what readers actually see. Caption rewritten to acknowledge per-architecture variability and the role of mobile-class INT8 hardware in MobileNet's outlier behavior. Body prose updated for consistency. ## Test plan - [x] Pre-commit hooks all green - [ ] Spot-check rendered TikZ figure post-merge: all three models should now show FP32 > INT8 (orange segment larger than blue) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-27 17:36:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#8257