Embedding Table Packing With Independent Decompression for ML Lookup

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing machine learning models face challenges in efficiently storing and looking up large embedding tables, which require significant memory and processing power, making it difficult to scale and run on devices with limited resources.

Innovation Solution

A system that compresses individual embeddings in an embedding table, allowing for independent decompression and storage with a machine learning model, enabling efficient storage and lookup without loading the entire table into memory.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If embedding tables are stored in full size to ensure accurate machine learning model operation, then model accuracy is maintained, but memory consumption and processing power requirements increase significantly

Engineering Contradiction:
Improvemodel accuracyVSAvoidmemory consumption
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The embedding table is divided into multiple shards or partitions that can be stored separately. Only the necessary shards need to be loaded into memory during inference, reducing peak memory consumption while maintaining model accuracy. Each shard contains a subset of the embedding vectors, organized by their index ranges.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Embedding tables are pre-compressed using various compression techniques (quantization, pruning, or specialized embedding compression algorithms) before deployment. This preliminary compression reduces the storage size and memory footprint while preserving the essential information needed for accurate model operation.

Inventive Principle:
Principle #10Preliminary action

2Speed

If entire embedding tables are loaded into memory for fast lookup, then lookup speed is improved, but devices with limited resources cannot run large models

Engineering Contradiction:
Improvelookup speedVSAvoiddevice compatibility
Core Design Contradiction:
SpeedVSAdaptability or versatility

Solution Approach 1:

The embedding table is segmented into multiple smaller shards that can be loaded on-demand or in batches. This allows devices with limited memory to run large models by loading only the necessary portions of the embedding table, improving device compatibility while maintaining reasonable lookup speeds through efficient shard management.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system dynamically loads and unloads embedding shards based on the current inference needs. Frequently accessed embeddings are kept in memory, while less frequently accessed ones are stored on disk or in external memory, creating a dynamic memory management system that adapts to device resources and access patterns.

Inventive Principle:
Principle #15Dynamics

3Quantity of substance

If compression is applied to reduce embedding table size, then storage efficiency is improved, but decompression complexity and processing overhead increase

Engineering Contradiction:
Improvestorage efficiencyVSAvoiddecompression complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The embedding vectors are transformed by changing their parameter representation, such as quantizing high-precision floats to lower-precision formats or transforming the vector space using dimensionality reduction techniques. This parameter transformation reduces storage requirements while keeping the decompression process relatively simple and computationally efficient.

Inventive Principle:
Principle #35Parameter changes

4Ease of operation

If embedding tables are compressed individually for each embedding, then random access and independent decompression are enabled, but compression and storage overhead increase

Engineering Contradiction:
Improverandom access capabilityVSAvoidcompression overhead
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The embedding table is segmented into multiple independent shards, where each shard can be compressed and stored separately. This segmentation enables random access to specific embedding vectors by loading only the relevant shard, improving ease of operation. The compression is applied at the shard level rather than requiring individual vector compression, reducing the overall complexity overhead.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12229108B2Efficient embedding table storage and lookup
Publication Date: 2025.02.18 GOOGLE LLC
  • US12229108B2 patent drawing
  • US12229108B2 patent drawing
  • US12229108B2 patent drawing

AI summary

The present disclosure provides systems, methods, and computer program products for providing efficient embedding table storage and lookup in machine-learning models. A computer-implemented method may include obtaining an embedding table comprising a plurality of embeddings respectively associated with a corresponding index of the embedding table, compressing each particular embedding of the embedding table individually allowing each respective embedding of the embedding table to be decompressed independent of any other embedding in the embedding table, packing the embedding table comprising individually compressed embeddings with a machine-learning model, receiving an input to use for locating an embedding in the embedding table, determining a lookup value based on the input to search indexes of the embedding table, locating the embedding based on searching the indexes of the embedding table for the determined lookup value, and decompressing the located embedding independent of any other embedding in the embedding table.