Downloads · 30 days
1.2K
69% of all-time downloads
invarianthub/Qwen3-8B-BPDQ-2bit
Qwen3-8B-BPDQ-2bit is a text generation model from invarianthub. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Qwen3-8B, all 8.2B parameters, with the transformer weights stored as 2-bit bit-planes and kept that way for the whole run. 3.0 GB on disk, 3.65 GiB resident, against 15.3 GiB in fp16. Runs on one CUDA GPU or an Apple…
Downloads · 30 days
1.2K
69% of all-time downloads
All-time downloads
1.7K
Public
Parameters
834M
6.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.2 GB · 100%
How the weights are stored.
I32746M · 89%
From the Hugging Face model README
Qwen3-8B, all 8.2B parameters, with the transformer weights stored as 2-bit bit-planes and kept that way for the whole run. 3.0 GB on disk, 3.65 GiB resident, against 15.3 GiB in fp16. Runs on one CUDA GPU or an Apple M-series Mac. (The Hub's "0.8B params" badge counts packed int32 words, not parameters.)

12-task average 72.0 against 80.6 for fp16, with the weights at 2.19 bits. At the same bit budget llama.cpp's imatrix g256 quant scores 17.8; it needs 3.25 bits/weight (74.1) to pass this model.

On one RTX 4090 it solves 5.4x more GSM8K problems per minute than fp16 for a single user and 2.6x at 64 concurrent users; the gap narrows as batching amortizes the weight read.
All rows measured 2026-10-09 to 10-11 on the same harness as the fp16 reference.
import sys; sys.path.insert(0, MODEL_DIR)
import bpdq
model, tok = bpdq.load(MODEL_DIR) # cuda | mps | cpu
ids = tok("The capital of France is", return_tensors="pt").to(model.device)
out, _ = bpdq.decode(model, ids.input_ids, 64, sampling=bpdq.Sampling.for_mode(think=False))
print(tok.decode(out[0]))
python serve.py MODEL_DIR --port 8000 # OpenAI-compatible, streaming, standard library only
python bpdq.py chat MODEL_DIR # interactive
On CUDA, import bpdq registers the method with vLLM: LLM(model=MODEL_DIR, quantization="bpdq", dtype="float16") or vllm serve MODEL_DIR --quantization bpdq --dtype float16.
demo.ipynb walks through all of it on either machine.
Sampling defaults are Qwen3's per-mode settings plus a 0.3 presence penalty; do not decode greedily, at 2 bits it restates itself. Everything else — the weight format, the kernels, per-batch throughput, speculative decoding, server flags — is in ENGINEERING.md.
| value | |
|---|---|
| WikiText-2 PPL (seq 2048) | 18.58 (fp16 Qwen3-8B: 9.72) |
| KL to fp16 (32 chunks) | 0.864 |
StaticCache, model.generate a dynamic one. Both are faithful to the weights.Apache-2.0, inheriting Qwen/Qwen3-8B.