NOW LET US – AI RAG SaaS Studio TP.HCM
NOW LET US
Digital Product Studio
Back to news
DEV-TOOLS...1 min read

Show HN: TurboQuant-WASM – Google's vector quantization in the browser

Share
NOW LET US Article – Show HN: TurboQuant-WASM – Google's vector quantization in the browser

TurboQuant-WASM is an experimental WebAssembly implementation of Google Research's vector quantization algorithm, enabling efficient data compression and fast vector search directly in the browser and Node.js.

Experimental WASM + relaxed SIMD build of botirk38/turboquant for browsers and Node.js.

Based on the paper "TurboQuant: Online Vector Quantization with Near-optimal Distortion Rate" (Google Research, ICLR 2026).

Live Demo — vector search, image similarity, and 3D Gaussian Splatting compression running in the browser.

npm packagewith embedded WASM —npm install turboquant-wasm

Relaxed SIMD@mulAdd

FMA maps tof32x4.relaxed_madd

SIMD-vectorizedQJL sign packing/unpacking and scalingTypeScript APITurboQuant.init()

/encode()

/decode()

/dot()

Golden-value tests— byte-identical output with the reference Zig implementation

The WASM binary uses relaxed SIMD instructions:

| Runtime | Minimum Version | |---|---| | Chrome | 114+ | | Firefox | 128+ | | Safari | 18+ | | Node.js | 20+ |

import { TurboQuant } from "turboquant-wasm";
const tq = await TurboQuant.init({ dim: 1024, seed: 42 });
// Compress a vector (~4.5 bits/dim, ~6x compression)
const compressed = tq.encode(myFloat32Array);
// Decode back
const decoded = tq.decode(compressed);
// Fast dot product without decoding
const score = tq.dot(queryVector, compressed);
tq.destroy();
class TurboQuant {
static async init(config: { dim: number; seed: number }): Promise<TurboQuant>;
encode(vector: Float32Array): Uint8Array;
decode(compressed: Uint8Array): Float32Array;
dot(query: Float32Array, compressed: Uint8Array): number;
destroy(): void;
}
# Run tests
zig test -target aarch64-macos src/turboquant.zig
# Full npm build (zig -> wasm-opt -> base64 embed -> bun + tsc)
bun run build
# Build WASM only
bun run build:zig

Requires Zig 0.15.2 and Bun.

Encoding preserves inner products — verified by golden-value tests and distortion bounds:

MSEdecreases with dimension (unit vectors)Bits/dimis ~4.5 (payload only, excluding 22-byte header)Dot product preservation— mean absolute error < 1.0 for unit vectors at dim=128Bit-identicaloutput with botirk38/turboquant for same input + seed

  • botirk38/turboquant — original Zig implementation
  • TurboQuant paper (Google Research, ICLR 2026) — algorithm design

MIT

© 2026 Now Let Us. All rights reserved.

Source: Hacker News

Advertisement
Ad slot ready: 5887729102

More in this category

NOW LET US Related – Leaving Mozilla

dev-tools

Leaving Mozilla

A poignant and candid reflection from a 15-year Mozilla veteran upon their departure. The author highlights the leadership's missteps in trying to emulate tech giants and urges Mozilla to return to its core values: community and uniqueness.

NOW LET US Related – Shepherd's Dog: A Game by the Most Dangerous AI Model

dev-tools

Shepherd's Dog: A Game by the Most Dangerous AI Model

A developer tested Anthropic's latest, supposedly 'too dangerous' AI model by asking it to build a long-held game idea in a single shot. The model succeeded, generating a complete 2,319-line game after a 45-minute reasoning session.

NOW LET US Related – Open source AI must win

dev-tools

Open source AI must win

If artificial intelligence becomes a utility rented only from a few closed institutions, humanity loses its operational freedom. Open-source AI is a vital infrastructure for the future of our digital society.

NOW LET US Related – Statement on US government directive to suspend access to Fable 5 and Mythos 5

dev-tools

Statement on US government directive to suspend access to Fable 5 and Mythos 5

The US government has issued an export control directive forcing Anthropic to suspend all access to its Fable 5 and Mythos 5 models due to national security concerns, a move the AI safety startup strongly disputes.

NOW LET US Related – Electric motors with no rare earths

dev-tools

Electric motors with no rare earths

Renault Group is pioneering the development of electrically excited synchronous motors (EESM) that eliminate the need for rare earth magnets, reducing dependency on global monopolies while driving efficiency and sustainability.

NOW LET US Related – Swift at Apple: Migrating the TrueType hinting interpreter

dev-tools

Swift at Apple: Migrating the TrueType hinting interpreter

Apple has rewritten its TrueType hinting interpreter from C to memory-safe Swift for its Fall 2025 OS releases, improving security and boosting performance by an average of 13%.

EXPLORE TOPICS

Discover All Categories

Deep dive into the specific technology sectors that matter most to you.