zunhai commited on
Commit
e6270e3
·
verified ·
1 Parent(s): b119813

Release verified QuantStream3D STream3R 2k QAD weights

Browse files
LICENSE.txt ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ S-Lab License 1.0
2
+ Copyright 2025 S-Lab
3
+
4
+ Redistribution and use for non-commercial purpose in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
8
+
9
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
10
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12
+
13
+ In the event that redistribution and/or use for commercial purpose in source or binary forms, with or without modification is required, please contact the contributor(s) of the work.
README.md CHANGED
@@ -1,6 +1,96 @@
1
  ---
 
 
2
  license: other
3
  license_name: s-lab-license-1.0
4
- license_link: >-
5
- https://github.com/NIRVANALAN/STream3R/blob/7bdca8cf7ec206ff8b08c0941ad8286d72087d4f/LICENSE
 
 
 
 
 
 
 
 
 
6
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: other
5
  license_name: s-lab-license-1.0
6
+ license_link: https://huggingface.co/zunhai/QuantStream3D-STream3R/blob/main/LICENSE.txt
7
+ library_name: pytorch
8
+ base_model: yslan/STream3R
9
+ tags:
10
+ - quantstream3d
11
+ - streaming-3d
12
+ - visual-geometry
13
+ - kv-cache
14
+ - quantization
15
+ - depth-estimation
16
+ - arxiv:2611.27901
17
  ---
18
+
19
+ # QuantStream3D–STream3R
20
+
21
+ **Geometry-aligned streaming geometry with predominantly 2-bit KV memory.**
22
+
23
+ Adapted STream3R parameters for
24
+ [QuantStream3D: Geometry-Aligned Low-Bit KV Cache Quantization for Streaming Visual Geometry Transformers](https://arxiv.org/abs/2611.27901).
25
+
26
+ **[Code and installation](https://github.com/ZunhaiSu/QuantStream3D) ·
27
+ [Paper](https://arxiv.org/abs/2611.27901) ·
28
+ [Checkpoint guide](https://github.com/ZunhaiSu/QuantStream3D/blob/main/docs/CHECKPOINTS.md)**
29
+
30
+ ## Method
31
+
32
+ QuantStream3D combines **Geometry-Guided Mixed-Precision KV Quantization** with
33
+ **Geometry-Aligned Quantization-Aware Distillation**. Per-channel K/V
34
+ quantization and paired Q/K H64 rotation compress historical global-attention
35
+ states. Ordinary history uses 2 bits; the first frame or global attention in
36
+ layer 14 uses 4 bits. Joint distillation aligns transformer blocks and geometry
37
+ heads with student-generated quantized history.
38
+
39
+ This checkpoint contains **native-precision model weights after 2,000 QAD
40
+ updates**. The 2/4-bit setting applies to the inference KV cache, not to the
41
+ stored model weights. Optimizer state, RNG snapshots, and training logs are
42
+ excluded. Export preserves every tensor value and dtype.
43
+
44
+ ## Use
45
+
46
+ Install QuantStream3D and the STream3R dependencies following the code README.
47
+ Download this repository into a local checkpoint directory, then run:
48
+
49
+ ```bash
50
+ python examples/infer_stream3r.py \
51
+ --upstream third_party/STream3R \
52
+ --checkpoint checkpoints/quantstream3d_stream3r \
53
+ --images data/my_sequence/rgb --backend triton \
54
+ --output outputs/my_sequence.npz
55
+ ```
56
+
57
+ Use `--backend torch` for the packed reference implementation. Triton requires
58
+ Linux and an NVIDIA GPU. The folder example is a demonstration loader; paper
59
+ metrics require the benchmark-specific preprocessing and evaluation protocol.
60
+
61
+ ## Files and integrity
62
+
63
+ - Five safetensors shards and `model.safetensors.index.json`.
64
+ - `recipe.json`: fixed runtime precision and rotation policy.
65
+ - `quantstream3d.json`: model identity, export checks, and per-shard hashes.
66
+ - `SHA256SUMS`: file-integrity manifest.
67
+
68
+ ```bash
69
+ shasum -a 256 -c SHA256SUMS
70
+ ```
71
+
72
+ ## Training and evaluation
73
+
74
+ Adaptation uses chronological ten-view clips from MVS-Synth and
75
+ PointOdyssey-TRAIN, with a frozen original-precision teacher. The paper
76
+ evaluates depth, camera pose, and reconstruction across five benchmarks and
77
+ two backbones. Please see the paper and code for complete results and metric
78
+ definitions; the checkpoint is not a Transformers AutoModel or hosted pipeline.
79
+
80
+ ## License and attribution
81
+
82
+ This model derives from [STream3R](https://huggingface.co/yslan/STream3R) and
83
+ retains the applicable upstream model and component terms in `LICENSE.txt`.
84
+ QuantStream3D code and its StreamVGGT-derived components use CC BY-NC-SA 4.0.
85
+ See the code repository's third-party notices for attribution.
86
+
87
+ ## Citation
88
+
89
+ ```bibtex
90
+ @article{su2026quantstream3d,
91
+ title={QuantStream3D: Geometry-Aligned Low-Bit KV Cache Quantization for Streaming Visual Geometry Transformers},
92
+ author={Su, Zunhai and Fan, Keyu and Guo, Ruishan and Zhou, Zhongzhu and Xu, Jingzehua and Sun, Bohan and Feng, Hansen and Hu, Ruihan and Wu, Yik-Chung and Wong, Ngai},
93
+ journal={arXiv preprint arXiv:2611.27901},
94
+ year={2026}
95
+ }
96
+ ```
SHA256SUMS ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ 14d6386fe24fc2f85f91197d7eab09f10ec818065a2f42690534a9035ed1971c model-00001-of-00005.safetensors
2
+ 5455a25a4a8549ec6b99687c4493aca96e9eed0f5e74263873bf03ada3172165 model-00002-of-00005.safetensors
3
+ 093753e5bf3c67fef1e5cf7721a2338b211c93df122bae8244ad066940f72e2a model-00003-of-00005.safetensors
4
+ 1624e5c8edabdeb864f34c374b77d54ae09b39d69e3c93ce1d330728bf2e8b84 model-00004-of-00005.safetensors
5
+ d1f2d4cd6f0f7bd2b14630b35bf82bf96cbd18e8dbc000e5e8c3e03958a5c772 model-00005-of-00005.safetensors
6
+ 5027c0f372fe9db4d3b3e42602264999a5fd45cb967b70b6752c54e316419ef3 model.safetensors.index.json
7
+ 190705b3a4eb36382946b31e04ebd1fb5c675080f402a7e91f92fc54ede70a44 quantstream3d.json
model-00001-of-00005.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14d6386fe24fc2f85f91197d7eab09f10ec818065a2f42690534a9035ed1971c
3
+ size 1066388240
model-00002-of-00005.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5455a25a4a8549ec6b99687c4493aca96e9eed0f5e74263873bf03ada3172165
3
+ size 1070919608
model-00003-of-00005.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:093753e5bf3c67fef1e5cf7721a2338b211c93df122bae8244ad066940f72e2a
3
+ size 1062530032
model-00004-of-00005.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1624e5c8edabdeb864f34c374b77d54ae09b39d69e3c93ce1d330728bf2e8b84
3
+ size 1041118252
model-00005-of-00005.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1f2d4cd6f0f7bd2b14630b35bf82bf96cbd18e8dbc000e5e8c3e03958a5c772
3
+ size 521587428
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
quantstream3d.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "method": "QuantStream3D",
3
+ "backbone": "stream3r",
4
+ "completed_updates": 2000,
5
+ "policy": "KCVC-GS64-K2V2-First4-GA14_4-QK_H64",
6
+ "source_checkpoint_sha256": "5d8f40029dd2793564897949eb16d151b4c991b1ce688c597ddec17b095e7fdc",
7
+ "tensor_count": 1403,
8
+ "tensor_bytes": 4762384480,
9
+ "weights_dtype_preserved": true,
10
+ "all_exported_tensors_equal_source": true,
11
+ "optimizer_rng_and_private_paths_included": false,
12
+ "files": {
13
+ "model-00001-of-00005.safetensors": {
14
+ "sha256": "14d6386fe24fc2f85f91197d7eab09f10ec818065a2f42690534a9035ed1971c",
15
+ "bytes": 1066388240
16
+ },
17
+ "model-00002-of-00005.safetensors": {
18
+ "sha256": "5455a25a4a8549ec6b99687c4493aca96e9eed0f5e74263873bf03ada3172165",
19
+ "bytes": 1070919608
20
+ },
21
+ "model-00003-of-00005.safetensors": {
22
+ "sha256": "093753e5bf3c67fef1e5cf7721a2338b211c93df122bae8244ad066940f72e2a",
23
+ "bytes": 1062530032
24
+ },
25
+ "model-00004-of-00005.safetensors": {
26
+ "sha256": "1624e5c8edabdeb864f34c374b77d54ae09b39d69e3c93ce1d330728bf2e8b84",
27
+ "bytes": 1041118252
28
+ },
29
+ "model-00005-of-00005.safetensors": {
30
+ "sha256": "d1f2d4cd6f0f7bd2b14630b35bf82bf96cbd18e8dbc000e5e8c3e03958a5c772",
31
+ "bytes": 521587428
32
+ }
33
+ }
34
+ }
recipe.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "STream3R",
3
+ "method": "QuantStream3D",
4
+ "qad_updates": 2000,
5
+ "quantized_scope": "historical global-attention K/V",
6
+ "grouping": "per-channel K and V",
7
+ "group_size": 64,
8
+ "group_axis": "consecutive tokens within each original frame, head, and channel",
9
+ "ordinary_bits": 2,
10
+ "protected_bits": 4,
11
+ "protected_first_frame": true,
12
+ "protected_global_layer_index": 14,
13
+ "protection_rule": "first frame OR protected global layer",
14
+ "paired_qk_rotation": "normalized Sylvester Hadamard, width 64, after Q/K norm and RoPE",
15
+ "rotate_v": false,
16
+ "special_token_exemption": false,
17
+ "quantize_weights": false,
18
+ "quantize_queries": false
19
+ }