zunhai commited on
Commit
74e3530
·
verified ·
1 Parent(s): 04bf4f5

Refine model overview, reproducible quick start, results, and attribution

Browse files
Files changed (1) hide show
  1. README.md +52 -37
README.md CHANGED
@@ -16,35 +16,37 @@ tags:
16
 
17
  # QuantStream3D–StreamVGGT
18
 
19
- **Geometry-aligned streaming geometry with predominantly 2-bit KV memory.**
20
 
21
- Adapted StreamVGGT parameters for
22
  [QuantStream3D: Geometry-Aligned Low-Bit KV Cache Quantization for Streaming Visual Geometry Transformers](https://arxiv.org/abs/2611.27901).
 
23
 
24
- **[Code and installation](https://github.com/ZunhaiSu/QuantStream3D) ·
25
- [Paper](https://arxiv.org/abs/2611.27901) ·
26
- [Checkpoint guide](https://github.com/ZunhaiSu/QuantStream3D/blob/main/docs/CHECKPOINTS.md)**
27
 
28
  ## Method
29
 
30
- QuantStream3D combines **Geometry-Guided Mixed-Precision KV Quantization** with
31
- **Geometry-Aligned Quantization-Aware Distillation**. Per-channel K/V
32
- quantization and paired Q/K H64 rotation compress historical global-attention
33
- states. Ordinary history uses 2 bits; the first frame or global attention in
34
- layer 14 uses 4 bits. Joint distillation aligns transformer blocks and geometry
35
- heads with student-generated quantized history.
36
 
37
- This checkpoint contains **native-precision model weights after 2,000 QAD
38
- updates**. The 2/4-bit setting applies to the inference KV cache, not to the
39
- stored model weights. Optimizer state, RNG snapshots, and training logs are
40
- excluded. Export preserves every tensor value and dtype.
41
 
42
- ## Use
43
 
44
- Install QuantStream3D and the StreamVGGT dependencies following the code README.
45
- Download this repository into a local checkpoint directory, then run:
46
 
47
  ```bash
 
 
 
 
 
 
 
 
 
48
  python examples/infer.py \
49
  --upstream third_party/StreamVGGT \
50
  --checkpoint checkpoints/quantstream3d_streamvggt \
@@ -52,35 +54,48 @@ python examples/infer.py \
52
  --output outputs/my_sequence.npz
53
  ```
54
 
55
- Use `--backend torch` for the packed reference implementation. Triton requires
56
- Linux and an NVIDIA GPU. The folder example is a demonstration loader; paper
57
- metrics require the benchmark-specific preprocessing and evaluation protocol.
 
 
 
 
 
 
 
 
58
 
59
- ## Files and integrity
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  - Five safetensors shards and `model.safetensors.index.json`.
62
- - `recipe.json`: fixed runtime precision and rotation policy.
63
- - `quantstream3d.json`: model identity, export checks, and per-shard hashes.
64
- - `SHA256SUMS`: file-integrity manifest.
65
 
66
  ```bash
 
67
  shasum -a 256 -c SHA256SUMS
68
  ```
69
 
70
- ## Training and evaluation
71
-
72
- Adaptation uses chronological ten-view clips from MVS-Synth and
73
- PointOdyssey-TRAIN, with a frozen original-precision teacher. The paper
74
- evaluates depth, camera pose, and reconstruction across five benchmarks and
75
- two backbones. Please see the paper and code for complete results and metric
76
- definitions; the checkpoint is not a Transformers AutoModel or hosted pipeline.
77
-
78
  ## License and attribution
79
 
80
- This model derives from [StreamVGGT](https://huggingface.co/lch01/StreamVGGT) and
81
- retains the applicable upstream model and component terms in `LICENSE.txt`.
82
- QuantStream3D code and its StreamVGGT-derived components use CC BY-NC-SA 4.0.
83
- See the code repository's third-party notices for attribution.
84
 
85
  ## Citation
86
 
 
16
 
17
  # QuantStream3D–StreamVGGT
18
 
19
+ **Streaming 3D perception with predominantly 2-bit KV memory.**
20
 
21
+ Official StreamVGGT checkpoint for
22
  [QuantStream3D: Geometry-Aligned Low-Bit KV Cache Quantization for Streaming Visual Geometry Transformers](https://arxiv.org/abs/2611.27901).
23
+ QuantStream3D preserves sensitive cross-view evidence and aligns geometric computation with quantized history, making low-bit memory useful for streaming depth, camera pose, and 3D reconstruction.
24
 
25
+ **[GitHub](https://github.com/ZunhaiSu/QuantStream3D) · [Paper](https://arxiv.org/abs/2611.27901) · [STream3R checkpoint](https://huggingface.co/zunhai/QuantStream3D-STream3R)**
26
+
27
+ ![QuantStream3D overview](https://raw.githubusercontent.com/ZunhaiSu/QuantStream3D/main/assets/overview.png)
28
 
29
  ## Method
30
 
31
+ - **Geometry-Guided Mixed-Precision KV Quantization** combines per-channel K/V quantization with paired Q/K Hadamard rotation. Ordinary historical global-attention states use 2 bits; writes from the first frame **or** global attention in layer 14 use 4 bits.
32
+ - **Geometry-Aligned Quantization-Aware Distillation** jointly adapts transformer blocks and geometry heads on student-generated quantized history. This checkpoint uses 2,000 updates with chronological ten-view clips from MVS-Synth and PointOdyssey-TRAIN.
 
 
 
 
33
 
34
+ **The 2/4-bit setting describes the runtime KV cache. Model weights retain their native precision.** This release contains the complete adapted model in five safetensors shards, totaling approximately 5.03 GB.
 
 
 
35
 
36
+ ## Quick start
37
 
38
+ Install a CUDA-compatible PyTorch build, then set up the code and upstream backbone:
 
39
 
40
  ```bash
41
+ git clone https://github.com/ZunhaiSu/QuantStream3D.git
42
+ cd QuantStream3D
43
+ python -m pip install -e '.[cuda,weights]'
44
+
45
+ git clone https://github.com/wzzheng/StreamVGGT.git third_party/StreamVGGT
46
+ git -C third_party/StreamVGGT checkout 05682bcb05683c4c71522e9cb618fc8ca349063c
47
+ # Install the upstream dependencies following its README.
48
+
49
+ python scripts/download_checkpoint.py --model streamvggt
50
  python examples/infer.py \
51
  --upstream third_party/StreamVGGT \
52
  --checkpoint checkpoints/quantstream3d_streamvggt \
 
54
  --output outputs/my_sequence.npz
55
  ```
56
 
57
+ Use a directory of chronologically named RGB images. The result contains camera, depth, confidence, and 3D point predictions. Export a colored point cloud with:
58
+
59
+ ```bash
60
+ python examples/export_pointcloud.py \
61
+ --predictions outputs/my_sequence.npz --images data/my_sequence/rgb \
62
+ --output outputs/my_sequence.ply
63
+ ```
64
+
65
+ Triton requires Linux and an NVIDIA CUDA GPU; `--backend torch` selects the packed reference implementation. See [compatibility](https://github.com/ZunhaiSu/QuantStream3D/blob/main/docs/COMPATIBILITY.md) for supported workflows and [evaluation](https://github.com/ZunhaiSu/QuantStream3D/blob/main/docs/EVALUATION.md) for benchmark preprocessing.
66
+
67
+ ## Representative results
68
 
69
+ The paper evaluates two backbones across five benchmarks. Selected results for **StreamVGGT** are shown below; lower is better and distances are in meters.
70
+
71
+ | Method | TUM ATE ↓ | NeuralRGBD accuracy ↓ | NeuralRGBD completeness ↓ |
72
+ |:--|--:|--:|--:|
73
+ | Original | 0.0269 | 0.084 | 0.079 |
74
+ | KIVI | 0.0493 | 0.096 | 0.089 |
75
+ | QuaRot | 0.0509 | 0.091 | 0.083 |
76
+ | **QuantStream3D** | **0.0264** | **0.074** | **0.066** |
77
+
78
+ KIVI and QuaRot use their 2-bit KV-quantization components; QuantStream3D uses the mixed 2/4-bit policy and adapted weights. See the [paper](https://arxiv.org/abs/2611.27901) for full results, baseline settings, and post-pruning compression.
79
+
80
+ The optimized StreamVGGT backend achieves **5.05× physical KV compression** and **23.1% lower complete-inference time at batch size 1** in the paper’s H20 setup. Efficiency is measured separately with matched pretrained weights; see the [profiling protocol](https://github.com/ZunhaiSu/QuantStream3D/blob/main/docs/PROFILING.md) for timing and memory boundaries.
81
+
82
+ ## Files and verification
83
+
84
+ The download helper pins a verified model revision and checks file sizes and SHA256 digests. The release includes:
85
 
86
  - Five safetensors shards and `model.safetensors.index.json`.
87
+ - `recipe.json` and `quantstream3d.json` for the runtime policy and model metadata.
88
+ - `SHA256SUMS` for manual integrity verification.
 
89
 
90
  ```bash
91
+ cd checkpoints/quantstream3d_streamvggt
92
  shasum -a 256 -c SHA256SUMS
93
  ```
94
 
 
 
 
 
 
 
 
 
95
  ## License and attribution
96
 
97
+ These adapted weights are distributed under **CC BY-NC-SA 4.0**. They are based on [StreamVGGT](https://huggingface.co/lch01/StreamVGGT); applicable upstream model and component terms remain in effect. See the [full license](https://huggingface.co/zunhai/QuantStream3D-StreamVGGT/blob/main/LICENSE.txt).
98
+ Code and component-specific terms are documented in [third-party notices](https://github.com/ZunhaiSu/QuantStream3D/blob/main/THIRD_PARTY_NOTICES.md).
 
 
99
 
100
  ## Citation
101