Live
Black Hat USADark ReadingBlack Hat AsiaAI BusinessI Built an MCP Server That Understands Your MSBuild Project Graph — Before You BuildDEV CommunityAgent Middleware in Microsoft Agent Framework 1.0DEV CommunityPOTS explained: The disorder that forced OpenAI exec Fidji Simo to take medical leaveBusiness InsiderWhat is POTS, the disorder that forced OpenAI exec Fidji Simo to take medical leave - Business InsiderGoogle News: OpenAIWhy 80% of AI Projects Fail — And the 4-Layer Readiness Framework That Changes the OddsTowards AIWhy Your Data Governance is Already ObsoleteAI YouTube Channel 35No Fooling, Spaceballs 2 Will Hit Theaters April 2027GizmodoF1 Built the Perfect Model. Then the Cars Went Racing.Medium AISpaceX IPO Access Reportedly Tied to xAI Grok Adoption by Major Banks - TipRanksGNews AI GrokSuki Positions AI Platform as Integrative Layer in Healthcare Workflows - TipRanksGNews AI healthcareMost People Use AI Every Day, But Don’t Understand These Simple ThingsMedium AII Let AI Make My Decisions for 7 Days. It Worked and That’s What Worried Me.Medium AIBlack Hat USADark ReadingBlack Hat AsiaAI BusinessI Built an MCP Server That Understands Your MSBuild Project Graph — Before You BuildDEV CommunityAgent Middleware in Microsoft Agent Framework 1.0DEV CommunityPOTS explained: The disorder that forced OpenAI exec Fidji Simo to take medical leaveBusiness InsiderWhat is POTS, the disorder that forced OpenAI exec Fidji Simo to take medical leave - Business InsiderGoogle News: OpenAIWhy 80% of AI Projects Fail — And the 4-Layer Readiness Framework That Changes the OddsTowards AIWhy Your Data Governance is Already ObsoleteAI YouTube Channel 35No Fooling, Spaceballs 2 Will Hit Theaters April 2027GizmodoF1 Built the Perfect Model. Then the Cars Went Racing.Medium AISpaceX IPO Access Reportedly Tied to xAI Grok Adoption by Major Banks - TipRanksGNews AI GrokSuki Positions AI Platform as Integrative Layer in Healthcare Workflows - TipRanksGNews AI healthcareMost People Use AI Every Day, But Don’t Understand These Simple ThingsMedium AII Let AI Make My Decisions for 7 Days. It Worked and That’s What Worried Me.Medium AI
AI NEWS HUBbyEIGENVECTOREigenvector

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

Hacker NewsApril 4, 20261 min read0 views
Source Quiz

Comments

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.

What this adds

  • npm package with embedded WASM — npm install turboquant-wasm

  • Relaxed SIMD — @mulAdd FMA maps to f32x4.relaxed_madd

  • SIMD-vectorized QJL sign packing/unpacking and scaling

  • TypeScript API — TurboQuant.init() / encode() / decode() / dot()

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

Browser Requirements

The WASM binary uses relaxed SIMD instructions:

Runtime Minimum Version

Chrome 114+

Firefox 128+

Safari 18+

Node.js 20+

Quick Start

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();`

API

class TurboQuant {  static async init(config: { dim: number; seed: number }): Promise;  encode(vector: Float32Array): Uint8Array;  decode(compressed: Uint8Array): Float32Array;  dot(query: Float32Array, compressed: Uint8Array): number;  destroy(): void; }

Building

# 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.

Quality

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

  • MSE decreases with dimension (unit vectors)

  • Bits/dim is ~4.5 (payload only, excluding 22-byte header)

  • Dot product preservation — mean absolute error < 1.0 for unit vectors at dim=128

  • Bit-identical output with botirk38/turboquant for same input + seed

Credits

  • botirk38/turboquant — original Zig implementation

  • TurboQuant paper (Google Research, ICLR 2026) — algorithm design

License

MIT

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by Eigenvector · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

More about

quantization

Knowledge Map

Knowledge Map
TopicsEntitiesSource
Show HN: Tu…quantizationHacker News

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 113 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!

More in Open Source AI