<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Janea Systems</title>
    <description>The latest articles on DEV Community by Janea Systems (@janeasystems).</description>
    <link>https://dev.to/janeasystems</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F11177%2Fd46133ae-eb2b-4d4f-bd9b-855e60a87635.png</url>
      <title>DEV Community: Janea Systems</title>
      <link>https://dev.to/janeasystems</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/janeasystems"/>
    <language>en</language>
    <item>
      <title>How to Build a Vector Database Using Amazon S3 Vectors</title>
      <dc:creator>Benedetto Proietti</dc:creator>
      <pubDate>Wed, 30 Jul 2025 07:35:31 +0000</pubDate>
      <link>https://dev.to/janeasystems/how-to-build-a-vector-database-using-amazon-s3-vectors-2kdl</link>
      <guid>https://dev.to/janeasystems/how-to-build-a-vector-database-using-amazon-s3-vectors-2kdl</guid>
      <description>&lt;p&gt;&lt;em&gt;And Say Goodbye to Expensive SaaS Pricing&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here’s an estimated price comparison for storing 1 billion and 10 billion vectors using the most common SaaS vector databases. These numbers are pulled directly from each provider’s pricing calculator. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8exmvfv2yg4ydcx1w1cp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8exmvfv2yg4ydcx1w1cp.png" alt="Assumptions: 768 dimensions, 32-bit values per vector" width="549" height="138"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h1&gt;
  
  
  Why Are Vector Databases So Expensive?
&lt;/h1&gt;

&lt;p&gt;I’ve covered this before in two articles — &lt;a href="https://medium.com/@benedetto73/desire-for-structure-read-sql-9464766ec509" rel="noopener noreferrer"&gt;Desire for Structure (read: “SQL”)&lt;/a&gt; and &lt;a href="https://medium.com/@benedetto73/beyond-the-art-of-database-indexing-436b14dcf987" rel="noopener noreferrer"&gt;(Beyond) The Art of Database Indexing&lt;/a&gt;. Traditional indexing starts to fall apart at scale — what we used to call “Big Data.” &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvxjgohhihw4f5nmdvqkn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvxjgohhihw4f5nmdvqkn.png" alt=" " width="400" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Want the short version? &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Vector databases are expensive because they rely on powerful, always-on hardware. They keep in-memory indexes fresh and caches hot — and that costs money.&lt;/em&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Old Tricks, New Vector World
&lt;/h1&gt;

&lt;p&gt;For tabular or log data, we decoupled compute and storage a long time ago: store data cheaply in S3 or MinIO, and spin up compute (like Spark or Presto) only when needed. &lt;/p&gt;

&lt;p&gt;Amazon has now extended this model to vector embeddings with Amazon S3 Vectors. [Quick dive &lt;a href="https://medium.com/@benedetto73/s3-vectors-changing-how-we-think-about-vector-embeddings-b04f8af2e3cd" rel="noopener noreferrer"&gt;here&lt;/a&gt;.] &lt;/p&gt;

&lt;p&gt;S3 Vectors lets you store huge volumes of vector data at low cost and run similarity searches in under a second — ideal for batch workloads and analytics. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Can we ditch expensive Vector DBs now?&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Not quite. S3 Vectors doesn’t offer the low latency needed for real-time use cases — like fraud detection, recommendation engines, or chatbots that require sub-100 ms responses. &lt;/p&gt;

&lt;p&gt;Instead, think of S3 Vectors as the durable, budget-friendly foundation. You’ll still need a lightweight layer on top to meet real-time latency requirements. &lt;/p&gt;

&lt;h1&gt;
  
  
  Level 1: Download and Run
&lt;/h1&gt;

&lt;p&gt;Let’s start simple: use open-source software out of the box, no code changes, just run it. &lt;/p&gt;

&lt;p&gt;We lower similarity search latency by using a classic Computer Science technique — indexes — and storing data in RAM (which is fast but expensive). &lt;/p&gt;

&lt;h2&gt;
  
  
  Product Quantization (PQ): Fast, Memory-Efficient Search
&lt;/h2&gt;

&lt;p&gt;Performing exact distance calculations (cosine, Euclidean) on billions of 768-dimensional vectors is too slow and compute-heavy. &lt;/p&gt;

&lt;p&gt;Product Quantization (PQ) helps by compressing vectors into compact forms. This makes searches 10–100× faster — with minimal accuracy loss. &lt;/p&gt;

&lt;h2&gt;
  
  
  How PQ Works
&lt;/h2&gt;

&lt;p&gt;PQ splits each high-dimensional vector into smaller chunks (e.g., groups of 8 dimensions), then maps each chunk to the closest centroid in a precomputed codebook. Only the centroid IDs are stored. &lt;/p&gt;

&lt;p&gt;At query time, instead of comparing against billions of raw vectors, the system compares to ~256 centroids per chunk — massively reducing compute time. &lt;/p&gt;

&lt;p&gt;For most NLP workloads, PQ delivers excellent recall while cutting memory and compute costs. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuh0tf0n5lzh33kx0ti9s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuh0tf0n5lzh33kx0ti9s.png" alt=" " width="400" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tool Selection
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;FAISS&lt;/strong&gt;— originally developed by Facebook AI Research — is the go-to library for efficient similarity search and clustering of dense vectors. It’s widely adopted for high-performance vector indexing at scale. But I recommend &lt;a href="https://github.com/JaneaSystems/jecq" rel="noopener noreferrer"&gt;JECQ&lt;/a&gt;, a drop-in replacement with 6× lower memory usage. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: I created JECQ. That said, it works well. But use FAISS if you prefer.&lt;/em&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  In-Memory Cache
&lt;/h2&gt;

&lt;p&gt;You can cache a subset of raw vectors in RAM using tools like Redis or Valkey, depending on your licensing needs. &lt;/p&gt;

&lt;p&gt;For 10 billion vectors (~30TB in S3), storing just 1% in RAM (about 300GB) can make a big difference. Pricey, but manageable. &lt;/p&gt;

&lt;h1&gt;
  
  
  Level 1 Architecture
&lt;/h1&gt;

&lt;p&gt;Let’s walk through the architecture: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9jsotg9tntv2grw9neg3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9jsotg9tntv2grw9neg3.png" alt="Image: AI-generated" width="400" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A router service handles incoming similarity search requests. It’s stateless and can scale horizontally. &lt;/li&gt;
&lt;li&gt;Each node loads a copy of the JECQ (or FAISS) index in memory. &lt;/li&gt;
&lt;li&gt;The router uses JECQ to find candidate vector IDs. &lt;/li&gt;
&lt;li&gt;It then checks Redis for raw vectors: &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache hit:&lt;/strong&gt; Redis returns vectors. Router re-ranks and returns results. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache miss:&lt;/strong&gt; Router pulls vectors from S3, re-ranks, and returns results. &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Level 2: Teaser
&lt;/h1&gt;

&lt;p&gt;Level 1 works fine for datasets up to ~1 billion vectors or demo workloads. But if you want 10–100 ms P95 latency at multi-billion scale, you’ll need more: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local raw vectors on NVMe:&lt;/strong&gt; A middle layer (5–10% of raw size, ~1.5TB) between RAM and S3 to avoid frequent S3 fetches. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frg0sihlvptis6zovtcce.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frg0sihlvptis6zovtcce.png" alt="Data layers hierarchy" width="400" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hierarchical data layers:&lt;/strong&gt; JECQ + Redis/NVMe integration enables local posting list retrieval, turning 100 ms S3 reads into 2–5 ms NVMe reads. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Index sharding:&lt;/strong&gt; Splits PQ clusters across nodes and avoids duplicating 100GB+ compressed data per node. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Advanced cache management:&lt;/strong&gt; Store frequent queries, support MFU/LFU/LRU caching strategies, and pre-load data based on user behavior. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Aggressive S3 Vectors indexing:&lt;/strong&gt; Each query hits just one index. A single S3 bucket can hold 10K indexes, each with ≤50M vectors. Smart indexing helps reduce latency significantly. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of this requires solid engineering chops — but it's necessary if you want to build a cost-effective vector database with 10–100 ms latency on top of S3 Vectors. &lt;/p&gt;

&lt;p&gt;Stay tuned for Level 2. &lt;/p&gt;

</description>
      <category>vectordatabase</category>
      <category>rag</category>
      <category>machinelearning</category>
      <category>ai</category>
    </item>
    <item>
      <title>S3 Vectors: Changing How We Think About Vector Embeddings</title>
      <dc:creator>Benedetto Proietti</dc:creator>
      <pubDate>Wed, 16 Jul 2025 16:11:26 +0000</pubDate>
      <link>https://dev.to/janeasystems/s3-vectors-changing-how-we-think-about-vector-embeddings-55nm</link>
      <guid>https://dev.to/janeasystems/s3-vectors-changing-how-we-think-about-vector-embeddings-55nm</guid>
      <description>&lt;p&gt;Inserting and maintaining data in a relational database is expensive. Every write must update one or more indexes (data structures such as B-trees) that accelerate reads at the cost of extra CPU, memory, and I/O. On a single node, tables start to struggle once they pass a few terabytes. Distributed SQL and NoSQL systems push that limit, but the fundamental write amplification costs remain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Object Storage
&lt;/h2&gt;

&lt;p&gt;To escape those costs, teams began landing raw data in cloud object stores like Amazon S3. Instead of hot indexes, query engines (Spark, Athena, Trino) rely on partition pruning and lightweight statistics. The led to dramatically lower storage bills and petabyte scale datasets on commodity hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vectors Embeddings
&lt;/h2&gt;

&lt;p&gt;AI and LLM workloads now emit vector embeddings – hundreds or thousands of dimensions per record. Answering “Which vectors are nearest to this one?” in real time is tricky:&lt;/p&gt;

&lt;p&gt;High-dimensional data breaks classic data structures.&lt;br&gt;
We lean on approximate nearest neighbor (ANN) algorithms such as HNSW or IVFPQ.&lt;br&gt;
Queries often combine a distance threshold with metadata filters.&lt;br&gt;
Recall, precision, and latency form a three-way tradeoff.&lt;/p&gt;

&lt;h2&gt;
  
  
  Amazon S3 Vector: A Game-Changer
&lt;/h2&gt;

&lt;p&gt;Announced yesterday, Amazon S3 Vectors brings vector-aware storage classes to S3. Each vector table:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stores vectors of fixed dimensionality, compressed on write. Not possible with traditional S3.&lt;/li&gt;
&lt;li&gt;Supports ANN search with simultaneous filters on metadata. Immensely faster than S3.&lt;/li&gt;
&lt;li&gt;Delivers sub-second latency: great for batch, a bit slow for interactive UX.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Closing the Latency Gap with In-Memory Caching
&lt;/h2&gt;

&lt;p&gt;Janea Systems’ background is deeply rooted in working with in-memory, low-latency caches. Our track record includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We are the creators of Memurai, the official Redis for Windows, trusted by developers for its performance and reliability.&lt;/li&gt;
&lt;li&gt;We are active contributors to ValKey, a rapidly evolving open-source fork of Redis, pushing the boundaries of in-memory data stores.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Given the inherent characteristics of S3 Vectors, including powerful storage and batch processing, but with room for improvement in interactive scenarios, the next logical step is to strategically implement a high-performance cache on top of S3 Vectors.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future
&lt;/h2&gt;

&lt;p&gt;We are excited about the possibilities Amazon S3 Vectors unlocks. The upcoming articles will cover how to effectively integrate Redis, Valkey, or Memurai with the S3 Vector service to achieve optimal performance for your AI/LLM workloads. Also, we will explore the new AWS service and its implications for modern data architectures in detail. Stay tuned!&lt;/p&gt;

</description>
      <category>vectordatabase</category>
      <category>awsbigdata</category>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>JECQ: Smart, Open-Source Compression for FAISS Users—6x Compression Ratio, 85% Accuracy</title>
      <dc:creator>Benedetto Proietti</dc:creator>
      <pubDate>Wed, 09 Jul 2025 12:19:58 +0000</pubDate>
      <link>https://dev.to/janeasystems/jecq-smart-open-source-compression-for-faiss-users-6x-compression-ratio-85-accuracy-5a5n</link>
      <guid>https://dev.to/janeasystems/jecq-smart-open-source-compression-for-faiss-users-6x-compression-ratio-85-accuracy-5a5n</guid>
      <description>&lt;p&gt;Hi everyone — I'm Benedetto Proietti, Head of Architecture at Janea Systems. I spend most of my time working on performance-critical systems and solving interesting problems at the intersection of machine learning, distributed systems, and open-source technologies. This post is about a recent project I ideated and directed: &lt;a href="https://github.com/JaneaSystems/jecq" rel="noopener noreferrer"&gt;JECQ&lt;/a&gt;, an innovative, open-source, compression solution built specifically for FAISS users. I’ll walk you through the thinking behind it, how it works, and how it can help reduce memory usage without compromising too much on accuracy.&lt;/p&gt;




&lt;p&gt;Ever wonder how it takes just milliseconds to search something on Google, despite hundreds of billions of webpages in existence? The answer is Google’s index. By the company’s own admission, that index weighs in at over 100,000,000 gigabytes. That’s roughly 95 petabytes.&lt;/p&gt;

&lt;p&gt;Now, imagine if you could shrink that index by a factor of six.&lt;/p&gt;

&lt;p&gt;That’s exactly what Janea Systems did for vector embeddings—the index of artificial intelligence.&lt;/p&gt;

&lt;p&gt;Read on to learn what vector embeddings are, why compressing them matters, how it’s been done until now, and how Janea Systems’ solution pushes it to a whole new level.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Data Explosion: From Social Media to Large Language Models
&lt;/h2&gt;

&lt;p&gt;The arrival of Facebook in 2004 marked the beginning of the social media era. Today, Facebook has over 3 billion monthly active users worldwide. In 2016, TikTok introduced the world to short-form video, and now has more than a billion monthly users.&lt;/p&gt;

&lt;p&gt;And in 2023, ChatGPT came along.&lt;/p&gt;

&lt;p&gt;Every one of these inventions led to an explosion of data being generated and processed online. With Facebook, it was posts and photos. TikTok flooded the web with billions of 30-second dance videos.&lt;/p&gt;

&lt;p&gt;When data starts flowing by the millions, companies look for ways to cut storage costs with compression. Facebook compresses the photos we upload to it. TikTok does the same with videos.&lt;/p&gt;

&lt;p&gt;What about large language models? Is there anything to compress there?&lt;/p&gt;

&lt;p&gt;The answer is yes: vector embeddings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vector Embeddings: The Language of Modern AI
&lt;/h2&gt;

&lt;p&gt;Think of vector embeddings as the DNA of meaning inside a language model. When you type something like “Hi, how are you?”, the model converts that phrase into embeddings—a set of vectors that capture how it relates to other phrases. These embeddings help the model process the input and figure out how likely different words are to come next. This allows the model to know the right response to "Hi, how are you?" is “I’m good, and you?” instead of “That’s not something you’d ask a cucumber".&lt;/p&gt;

&lt;p&gt;The principle behind vector embeddings also underpins a process called “similarity search.” Here, embeddings represent larger units of meaning—like entire documents—powering use cases like retrieval-augmented generation (RAG), recommendation engines, and more.&lt;/p&gt;

&lt;p&gt;It should be pretty clear by now that vector embeddings are central not just to how generative AI works, but to a wide range of AI applications across industries.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hidden Costs of High-Dimensional Data: Why Vector Compression is Crucial
&lt;/h2&gt;

&lt;p&gt;The problem is that vector embeddings take up space. And the faster and more accurate we want an AI system to be, the more vector embeddings it needs - and the more space to store them. But this isn't just a storage cost problem: the bigger embeddings are, the more bandwidth in the PCI bus and in the memory bus they use. It's also an issue for things like edge AI devices - edge devices don't have constant internet access, so their AI models need to run efficiently with the limited space they've got onboard.&lt;/p&gt;

&lt;p&gt;That's why it makes sense to look for ways to push compression even further - despite the fact that embeddings are already being compressed today. Squeezing even another 10% out of the footprint can mean real savings, and a much better user experience for IoT devices running generative AI.&lt;/p&gt;

&lt;p&gt;At Janea Systems, we saw this opportunity and built an advanced C++ library based on FAISS.&lt;/p&gt;

&lt;p&gt;FAISS—short for Facebook AI Similarity Search—is Meta’s open-source library for fast vector similarity search, offering an 8.5x speedup over earlier solutions. Our library takes it further by optimizing the storage and retrieval of large-scale vector embeddings in FAISS—cutting storage costs and boosting AI performance on IoT and edge devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Industry Standard: A Look at Product Quantization (PQ)
&lt;/h2&gt;

&lt;p&gt;Vector embeddings are stored in a specialized data structure called a vector index. The index lets AI systems quickly find and retrieve the closest vectors to any input (e.g. user questions) and match it with accurate output.&lt;/p&gt;

&lt;p&gt;A major constraint for vector indexes is space. The more vectors you store—and the higher their dimensionality—the more memory or disk you need. This isn’t just a storage problem; it affects whether the index fits in RAM, whether queries run fast, and whether the system can operate on edge devices.&lt;/p&gt;

&lt;p&gt;Then there’s the question of accuracy. If you store vectors without compression, you get the most accurate results possible. But the process is slow, resource-intensive, and often impractical at scale. The alternative is to apply compression, which saves space and speeds things up, but sacrifices accuracy.&lt;/p&gt;

&lt;p&gt;The most common way to manage this trade-off is a method called Product Quantization (PQ) (Fig. 1).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhnx6y49adn6d8sm57v1q.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhnx6y49adn6d8sm57v1q.webp" alt="Diagram showing how an embedding is split into subspaces, each mapped to codebooks, and converted into a quantized vector using centroid indices." width="800" height="419"&gt;&lt;/a&gt;&lt;br&gt;
Fig. 1: PQ’s uniform compression across subspaces&lt;/p&gt;

&lt;p&gt;PQ works by splitting each vector into equal-sized subspaces. It’s efficient, hardware-friendly, and the standard in vector search systems like FAISS.&lt;/p&gt;

&lt;p&gt;But because each subspace in PQ is equal, it’s like compressing every video frame in the same way and to the same size—whether it’s entirely black or full of detail. This approach keeps things simple and efficient but misses the opportunity to increase compression on a case-by-case basis.&lt;/p&gt;

&lt;p&gt;At Janea, we realized that vector dimensions vary in value—much like video frames vary in resolution and detail. This means we can adjust the aggressiveness of compression (or, more precisely, quantization) based on how relevant each dimension is, without affecting overall accuracy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution: JECQ - Intelligent, Dimension-Aware Compression for FAISS
&lt;/h2&gt;

&lt;p&gt;To strike the right balance between memory efficiency and accuracy, engineers at Janea Systems have developed JECQ, a novel, open-source compression algorithm available on GitHub that varies compression by the statistical relevance of each dimension.&lt;/p&gt;

&lt;p&gt;In this approach, the distances between quantized values become irregular, reflecting each dimension's complexity.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does JECQ work?
&lt;/h2&gt;

&lt;p&gt;The algorithm starts by determining the isotropy of each dimension based on the eigenvalues of the covariance matrix. In the future, the analysis will also cover sparsity and information density. &lt;br&gt;
The algorithm then classifies each dimension into one of three categories: low relevance, medium relevance, and high relevance. &lt;br&gt;
Dimensions with low relevance are discarded, with very little loss in accuracy.&lt;/p&gt;

&lt;p&gt;Medium-relevance dimensions are quantized using just one bit, again with minimal impact on accuracy.&lt;br&gt;
High-relevance dimensions undergo the standard product quantization.&lt;br&gt;
Compressed vectors are stored in a custom, compact format accessible via a lightweight API.&lt;/p&gt;

&lt;p&gt;The solution is compatible with existing vector databases and ANN frameworks, including FAISS.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the benefits and best use cases for JECQ?
&lt;/h2&gt;

&lt;p&gt;Early tests show memory footprint reduced by 6x, keeping 84.6% accuracy compared to non-compressed vector candidates. Figure 2 compares the memory footprint of an index before quantization, with product quantization (PQ), and with JECQ. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0t1hkdu76inhu2t14q61.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0t1hkdu76inhu2t14q61.webp" alt="Bar chart comparing memory usage: No Quantization (highest), PQ (lower), and JECQ (lowest), with the title " width="800" height="419"&gt;&lt;/a&gt;&lt;br&gt;
Fig. 2: Memory footprint before quantization, with PQ, and with JECQ&lt;/p&gt;

&lt;p&gt;We expect this will lower cloud and on-prem storage costs for enterprise AI search, enhance Edge AI performance by fitting more embeddings per device for RAG or semantic search, and reduce the storage footprint of historical embeddings.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are JECQ’s License and Features?
&lt;/h2&gt;

&lt;p&gt;JECQ is out on &lt;a href="https://github.com/JaneaSystems/jecq" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, available under the MIT license. It ships with an optimizer that takes a representative data sample or user-provided data and generates an optimized parameter set. Users can then fine-tune this by adjusting the objective function to balance their preferred accuracy–performance trade-off.&lt;/p&gt;




&lt;p&gt;We're planning to share more tools, experiments, and lessons learned from our work in open-source, AI infrastructure, and performance engineering. If this kind of stuff interests you, stay tuned — more to come soon.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>vectordatabase</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
