seedpack 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {seedpack-0.2.0/seedpack.egg-info → seedpack-0.2.2}/PKG-INFO +4 -2
- {seedpack-0.2.0 → seedpack-0.2.2}/README.md +119 -102
- {seedpack-0.2.0 → seedpack-0.2.2}/README_PYPI.md +72 -70
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/__init__.py +1 -1
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/bf16v2.py +251 -55
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/cli.py +493 -413
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/codecs_gguf.py +37 -4
- seedpack-0.2.2/seedpack/container.py +298 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/gpu2.py +12 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/gpuquant.py +29 -4
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/qr.py +20 -5
- seedpack-0.2.2/seedpack/repo3.py +2054 -0
- {seedpack-0.2.0 → seedpack-0.2.2/seedpack.egg-info}/PKG-INFO +4 -2
- seedpack-0.2.0/seedpack/container.py +0 -107
- seedpack-0.2.0/seedpack/repo3.py +0 -1060
- {seedpack-0.2.0 → seedpack-0.2.2}/LICENSE +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/NOTICE +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/pyproject.toml +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/__main__.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/bf16codec.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/bundle.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/LICENSE +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/build.sh +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/export.c +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/ggml-alloc.h +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/ggml-backend.h +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/ggml-common.h +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/ggml-cpu/ggml-cpu-impl.h +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/ggml-cpu.h +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/ggml-impl.h +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/ggml-quants.c +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/ggml-quants.h +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/ggml.h +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/gguf.h +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/iqtables.npz +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/stubs.c +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ggml/variants/ggml-quants.pre-f95b0d9539.c +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/gguf_reader.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/gpu3.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/gpu_bf16.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/gpu_codec.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/ptxfix.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/rans.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/refcodec.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/repo.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/repo2.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/requant.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack/seed.py +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack.egg-info/SOURCES.txt +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack.egg-info/dependency_links.txt +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack.egg-info/entry_points.txt +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack.egg-info/requires.txt +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/seedpack.egg-info/top_level.txt +0 -0
- {seedpack-0.2.0 → seedpack-0.2.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seedpack
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Lossless GPU archiver for GGUF model repositories: the BF16 model and all its quants in one archive about the size of a single compressed BF16 file
|
|
5
5
|
Author: NeuroSquad
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -57,6 +57,8 @@ Dynamic: license-file
|
|
|
57
57
|
|
|
58
58
|
The archive is smaller than the repository's largest single quant (UD-Q8_K_XL, 844 MB). The full benchmark against 10 other compressors, with speeds and single files, is on the [example archive's page](https://huggingface.co/neurosquad/Qwen3-0.6B-SEEDPACK).
|
|
59
59
|
|
|
60
|
+
Models bigger than the GPU's memory are streamed: all of unsloth/Qwen3.5-9B-GGUF (BF16, mmproj and 23 quants, 147.8 GB) packs into [12.4 GB](https://huggingface.co/neurosquad/Qwen3.5-9B-SEEDPACK) in under 4 minutes on a 12 GB card, and its Q4_K_M comes back in 11–16 s.
|
|
61
|
+
|
|
60
62
|
## Install
|
|
61
63
|
|
|
62
64
|
```bash
|
|
@@ -103,7 +105,7 @@ A GGUF repository ships the same weights 20–30 times: the BF16 model plus each
|
|
|
103
105
|
## Links
|
|
104
106
|
|
|
105
107
|
- Source and research notes: <https://github.com/glmn-ai/seedpack>
|
|
106
|
-
- Example
|
|
108
|
+
- Example archives: <https://huggingface.co/neurosquad/Qwen3-0.6B-SEEDPACK>, <https://huggingface.co/neurosquad/Qwen3.5-9B-SEEDPACK>
|
|
107
109
|
- A [NeuroSquad](https://huggingface.co/neurosquad) project.
|
|
108
110
|
|
|
109
111
|
## License
|
|
@@ -1,102 +1,119 @@
|
|
|
1
|
-
<p align="center"><img src="assets/banner.png" alt="SeedPack" width="860"></p>
|
|
2
|
-
|
|
3
|
-
# SeedPack
|
|
4
|
-
|
|
5
|
-
**English** · [Русский](README.ru.md)
|
|
6
|
-
|
|
7
|
-
A lossless archiver for GGUF model repositories, by [NeuroSquad](https://huggingface.co/neurosquad). A whole repository — the BF16 model and all its quants from IQ1 to Q8 — packs into one archive about the size of a single compressed BF16 file. Every file is restored **bit-exactly**.
|
|
8
|
-
|
|
9
|
-
The idea: quants are not stored but "grown" from BF16, like a plant from a seed. llama.cpp quantizers are deterministic, so the archive reruns quantization on the GPU from BF16 with the repository's imatrix, using a bit-exact copy of `ggml-quants.c`. Only the difference from that result is stored, coded with the quantizer's own probabilities.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
|
18
|
-
|
|
19
|
-
| all of unsloth/Qwen3.5-
|
|
20
|
-
| Qwen3.
|
|
21
|
-
| Qwen3.5-
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
1
|
+
<p align="center"><img src="assets/banner.png" alt="SeedPack" width="860"></p>
|
|
2
|
+
|
|
3
|
+
# SeedPack
|
|
4
|
+
|
|
5
|
+
**English** · [Русский](README.ru.md)
|
|
6
|
+
|
|
7
|
+
A lossless archiver for GGUF model repositories, by [NeuroSquad](https://huggingface.co/neurosquad). A whole repository — the BF16 model and all its quants from IQ1 to Q8 — packs into one archive about the size of a single compressed BF16 file. Every file is restored **bit-exactly**.
|
|
8
|
+
|
|
9
|
+
The idea: quants are not stored but "grown" from BF16, like a plant from a seed. llama.cpp quantizers are deterministic, so the archive reruns quantization on the GPU from BF16 with the repository's imatrix, using a bit-exact copy of `ggml-quants.c`. Only the difference from that result is stored, coded with the quantizer's own probabilities.
|
|
10
|
+
|
|
11
|
+
Ready archives on Hugging Face:
|
|
12
|
+
- [neurosquad/Qwen3-0.6B-SEEDPACK](https://huggingface.co/neurosquad/Qwen3-0.6B-SEEDPACK) — all of unsloth/Qwen3-0.6B-GGUF (BF16 and 25 quants, 10.95 GB) in one file, with a benchmark against 11 archivers;
|
|
13
|
+
- [neurosquad/Qwen3.5-9B-SEEDPACK](https://huggingface.co/neurosquad/Qwen3.5-9B-SEEDPACK) — all of unsloth/Qwen3.5-9B-GGUF (BF16, mmproj and 23 quants, 147.8 GB) in 12.4 GB.
|
|
14
|
+
|
|
15
|
+
## Results
|
|
16
|
+
|
|
17
|
+
| What is compressed | Original | Archive | % | lmz 1.3.0 |
|
|
18
|
+
|---|---|---|---|---|
|
|
19
|
+
| all of unsloth/Qwen3.5-9B-GGUF (BF16 + mmproj + 23 quants) | 147.81 GB | 12.40 GB | 8.39% | — |
|
|
20
|
+
| all of unsloth/Qwen3-0.6B-GGUF (BF16 + 25 quants) | 10.95 GB | 781.7 MB | 7.14% | 41.5% |
|
|
21
|
+
| all of unsloth/Qwen3.5-0.8B-GGUF | 14.08 GB | 1.12 GB | 7.96% | 41.2% |
|
|
22
|
+
| all of unsloth/Qwen3.5-2B-GGUF | 34.57 GB | 2.91 GB | 8.41% | 43.7% |
|
|
23
|
+
| Qwen3.5-2B quants only (21 files) + imatrix | 28.13 GB | 2.55 GB | 9.06% | 40.2% |
|
|
24
|
+
| Qwen3.5-2B quants only, no imatrix | 28.13 GB | 3.02 GB | 10.74% | 40.2% |
|
|
25
|
+
| a single Q8_0 (Qwen3-0.6B) | 639 MB | 576 MB | 90.1% | 93.0% |
|
|
26
|
+
| a single Q4_K_M (Qwen3-0.6B) | 397 MB | 372 MB | 93.8% | 95.0% |
|
|
27
|
+
| a single BF16 (Qwen3.5-2B) | 3.78 GB | 2.46 GB | 65.2% | 65.9% |
|
|
28
|
+
|
|
29
|
+
Speed, timings and all test sets are in `bench_competitors/VS_LMZ.md`; the roadmap is in `ROADMAP.md` (both in Russian).
|
|
30
|
+
Unpacking verifies checksums. Measured on an RTX 5070, a Core i7-8700K (6 cores, 12 threads) and an NVMe drive.
|
|
31
|
+
|
|
32
|
+
### Big models
|
|
33
|
+
|
|
34
|
+
A BF16 model larger than the GPU's memory (Qwen3.5-9B: 17.9 GB on a 12 GB card) is never held whole. All its quants are packed in one pass over windows of about 1 GB of tensors: each base tensor is read once for all files, and every file is read front to back. Unpacking decodes the base tensor by tensor on the GPU, so the BF16 file touches neither RAM nor disk unless it is extracted itself.
|
|
35
|
+
|
|
36
|
+
Qwen3.5-9B, the whole repository (147.8 GB), on two SATA SSDs in a stripe (about 1 GB/s):
|
|
37
|
+
|
|
38
|
+
| | Time | Speed |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| pack | 210–230 s | 640–700 MB/s |
|
|
41
|
+
| extract Q4_K_M (5.7 GB) | 11–16 s | |
|
|
42
|
+
| test all 28 files | 117 s | 1.26 GB/s |
|
|
43
|
+
|
|
44
|
+
Peak GPU memory is 9.5 GB, process memory under 20 GB.
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
pip install seedpack
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
You need an NVIDIA GPU (Turing or newer) with a CUDA 13 driver (R580+) and Python 3.11+. The CUDA Toolkit is not needed: NVRTC, nvJitLink and the CUDA headers come from pip. Tested on an RTX 5070 under Windows 10 (Python 3.11) and Ubuntu on WSL2 (Python 3.14). Archives are portable between operating systems: one packed on Windows unpacks bit-exactly on Linux, and the other way round. On the first run the quantizers are compiled for your GPU (about 15 s) and cached in `%LOCALAPPDATA%\seedpack\cache` (or `~/.cache/seedpack`, or `SEEDPACK_CACHE`).
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
seedpack pack INPUTS... -o archive.seedpack # files and/or folders
|
|
58
|
+
seedpack unpack ARCHIVE [NAMES|MASKS] -o DIR # everything or selected files (alias: x)
|
|
59
|
+
seedpack list ARCHIVE
|
|
60
|
+
seedpack test ARCHIVE [NAMES|MASKS] # unpack in memory and verify
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
ARCHIVE is a `.seedpack` file or an archive on Hugging Face: `hf://OWNER/REPO[/FILE.seedpack][@REVISION]` or an `https://huggingface.co/...` link. `list` reads only the index over the network; `unpack` and `test` download the archive once into the Hugging Face cache.
|
|
64
|
+
|
|
65
|
+
Examples:
|
|
66
|
+
```
|
|
67
|
+
seedpack x hf://neurosquad/Qwen3-0.6B-SEEDPACK Qwen3-0.6B-Q4_K_M.gguf -o models
|
|
68
|
+
seedpack pack models/Qwen3-0.6B-GGUF -o qwen3.seedpack
|
|
69
|
+
seedpack x qwen3.seedpack "*IQ1*" README.md -o out
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
File roles are detected automatically:
|
|
73
|
+
- a GGUF with more than half of its weights in BF16 is a base (the model, mmproj);
|
|
74
|
+
- the other GGUFs are derived from the bases; quants without a BF16 model are derived from the highest quant (the seed, `seedpack/seed.py`);
|
|
75
|
+
- identical tensors in different files are stored once;
|
|
76
|
+
- all other files are compressed with LZMA or zstd.
|
|
77
|
+
|
|
78
|
+
Every file is verified with BLAKE3 (SHA-256 if the package is missing), every archive chunk with CRC32.
|
|
79
|
+
|
|
80
|
+
## Development
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
git clone https://github.com/glmn-ai/seedpack && cd seedpack
|
|
84
|
+
python -m venv .venv
|
|
85
|
+
.venv\Scripts\pip install -r requirements.txt -e .
|
|
86
|
+
sh seedpack/ggml/build.sh # CPU quantizer library (MinGW gcc): only the research scripts need it
|
|
87
|
+
python -m seedpack --help # same as the seedpack command
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The IQ grid tables (`seedpack/ggml/iqtables.npz`) are built by the CPU library and ship in the package; without the file they are rebuilt (about 25 s, needs `ggmlq.dll`).
|
|
91
|
+
|
|
92
|
+
Publishing: `python -m build`, then `twine upload dist/*`.
|
|
93
|
+
|
|
94
|
+
## Code layout
|
|
95
|
+
|
|
96
|
+
- `seedpack/cli.py` — the CLI (`seedpack`, or `python -m seedpack`); `seedpack/container.py` — the `.seedpack` format (chunks plus an index at the end, random access).
|
|
97
|
+
- `seedpack/repo3.py` — the core: M28/M29 (bases, quant prediction, residuals, pipeline).
|
|
98
|
+
- `seedpack/gpuquant.py` — CUDA code generated from `ggml-quants.c`, bit-exact with the CPU; quantizer variants of older llama.cpp versions.
|
|
99
|
+
- `seedpack/ptxfix.py` — a workaround for a ptxas bug in division by a constant.
|
|
100
|
+
- `seedpack/bf16v2.py` — the BF16 codec (R2); `seedpack/gpu_bf16.py` — M24.
|
|
101
|
+
- `seedpack/gpu3.py` (based on `seedpack/gpu2.py`) — M21/M22: a Q8_0 codec without a base (context rANS, row prediction from similar rows).
|
|
102
|
+
- `seedpack/seed.py` — the seed: the highest quant of a set without BF16, and its codec.
|
|
103
|
+
- `seedpack/qr.py` — QR: GPU coding of the residual with the quantizer's probabilities (scales, then codes), and the same coder without a seed for single files.
|
|
104
|
+
- `seedpack/requant.py` — CPU quantizers via `ggmlq.dll`, imatrix loading (legacy `.dat` and GGUF).
|
|
105
|
+
- `bench*.py`, `results*.json` — measurements of all methods M1–M29; `research/` — codec research.
|
|
106
|
+
- `bench_competitors/` — comparison with other archivers: `run_bench.py`, `quant_sets.py`, `vs_lmz.py`; `hf_bench.py` and `hf_card.py` — the benchmark and the card of the Qwen3-0.6B release on Hugging Face.
|
|
107
|
+
- `assets/` — the logo (`logo.svg`) and the banner (`banner.png`, source `banner.html`).
|
|
108
|
+
- `seedpack/ggml/` — llama.cpp quantization sources (MIT, see `seedpack/ggml/LICENSE`).
|
|
109
|
+
|
|
110
|
+
## Limitations
|
|
111
|
+
|
|
112
|
+
- An NVIDIA GPU is required.
|
|
113
|
+
- Quants without a BF16 model: the highest quant becomes the seed (most bits per weight: UD-Q8_K_XL, Q8_0, … Q4); its tensors are dequantized and the other quants are derived from them. Without an imatrix the quantizers run with unit weights or without weights, whichever gives the smaller residual for each tensor. The Qwen3.5-2B quant set without BF16 and imatrix (21 files, 28 GB) compresses to 17%; lmz reaches 40%.
|
|
114
|
+
- If the published imatrix differs from the one used for quantization (as with Qwen3.5), some blocks are predicted inexactly. Correctness does not suffer, only the size grows: for Qwen3.5-2B all quants together cost 33 MB.
|
|
115
|
+
- Tested on Windows 10 and Ubuntu (WSL2) with an RTX 5070; other GPUs are on the roadmap (ROADMAP, item 22).
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
Apache-2.0 (`LICENSE`). The llama.cpp / ggml quantization sources in `seedpack/ggml/` are MIT, see `NOTICE`.
|
|
@@ -1,70 +1,72 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/glmn-ai/seedpack/main/assets/banner.png" alt="SeedPack" width="860">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
# SeedPack
|
|
6
|
-
|
|
7
|
-
**Lossless GPU archiver for GGUF model repositories.** A whole repository, the BF16 model and all its quants from IQ1 to Q8, packs into one archive about the size of a single compressed BF16 file. Every file comes back byte for byte.
|
|
8
|
-
|
|
9
|
-
| unsloth/Qwen3-0.6B-GGUF, BF16 + 25 quants (10.95 GB) | Archive | Ratio |
|
|
10
|
-
|---|---:|---:|
|
|
11
|
-
| **SeedPack** | **782 MB** | **7.14%** |
|
|
12
|
-
| lmz 1.3.0 | 4.54 GB | 41.47% |
|
|
13
|
-
| zstd 1.5.7 -19 --long=30 | 6.57 GB | 59.99% |
|
|
14
|
-
| 7-Zip 23.01 -mx9 | 10.21 GB | 93.26% |
|
|
15
|
-
| ZipNN 0.5.4 | 10.33 GB | 94.34% |
|
|
16
|
-
|
|
17
|
-
The archive is smaller than the repository's largest single quant (UD-Q8_K_XL, 844 MB). The full benchmark against 10 other compressors, with speeds and single files, is on the [example archive's page](https://huggingface.co/neurosquad/Qwen3-0.6B-SEEDPACK).
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
seedpack
|
|
40
|
-
seedpack x hf://neurosquad/Qwen3-0.6B-SEEDPACK -o models
|
|
41
|
-
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
seedpack
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- **
|
|
60
|
-
- **
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/glmn-ai/seedpack/main/assets/banner.png" alt="SeedPack" width="860">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# SeedPack
|
|
6
|
+
|
|
7
|
+
**Lossless GPU archiver for GGUF model repositories.** A whole repository, the BF16 model and all its quants from IQ1 to Q8, packs into one archive about the size of a single compressed BF16 file. Every file comes back byte for byte.
|
|
8
|
+
|
|
9
|
+
| unsloth/Qwen3-0.6B-GGUF, BF16 + 25 quants (10.95 GB) | Archive | Ratio |
|
|
10
|
+
|---|---:|---:|
|
|
11
|
+
| **SeedPack** | **782 MB** | **7.14%** |
|
|
12
|
+
| lmz 1.3.0 | 4.54 GB | 41.47% |
|
|
13
|
+
| zstd 1.5.7 -19 --long=30 | 6.57 GB | 59.99% |
|
|
14
|
+
| 7-Zip 23.01 -mx9 | 10.21 GB | 93.26% |
|
|
15
|
+
| ZipNN 0.5.4 | 10.33 GB | 94.34% |
|
|
16
|
+
|
|
17
|
+
The archive is smaller than the repository's largest single quant (UD-Q8_K_XL, 844 MB). The full benchmark against 10 other compressors, with speeds and single files, is on the [example archive's page](https://huggingface.co/neurosquad/Qwen3-0.6B-SEEDPACK).
|
|
18
|
+
|
|
19
|
+
Models bigger than the GPU's memory are streamed: all of unsloth/Qwen3.5-9B-GGUF (BF16, mmproj and 23 quants, 147.8 GB) packs into [12.4 GB](https://huggingface.co/neurosquad/Qwen3.5-9B-SEEDPACK) in under 4 minutes on a 12 GB card, and its Q4_K_M comes back in 11–16 s.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install seedpack
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Requirements:
|
|
28
|
+
- An NVIDIA GPU, Turing (RTX 20xx) or newer, with a CUDA 13 driver (R580 or newer).
|
|
29
|
+
- Python 3.11+.
|
|
30
|
+
- Windows 10/11 or Linux. Tested on an RTX 5070 under Windows 10 (Python 3.11) and Ubuntu on WSL2 (Python 3.14).
|
|
31
|
+
- No CUDA Toolkit is needed: NVRTC, nvJitLink and the CUDA headers come from pip.
|
|
32
|
+
|
|
33
|
+
Archives are portable between operating systems: an archive packed on Windows unpacks bit-exactly on Linux, and the other way round. The first run compiles the GPU quantizers for your card (about 15 s) and caches them in `%LOCALAPPDATA%\seedpack\cache` or `~/.cache/seedpack`; set `SEEDPACK_CACHE` to move the cache.
|
|
34
|
+
|
|
35
|
+
## Use
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# straight from the Hugging Face Hub: download once, extract what you need
|
|
39
|
+
seedpack list hf://neurosquad/Qwen3-0.6B-SEEDPACK
|
|
40
|
+
seedpack x hf://neurosquad/Qwen3-0.6B-SEEDPACK Qwen3-0.6B-Q4_K_M.gguf -o models
|
|
41
|
+
seedpack x hf://neurosquad/Qwen3-0.6B-SEEDPACK "*Q4_K*" "*Q8_0*" -o models
|
|
42
|
+
seedpack x hf://neurosquad/Qwen3-0.6B-SEEDPACK -o models # everything
|
|
43
|
+
|
|
44
|
+
# local archives
|
|
45
|
+
seedpack pack models/Qwen3-0.6B-GGUF -o qwen3.seedpack # files and/or folders
|
|
46
|
+
seedpack x qwen3.seedpack Qwen3-0.6B-Q4_K_M.gguf -o out
|
|
47
|
+
seedpack test qwen3.seedpack # decode and verify, write nothing
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Notes on the commands:
|
|
51
|
+
- `hf://OWNER/REPO[/FILE.seedpack][@REVISION]` and `https://huggingface.co/...` links work wherever an archive is expected.
|
|
52
|
+
- `list` reads only the archive's index over the network; `x` and `test` download the archive once into the Hugging Face cache.
|
|
53
|
+
- Extracted files are checked against BLAKE3 hashes. Every chunk of the archive carries a CRC32.
|
|
54
|
+
|
|
55
|
+
## How it works
|
|
56
|
+
|
|
57
|
+
A GGUF repository ships the same weights 20–30 times: the BF16 model plus each quantization of it. To a general-purpose compressor that looks like gigabytes of almost incompressible bytes. SeedPack uses the fact that every quant is a deterministic function of the same weights:
|
|
58
|
+
|
|
59
|
+
- **The seed is stored once.** The most precise model (the BF16 file, or the senior quant when there is none) is coded with an entropy coder built for its weights.
|
|
60
|
+
- **Quants are re-derived, not stored.** Each quant is computed again on the GPU by a bit-exact CUDA port of llama.cpp's quantizers (`ggml-quants.c`, compiled without FMA contraction), with the repository's importance matrix.
|
|
61
|
+
- **Only the residual is kept.** Where a re-derived quant differs from the published file, the residual is coded with the quantizer's own probabilities: scales first, then each code relative to its rounding boundary. For Qwen3-0.6B, all 25 quants together cost about 1 MB on top of the seed.
|
|
62
|
+
- **Duplicates are stored once.** Identical tensors in different files are kept once. Files that are not GGUF are compressed with LZMA or zstd.
|
|
63
|
+
|
|
64
|
+
## Links
|
|
65
|
+
|
|
66
|
+
- Source and research notes: <https://github.com/glmn-ai/seedpack>
|
|
67
|
+
- Example archives: <https://huggingface.co/neurosquad/Qwen3-0.6B-SEEDPACK>, <https://huggingface.co/neurosquad/Qwen3.5-9B-SEEDPACK>
|
|
68
|
+
- A [NeuroSquad](https://huggingface.co/neurosquad) project.
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
Apache-2.0. The bundled llama.cpp / ggml quantization sources (`seedpack/ggml/`) are MIT-licensed; see `NOTICE`.
|