Text or Pixels? It Takes Half: On the Token Efficiency of Visual Text Inputs in Multimodal LLMs

Yanhong Li, Zixuan Lan, Jiawei ZhouarXiv 2025 · DOI

Abstract

Multimodal Large Language Models (MLLMs) face significant computational overhead when processing long text contexts due to the quadratic scaling of self-attention. This paper introduces ConTexImage, a method that renders text as images to utilize the vision encoder as an implicit compression layer. Our findings reveal a "Half Rule": MLLMs can process visual text with nearly 50% fewer tokens than raw text while maintaining 97-99% performance accuracy. This approach yields up to a 45% inference speedup, outperforming traditional text-pruning methods in preserving semantic structure.

Introduction

As the context windows of Large Language Models (LLMs) expand to accommodate entire libraries or extensive chat histories, the computational cost of inference grows quadratically. Traditional text-based compression, such as word pruning, often risks losing semantic nuances or requires task-specific training. This paper explores a novel alternative: leveraging the vision capabilities of MLLMs to compress text. By rendering documents as images, the system can represent large volumes of text using a fixed number of visual tokens, effectively bypassing the token-heavy nature of raw text processing.

Methodology: The ConTexImage Pipeline

The researchers propose ConTexImage, a pipeline designed to standardize the "text-as-image" approach for MLLMs. The process involves four key stages:

  1. Preprocessing: Normalizing text and escaping LaTeX characters.
  2. LaTeX Rendering: Typesetting text into a PDF and rasterizing it at 300 DPI.
  3. Adaptive Font Optimization: Automatically adjusting font size to maximize the image "fill ratio" while ensuring legibility for the model.
  4. Hybrid Input: Feeding the long context as an image while keeping the specific query as raw text.
The ConTexImage pipeline uses a hybrid input strategy, rendering the context as an image to save tokens while keeping the query in text format.

The efficiency of this method is measured by the compression ratio ($\rho$), which compares the number of original text tokens to the resulting visual tokens.

Key Insights: The "Half" Rule

Experimental results across multiple benchmarks (RULER, CNN/DailyMail, and BABILong 1k) highlight several critical insights:

  • The "Half" Rule: Performance remains nearly indistinguishable from text-only inputs as long as visual tokens account for approximately half of the original text token count ($\rho \approx 2$).
  • Vision as a Compression Layer: The vision encoder acts as a fixed-budget bottleneck, summarizing pixels into compact embeddings and offloading the quadratic cost from the LLM decoder.
  • Model Scale Tolerance: Larger models, such as Qwen2.5-VL-72B, are significantly more tolerant of high-density text images, maintaining high accuracy even with aggressive compression.

Results and Performance

The ConTexImage approach demonstrates superior efficiency and performance retention compared to traditional methods.

By using visual tokens, the model can reduce the decoder's workload from 90 tokens to 50 tokens for the same context.
  • Token Savings: The method achieved a reduction in decoder token usage of 38% to 58%.
  • Inference Speedup: For large open-weight models, the reduction in sequence length resulted in a 25–45% faster end-to-end inference time.
  • Retrieval Accuracy: On the RULER task, models sustained 97–99% accuracy while utilizing roughly half the tokens.
  • Superior Summarization: On CNN/DailyMail, the visual approach yielded higher ROUGE and BERTScore results than specialized text-pruning baselines like LLMLingua-2.

Conclusion

ConTexImage proves that visual text rendering is a viable and efficient strategy for long-context MLLM inference. While the current study focuses on medium-length contexts, future research will explore "chunking" strategies for extreme contexts (100k+ tokens) and the application of this method to highly technical domains. Combining text-level pruning with visual rendering represents a promising frontier for further "stacked" compression gains.

Summary updated

BibTeX
@misc{li2025text,
  author = {Yanhong Li and Zixuan Lan and Jiawei Zhou},
  title = {{Text or Pixels? It Takes Half: On the Token Efficiency of Visual Text Inputs in Multimodal LLMs}},
  year = {2025},
  eprint = {2510.18279},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.18279},
}
Figure