Exact Byte-Level HNSW Sizing Math (10,000,000 Vectors)
Most cloud vector cost blowups stem from confusing raw vector payload bytes with resident HNSW memory. For $N$ vectors of dimension $D$ at $b$ bytes per coordinate and HNSW degree $m = 16$:
$$\text{RAM}{\text{resident}} \approx 1.20 \times N \times \left(D \cdot b + 16 \cdot m{\text{links}} + \text{header}\right)$$
Here is the exact breakdown for 10,000,000 chunks on 3,072d (text-embedding-3-large / gemini-embedding-001) vs 2,560d (Forge Pro) and 1,024d (Forge Turbo):
| Precision / Quantization | Bytes / Dim | 10M x 3072d Raw Payload |
10M x 3072d Resident HNSW |
Relative Recall Retention | pgvector 0.7/0.8 Type |
|---|---|---|---|---|---|
FP32 (IEEE-754 single) |
4.0 B |
122.88 GB |
~151.3 GB (Blocked >2000d in pgvector) |
100.0% baseline |
vector(D) (D <= 2000) |
FP16 (halfvec) |
2.0 B |
61.44 GB |
~77.6 GB |
99.8% - 99.95% |
halfvec(D) (D <= 4000) |
INT8 Scalar (SQ8) |
1.0 B |
30.72 GB |
~40.7 GB |
98.8% - 99.5% |
Qdrant / Milvus / Lucene int8 |
1-Bit Binary + 4x FP16 Rescore |
0.125 B (index) |
3.84 GB (HNSW) + 61.4 GB NVMe |
~8.4 GB RAM + NVMe page reads |
96.8% - 98.4% (3072d) |
bit(D) + halfvec(D) heap |
Voxell Forge Turbo (1024d FP16) |
2.0 B |
20.48 GB |
~28.4 GB |
Native 1024d ($0 tokens) |
vector(1024) / halfvec(1024) |
Voxell Forge Pro (2560d) + 64b CUDA AMQ |
2.0 B + 8 B AMQ |
51.20 GB |
< 14 GB VRAM (Forge Local VPC) |
99.04% Recall@20 / 0.8849 w/ Max |
Managed Cloud or 1x 24GB GPU |
(Model your exact vector count from 100k to 100M interactively in the Vector RAM & TCO Calculator.)
Runnable SQL: Two-Phase Binary HNSW + 4x halfvec Rescoring in pgvector
In pgvector 0.7.0+, binary_quantize(halfvec) maps positive floats to 1 and non-positive floats to 0 (which requires zero-centered, L2-normalized embeddings; see Guide 02 and Guide 06). You keep the compact bit(3072) HNSW index pinned in RAM (3.84 GB payload at 10M rows) while halfvec(3072) sits on fast NVMe SSD, fetched only for the top 80 (4 * 20) finalists:
-- 1. Store halfvec(3072) on NVMe heap; build tiny RAM-resident 1-bit Hamming HNSW index
CREATE TABLE corpus_vectors (
id BIGSERIAL PRIMARY KEY,
doc_id TEXT NOT NULL,
embedding halfvec(3072) NOT NULL
);
CREATE INDEX idx_corpus_bin_hnsw
ON corpus_vectors
USING hnsw ((binary_quantize(embedding)::bit(3072)) bit_hamming_ops)
WITH (m = 16, ef_construction = 128);
-- 2. Query-time 4x oversampled POPCNT scan -> exact FP16 cosine rescore
SET LOCAL hnsw.ef_search = 100;
WITH binary_candidates AS MATERIALIZED (
SELECT id, doc_id, embedding
FROM corpus_vectors
ORDER BY binary_quantize(embedding)::bit(3072) <~> binary_quantize($1::halfvec(3072))
LIMIT 80 -- 4x oversample for final top-20
)
SELECT id, doc_id,
1 - (embedding <=> $1::halfvec(3072)) AS cosine_similarity
FROM binary_candidates
ORDER BY embedding <=> $1::halfvec(3072)
LIMIT 20;
Beyond Sign-Bit Clipping: Play 1 64-Bit CUDA Cuckoo AMQ + Single-GPU VPC
Sign-bit binary quantization degrades sharply when corpus embeddings exhibit narrow-cone anisotropy (where 70%+ of coordinates share the same sign across documents) or when tenant/ACL filters force thousands of random NVMe heap fetches per query.
Voxell Forge eliminates multi-node RAM sprawl at the hardware and kernel level:
- Play 1 64-Bit CUDA Cuckoo AMQ: Sub-millisecond GPU-resident approximate membership filtering prunes non-matching tenant, ACL, and lexical fingerprint candidates before distance evaluation.
- Single-24GB-GPU Sovereign VPC (
Forge Local): Packs all five stages (document AST parsing,C_corpuszero-LLM conditioning, dense + AMQ search,Maxcross-encoder reranking at0.8849 nDCG@10, and Streamable HTTP/mcp) into< 14 GBVRAM on oneg6.xlarge/ L4 GPU ($9,995/yr Dev/PoC; $29,995/yr Production) atop plain$0.02/GBobject storage.
Run a keyless retrieval verification right now:
curl -sS -X POST https://api.voxell.ai/api/v1/agent/bakeoff \
-H "Content-Type: application/json" \
-d '{
"documents": [
{"name": "quant-bin.md", "text": "1-bit binary quantization shrinks 10M x 3072d payloads to 3.84 GB and requires 4x oversampled FP16 rescoring."},
{"name": "forge-vpc.md", "text": "Forge Local executes 5-stage retrieval and cross-encoder reranking in under 14 GB VRAM on a single 24 GB GPU."}
],
"queries": ["How much VRAM does Forge Local require for 5-stage retrieval and reranking?"]
}'
Plug your workload into the Vector RAM & TCO Calculator, compare Single-GPU VPC vs Multi-GPU Clusters, or review v4.0 Pricing and open the Forge Console.