Glyph
Large language models (LLMs) conventionally represent text as sequences of discrete tokens, making long-context scaling largely a matter of processing more tokens more efficiently.We instead explore a complementary direction: increasing how much original context each token represents.To this end, we introduce Glyph, a framework that renders long texts into compact visual pages and processes them with a vision-language model (VLM), allowing a fixed context window to cover substantially more text.To make visual compression practical, Glyph combines continual pre-training on rendered long-text data, an LLM-driven genetic search to identify rendering configurations that balance compression and task performance, and post-training with supervised fine-tuning and reinforcement learning.Across multiple long-context benchmarks, Glyph achieves 3–4× token compression while maintaining performance comparable to strong text-only LLMs such as Qwen3-8B, with over 4× faster prefilling and decoding and 2× faster supervised fine-tuning.Under more aggressive compression, a VLM with a 128K context window can handle tasks that would otherwise require up to 1M input tokens.Our code and model are released at https://github.com/thu-coai/Glyph.
TL;DR
DeepSeek OCR처럼 visual compression 맥락에서, 이미지 렌더링 시 사용되는 파라미터(폰트 사이즈, 스타일, 컬러 등)를 genetic algorithm과 LLM을 이용해 최적의 세팅을 서치했다는 것이 기여다.
Introduction
The problem: softmax attention scales with sequence length.
Core idea: render the text into images, read it with a VLM
Method
Glyph: Three Stages



Results


Discussion
Core Idea: Higher token information density is a new axis for long context → Orthogonal to attention-based methods
Post-training step에서 OCR alighment를 뺐을 때 성능 하락폭이 가장 컸는데, 이것을 통해 실제 bottleneck은 reading fidelity에 있음을 알 수 있었다.
Ablation study showing the performance drop
(%) relative to the final Glyph model when components
are progressively removed.
Rendering setup 를 genetic algorithm으로 최적의 값을 찾았다고는 했지만, 실제로 optimal한 셋업은 단순히 흰 배경에 9포인트 좌측정렬 스타일이였는데, genetic algorithm을 돌려보면 보통 이렇게 평균으로 가는 느낌이 크다고 생각한다.
또, DeepSeek OCR처럼 visual compression 아이디어를 동일하게 차용했으나, 정작 DeepSeek와 비교하지는 않았고, 오히려 Qwen2.5나 GLM4처럼 살짝 예전의 모델과 비교한 것은 아쉽다.
마지막으로, pixel detour가 정당화된 부분이 없었는데, 비교 실험을 할 때 애초에 text 자체를 latent 등으로 압축해서 작동하는 모델군과 비교한게 아니라, 단순 모든 텍스트를 다 받는 LLM과 비교한 것이 아쉬웠다.
렌더링 세팅을 서치했다는 아디이어에서, 저자도 언급하기를 query adaptive한 를 찾는 것이 필요해 보이고, 이미지 자체는 텍스트 뿐만 아니라 문서 등의 레이아웃이나 위치관계의 정보도 가지고 있는데, 이것을 좀 더 적극적으로 활용한다면 pixel detour 아이디어를 좀 더 정당화할 수 있다고도 생각한다.