MapReduce meets LLMs: Divide-and-conquer approach lets regular LLMs...

Using MapReduce principles, small-context LLMs now handle million-token documents efficiently.
Original Problem 🔍:
LLMs struggle to process extremely long texts exceeding their context window, limiting their application in tasks requiring comprehensive document understanding.
-----
Solution in this Paper 🛠️:
• LLM × MapReduce: A training-free framework for long-sequence processing
• Structured information protocol: Addresses inter-chunk dependency
• In-context confidence calibration: Resolves inter-chunk conflicts
• Three-stage process: Map, collapse, and reduce stages for efficient processing
-----
Key Insights from this Paper 💡:
• Divide-and-conquer approach enables short-context LLMs to handle long texts
• Structured information and confidence calibration improve cross-chunk processing
• Framework is compatible with different LLMs, demonstrating generalization capability
• Efficient design outperforms standard decoding in speed
-----
Results 📊:
• Outperforms closed-source and open-source LLMs on InfiniteBench
• Average score: 68.66 (vs. 57.34 for GPT-4)
• Enables Llama3-70B-Instruct (8K context) to process 1280K tokens
• Faster inference: 2 GPUs for 128K tokens (vs. 4 GPUs for standard decoding)
The LLM × MapReduce framework consists of three main stages:
1. Map stage: The long input text is divided into chunks, and an LLM extracts necessary information from each chunk.
2. Collapse stage: If the mapped results still exceed the model's context window, they are compressed while maintaining the same structure as the mapped results.
3. Reduce stage: The final response is generated based on the collapsed results.
1. Structured information protocol: This protocol defines the information passed from the map stage to the reduce stage, ensuring the model has critical inputs needed to infer the correct answer when aggregating different chunks.
2. In-context confidence calibration mechanism: This allows the model to assign reliable confidence scores to the output of each chunk, aiding in effectively resolving inter-chunk conflicts.

