# DeepSeek Solved AI’s Memory Problem

## Executive summary

DeepSeek OCR addresses the escalating cost and memory burden of large language models (LLMs) by introducing a novel, learned compression method. Instead of passing raw text, the system converts documents into compressed vision tokens, drastically reducing data size while maintaining high text recovery rates. This engineering approach, which utilizes local window attention and convolutional compression, not only solves the memory problem but also enables high-throughput generation of training data for LLMs and VLMs.

## Key takeaways

- Addressing AI Memory Costs: The primary challenge in AI is the cost associated with tokens, which increases significantly with the length of input documents. DeepSeek proposes 'artificial forgetting' by compressing information.
- High-Efficiency Compression: The method converts large amounts of information (text) into an image representation, which is then compressed using a learned, token-based process. At 10x compression, the system recovers over 96% of the original text, using 90% less space.
- High-Throughput Data Generation: The system can generate training data for LLMs and VLMs at a rate exceeding 200,000 pages per day using a single A100 GPU.

## Technical details

- DeepSeek OCR Architecture: The encoder is engineered to handle high-resolution documents cost-effectively by employing three key components: 1) Local window attention, 2) A 16x convolutional compressor, and 3) Global visual processing. This allows the model to 'skim' and 'squeeze' information rather than processing every pixel with full attention.
- Data Flow: The process formally takes a small amount of compressed vision tokens and converts them into a much larger number of text tokens.
- Model Limitation (Claim): A later stress test suggests the model may rely heavily on language priors (contextual guessing, like auto-complete) rather than purely visual memory when the image becomes too compressed.

## Practical implications

- Significantly reduces the computational cost and token usage when processing large documents for AI systems.
- Enables scalable, high-throughput data generation pipelines for training next-generation LLMs and VLMs.
- Provides an open system for researchers to access and build upon advanced text compression techniques.

## Topics

Artificial Intelligence (AI), Large Language Models (LLMs), Computer Vision (CV), Optical Character Recognition (OCR), Data Compression, DeepSeek OCR paper, Lambda GPU Cloud

Source: https://www.youtube.com/watch?v=4fLVq6HJsKc
