Residual Vector Quantization: 2D Codebook Cascade
Interactive 2D counterpart to the 3D residual-vector-quantization simulator: watch the real coarse-to-fine RVQ cascade plotted directly in its native 2D feature plane, one scatter panel per codebook level, alongside a live rate-distortion chart and scrolling token grid — every codeword, softmax probability and residual computed independently from scratch, not reprojected from the 3D rings.
This is a genuine, independently-computed 2D counterpart to the 3D residual-vector-quantization simulator behind AI music generators like MusicGen. Instead of orbiting spheres on a 3D ring, it plots the real coarse-to-fine RVQ cascade directly in its native 2D feature plane: one scatter panel per codebook level, each dot sized by its live softmax selection probability, with the residual vector's algebra — e_k = e_{k-1} − C_k[chosen] — traced frame by frame. A rate-distortion chart tracks the average residual magnitude after each level, and a scrolling token grid mirrors the resulting autoregressive token stream. Every codeword, probability and residual on this page is computed from scratch by this script (verified numerically against a reference implementation before shipping) — nothing is reprojected from the 3D scene.
Interactive 2D counterpart to the 3D residual-vector-quantization simulator: watch the real coarse-to-fine RVQ cascade plotted directly in its native 2D feature plane, one scatter panel per codebook level, alongside a live rate-distortion chart and scrolling token grid — every codeword, softmax probability and residual computed independently from scratch, not reprojected from the 3D rings.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install