DeepSeek V4 Architecture
Lightning Indexer
Repository-Level Reasoning powered by DeepSeek Sparse Attention (DSA).
Share:
What is Lightning Indexer?
Lightning Indexer is a breakthrough feature in DeepSeek V4 that allows the model to instantly ingest and index entire code repositories. Instead of just stuffing files into a context window, it builds a structural dependency map of your codebase, understanding how functions, classes, and modules interact across thousands of files.

Figure 1: Linear Scanning vs Lightning Indexing
Linear Context vs Structural Index
Traditional Context
Linear token sequence. Hard to find distant dependencies. 'Lost in the Middle' problem.
Lightning Indexer
Graph-based structural understanding. O(1) access to any definition or reference in the repo.
Retrieval Accuracy
Powered by DSA & Sparse FP8
This capability is enabled by DeepSeek Sparse Attention (DSA) and Sparse FP8 Decoding. DSA allows the model to selectively focus on relevant code blocks across millions of tokens without processing the entire context for every token generation, making repo-wide reasoning computationally feasible.
Frequently Asked Questions
Share:
Related Reading
Get V4 Leaks
Join 50,000+ developers tracking V4.