Inference systems · Research feature

QuantStream3D: Geometry-Aligned Low-Bit KV Cache Quantization for Streaming Visual Geometry Transformers

The study evaluates KV quantization in streaming visual geometry transformers, focusing on how precision affects cross-view geometric memory.

Adapted from research by Zunhai Su, Keyu Fan, Ruishan Guo and colleagues.

arXiv preprint revision · 2026-12-01 · Attribution & reuse
In this article
Editorial illustration of optical fibers.

Editor’s introduction

The study evaluates KV quantization in streaming visual geometry transformers, focusing on how precision affects cross-view geometric memory. The framework introduces geometry-guided mixed precision and quantization-aware distillation to preserve sensitive geometric evidence and align computation with quantized history. The evidence demonstrates consistent gains in geometric fidelity across multiple backbones, though KIVI performs best on KITTI’s primary metrics.

Introduction

Feed-forward models now jointly recover camera parameters, depth, and scene structure from images, as exemplified by the Visual Geometry Grounded Transformer (VGGT). Streaming models such as StreamVGGT and STream3R extend this capability to online inference by reusing historical key–value (KV) states as new views arrive. This geometric memory carries cross-view evidence into later predictions, while its growing storage and retrieval costs constrain long-sequence inference and concurrency. Recent efforts address this bottleneck through cache pruning, with InfiniteVGGT and FrameVGGT retaining a compact subset of historical states. Quantization offers a complementary route by reducing the bit width of retained KV states, an approach widely explored in large language models (LLMs). Although XStreamVGGT explores combining pruning with quantization, it focuses primarily on 4-bit KV quantization using LLM-oriented methods. How lower-bit history affects cross-view geometric computation remains insufficiently understood, hindering accurate and efficient KV quantization for streaming geometry.

In this work, we systematically characterize KV quantization across two streaming geometry backbones. Our study spans quantization granularity and bit width, sensitivity across layers, frames, and special tokens, and representation transforms, revealing two linked challenges. Nonuniform Geometric Sensitivity spans representation choices and cache locations: K is not uniformly more sensitive than V, challenging LLM-derived key-priority assumptions. Global attention in layer 14 also forms a shared sensitivity peak across both backbones. Cache–Geometry Mismatch arises when quantized cross-view retrieval alters the features supplied to geometry heads trained with native-precision history. Because streaming inference repeatedly consumes and updates this memory, these perturbations can propagate through later queries, KV writes, camera states, and geometric predictions. Together, these findings motivate selective protection of geometric evidence and joint adaptation of history generation, retrieval, and geometric prediction.

Streaming 3D Geometry

Feed-forward models infer geometry directly from images: DUSt3R predicts point maps, while VGGT jointly estimates cameras, depth, and scene structure. StreamVGGT and STream3R extend feed-forward geometry to causal inference, retaining historical KV states for cross-view reasoning. Recent approaches optimize history through diversity-aware retention (InfiniteVGGT), coherent memory organization (FrameVGGT), spatiotemporal caching (STAC), and pose-guided writes (SceneBound). QVGGT quantizes weights. Most closely related, XStreamVGGT combines cache pruning with LLM-oriented KIVI quantization, evaluating geometric tasks primarily at 4-bit precision. Its released quantization path uses simulated quantization and retains dequantized floating-point KV rather than packed low-bit codes. Ultra-low-bit geometric sensitivity and adaptation to quantized history remain insufficiently addressed. QuantStream3D combines systematic geometric characterization with packed low-bit KV storage and optimized inference kernels.

KV Quantization and Adaptation

KV cache quantization reduces long-context LLM memory costs by storing lower-precision history. KIVI uses per-channel key and per-token value quantization; KVQuant combines per-channel keys, pre-RoPE quantization, and nonuniform formats. Beyond granularity, per-token methods mitigate outliers through Hadamard rotations (QuaRot) or channel reordering and clipping (SKVQ). OScaR addresses token-norm imbalance in per-channel quantization using canalized rotation and token scaling, whereas OSCAR derives attention-aware rotations from covariance statistics. TurboQuant limits reconstruction and inner-product errors through rotated scalar quantization and residual correction. Complementary attention-aware strategies protect salient tokens. For model adaptation, LLM-QAT uses teacher-generated training data, while NVFP4 QAD distills a higher-precision teacher. Streaming geometry requires preserving cross-view evidence and adapting geometric computation to quantized history. QuantStream3D couples geometry-guided KV quantization with Geometry-Aligned QAD, jointly adapting transformer blocks and geometry heads using quantized history generated by the student.

Quantization Granularity and K/V Precision

We compare four K/V granularities in both backbones using affine round-to-nearest quantization with groups of 64, without protection or transforms. Both K and V use 2 bits, isolating granularity in this challenging low-bit regime. Per-channel K/V improves trajectory estimation over per-token K/V in both backbones (Tab. 1). On StreamVGGT, KCVC also yields lower trajectory error than the LLM-oriented asymmetric KCVT layout adopted by KIVI. Given its strong overall performance, we use KCVC for subsequent analyses unless noted otherwise.

Fixing KCVC, we compare K4V4, K4V2, K2V4, and K2V2 to isolate bit-width and K/V sensitivity. Without protection or transforms, 4-bit caching is comparatively robust, whereas 2-bit caching can substantially increase geometric error (Tab. 1). The relative ranking of K4V2 and K2V4 reverses across geometric outputs and backbones. The key-priority tendency reported in LLM studies does not consistently transfer: K is not uniformly more precision-sensitive than V in streaming geometry.

Takeaways. • Quantization granularity. Per-channel K/V is a strong overall choice across the evaluated tasks and backbones. • Bit-width sensitivity. Unprotected 4-bit caching is comparatively robust; 2-bit caching can incur large geometric errors. • K/V sensitivity. K is not consistently more sensitive than V.

Layer, Frame, and Token Sensitivity

To examine historical roles and special-token sensitivity, we separately restore all tokens in the first frame, camera tokens across history, or register tokens across history to native precision under otherwise 2-bit caching. First-frame protection lowers translational and rotational relative pose errors in both backbones. Camera- and register-token protection can also improve geometric outputs, but their benefits vary across backbones and metrics (Sec. A.1).

Takeaways. • Layer sensitivity. Global attention in layer 14 is a shared sensitivity peak across both backbones. • Frame sensitivity. First-frame protection yields repeatable gains in both backbones. • Token sensitivity. Camera and register tokens can benefit from protection, with gains that vary across geometric outputs.

Quantization Transforms

Transformation-based methods reshape activation distributions to ease low-bit quantization. QuaRot and RotateKV redistribute channel outliers through orthogonal mixing. SmoothQuant rescales activations with compensating weight transforms, while QServe applies reciprocal Q/K scaling through SmoothAttention. We examine whether these benefits transfer to streaming geometry.

Under unprotected 2-bit caching, we compare paired Q/K Hadamard rotation, V-only rotation, their combination, and fixed SmoothQuant-style channel scaling. Paired Q/K rotation reduces all three TUM trajectory errors in both backbones. V rotation can improve individual outputs, but adding it to Q/K rotation increases all three STream3R trajectory errors. Fixed channel scaling likewise offers no consistent benefit across tasks and backbones (Sec. A.2).

Takeaways. • Q/K rotation. Paired Hadamard rotation yields repeatable gains under 2-bit quantization. • Value rotation. V rotation can help, with gains that depend on the backbone and accompanying transforms. • Channel scaling. Fixed channel scaling does not yield consistent gains across the tested settings.

Fused Execution with Packed KV

We fuse the Q/K Hadamard transforms in a shared launch after normalization and RoPE, leaving V unrotated. Current-frame attention uses native-precision K/V, so each layer stages its writes after the FFN and defers packing until the backbone finishes. Before geometry prediction, one launch per layer jointly performs per-channel min–max reduction, affine quantization, and bit packing for current K/V, while earlier history stays packed (Appendix C).

Experimental Setup

We evaluate QuantStream3D on depth estimation (Sintel, KITTI, and Bonn), camera pose estimation (TUM RGB-D), and 3D reconstruction (NeuralRGBD), using StreamVGGT and STream3R. We report three primary metrics per benchmark, totaling 15 per backbone. We compare against the KV-quantization components of KIVI and QuaRot at 2 bits, using affine RTN while keeping weights and other activations at native precision. Baseline configurations and evaluation protocols are detailed in Sec. D.1. We adapt each backbone for 2,000 updates using ten-view clips from MVS-Synth and the PointOdyssey training split. Each adapted checkpoint is shared across all five benchmarks; pruning experiments reuse the adapted StreamVGGT weights. Training details appear in Sec. B.4.

Conclusion

We systematically characterized low-bit KV quantization in streaming geometry, revealing the need to preserve cross-view evidence and align geometric computation with quantized history. Guided by these findings, QuantStream3D couples geometry-guided mixed precision with Geometry-Aligned QAD. Extensive evaluations demonstrate strong geometric accuracy with predominantly 2-bit history, further compression beyond native pruning, and substantial memory savings and inference gains, providing a practical foundation for efficient streaming 3D perception.

Propagation into Geometric Predictions

The bound follows from the triangle inequality and recursive substitution, with empty products equal to one. Each product bounds the influence of an earlier perturbation through subsequent updates, including camera-state recurrence. It does not prescribe a monotonic trend in geometric prediction error.

Fused Reads and Paired Writes

Q and K share a rotation launch after normalization and 2D RoPE; V remains unrotated. Each layer stages current K/V after its FFN. Once the backbone completes, one paired encoder launch per layer performs per-channel range reduction, affine quantization, and bit packing before geometry prediction. Each program processes K or V independently within the shared launch, while previously packed history is reused.

Kernel Organization and Numerical Agreement

For the configuration in Tab. S4, Q/K are FP32 and V is BF16 before the original BF16 SDPA autocast. Correctness is checked against unfused reference operations under the same quantization policy. Eight cases cross 65/1,004 tokens, 2/4 bits, and random/constant values, all with noncontiguous inputs; 65 tokens also test an incomplete 64-token group. The encoders produce identical packed codes, FP32 affine parameters, and physical bytes, while paired Q/K rotation matches the reference transform. Three history cases verify identical attention operands, SDPA outputs, and current-write payloads. These checks establish agreement with the quantized reference on the tested paths.

Runtime checks additionally cover prediction shapes, FP32 output dtypes, and request resets. For batched inference, image encoding, transformer blocks, and attention are batched, while camera, depth, and point heads retain their original per-request execution shapes. Each request maintains separate KV and camera state. Complete-inference measurements and kernel cost attribution are reported in Appendix E.

Evaluation Protocol and Baselines

Pruning comparisons preserve each method’s native selection schedule: InfiniteVGGT selects before attention and XStreamVGGT after attention, while FrameVGGT uses its geometry-based selector with a 65,536-token capacity. Both the pruning-only and QuantStream3D configurations disable XStreamVGGT’s original KV quantization.

Additional Benchmark Results and QAD Ablations

We extend the standalone comparison to Sintel and KITTI for both backbones (Tab. S6). On Sintel, QuantStream3D leads the quantized baselines on all three primary metrics for both backbones, while StreamVGGT surpasses Original on all seven reported metrics. On KITTI, it again achieves the best quantized primary metrics for STream3R, including lower RMSE than Original. StreamVGGT also improves all three primary KITTI metrics over Original, although KIVI leads the quantized methods on these metrics.

Complete-Inference Measurements

We profile complete StreamVGGT inference on one NVIDIA H20 with fixed pretrained weights, original SDPA, BF16 autocast, and the original FP32 output format. One full-workload warm-up precedes three measured rounds. Timing runs from inference-API entry until all outputs are CPU-ready, excluding preprocessing, host-to-device transfer, and disk serialization. These profiles isolate backend execution; geometric accuracy is evaluated with the adapted checkpoints. At batch size one, each round processes eight sequential 90-view TUM requests (720 views) under a 60-GiB allocator budget (Tab. S9). Allocated and reserved memory peaks cover the measured rounds; persistent KV storage counts each allocation once, including metadata and padding. Peak allocation also includes weights, decoded operands, activations, workspaces, and camera state, so KV compression need not produce proportional peak-memory savings.

Kernel Cost Attribution

We profile synthetic StreamVGGT tensors on one H20 using PyTorch 2.8.0, CUDA 12.8, and Triton 3.4.0. Inputs have one request, 16 heads, head dimension 64, and 1,004 current-view tokens. Q/K are FP32 and V is BF16, with original SDPA under BF16 autocast. Global attention in layer 0 uses 36 or 89 historical frames, with the first protected at 4 bits and others at 2; layer 14 uses 36 all-4-bit frames. The timed pipeline covers 64-dimensional Hadamard Q/K rotation, history reconstruction with current-K/V appending, original SDPA, and current K/V encoding at fixed history lengths. Each control disables history-read fusion, Q/K pairing, or K/V pairing individually while holding inputs and precision fixed. Separate K/V encoding retains fused range reduction, rounding, and packing within each operand, isolating the effect of pairing. After JIT compilation, Q/K rotation and K/V encoding use 12 warm-ups and 30 calls per round; history reads and the pipeline use five warm-ups and 15 calls. Five interleaved rounds randomize variant order, using synchronized CUDA-event timing that includes format validation and allocation. Numerical agreement is documented in Sec. C.2.

Targeted Mechanism Ablations

All four policies therefore have identical final KV bytes within each sequence, although intermediate cache sizes and peak memory may differ. Protecting layer 14 improves all three TUM trajectory metrics for either protected frame (Tab. S12). On NeuralRGBD, the preferred protected frame for completeness reverses between layers 13 and 14. Precision locations thus interact: allocating the same number of bits at different positions changes geometric accuracy.

Adapted variants share initialization, teacher, losses, data order, optimizer schedule, cache policy, and 2,000 updates. Geometry-head adaptation updates the camera, depth, and point heads; transformer-block adaptation updates complete frame- and global-attention blocks, including FFNs and normalization. Joint adaptation updates both; the image encoder and seed tokens remain frozen. All variants generate their own quantized histories under the same graph boundaries.

Joint adaptation leads all three NeuralRGBD metrics (Tab. S13), supporting adaptation of both history processing and geometric prediction. Transformer-block adaptation alone gives the lowest TUM translation errors, and geometry-head adaptation alone the lowest rotational RPE. These results complement the local correction-capacity analysis in Sec. B.3.