Text or Pixels? Evaluating Efficiency and Understanding of LLM s with Visual Text Inputs (2025)

Abstract: Large language models (LLMs) and their multimodal variants can now process visual inputs, including images of text. This raises an intriguing question: Can we compress textual inputs by feeding them as images to reduce token usage while preserving performance?In this paper, we show that *visual text representations* are a practical and surprisingly effective form of input compression for decoder LLMs. We exploit this idea by rendering long text inputs as a single image and providing it directly to the model. This approach dramatically reduces the number of decoder tokens required, offering a new form of input compression. Through experiments on two distinct benchmarks — RULER (long-context retrieval) and CNN/DailyMail (document summarization) — we demonstrate that this text-as-image method yields substantial token savings *without degrading task performance*.

## introduction running large language model (llm) inference on long text inputs is computationally expensive due to the underlying architecture of the transformer model, where the self-attention mechanism's complexity scales quadratically with the input length @xcite . this can be prohibitive when processing long documents @xcite , interactive dialogues @xcite , or complex multi-step reasoning @xcite . even with recent increases in context length, deploying llms at scale (e.g., in chat assistants or document analysis) is constrained by throughput and cost per token @xcite @xcite . reducing the token length of inputs without losing information is therefore highly desirable for improving llm efficiency @xcite @xcite ). ## experiments and results we test to what extent visual inputs of texts can reduce discrete token consumption in llm decoders without performance degradation. long context tasks are especially targeted, including information retrieval and summarization, with configurable context lengths. we test two prominent multimodal llms, the proprietary gpt-4.1-mini (openai, 2025) and the open-weight qwen2.5-vl-72b-instruct @xcite . 3 all text-as-image rendering is performed with pdflatex followed by rasterization at 300 dpi. algorithmic details can be found in appendix d. during inference, we use the @xmath0. ## conclusion our primary goal is to answer the question: "how many tokens can be saved by replacing text with an image without harming downstream performance?" by converting long contexts into visual form, we achieved nearly two-fold reductions in decoder token count while preserving task accuracy on both retrieval (ruler s-niah) and generation (cn-n/dailymail summarization) benchmarks. the approach is model-and task-agnostic, requires no parameter updates, and can even lower latency on large decoders. our findings suggest several directions for future work: (i) applying token-level pruning before visual rendering to further compound compression gains; and (ii) expanding the approach to other domains (e.g. math) where most prompt tokens are critical and thus difficult to prune at the token level. we hope this study will spark broader exploration of modality shifting as a complementary axis for scaling the usability and efficiency of large language models.