Abstract
Recent achievements of vision-language models in end-to-end OCR point to a new avenue for low-loss compression of textual information. This motivates earlier works that render the Transformer's input into images for prefilling, which effectively reduces the number of tokens through visual encoding, thereby alleviating the quadratically increased Attention computations. However, this partial compression fails to save computational or memory costs at token-by-token inference. In this paper, we investigate global context compression, which saves tokens at both prefilling and inference stages. Consequently, we propose VIST2, a novel Transformer that interleaves input text chunks alongside their visual encoding, while depending exclusively on visual tokens in the pre-context to predict the next text token distribution. Around this idea, we render text chunks into sketch images and train VIST2 in multiple stages, starting from curriculum-scheduled pretraining for optical language modeling, followed by modal-interleaved instruction tuning. We conduct extensive experiments using VIST2 families scaled from 0.6B to 8B to explore the training recipe and hyperparameters. With a 4$\times$ compression ratio, the resulting models demonstrate significant superiority over baselines on long writing tasks, achieving, on average, a 3$\times$ speedup in first-token generation, 77% reduction in memory usage, and 74% reduction in FLOPS. Our codes and datasets will be public to support further studies.
Abstract (translated)
近期,视觉-语言模型在端到端光学字符识别(OCR)方面的成就指出了一种低损失压缩文本信息的新途径。这激发了早期的研究工作,将Transformer的输入转换为图像进行预填充,通过视觉编码有效减少了标记数量,从而减轻了注意力计算量二次增加的问题。然而,这种部分压缩未能在逐令牌推理过程中节省计算或内存成本。为此,在本文中,我们研究了一种全局上下文压缩方法,这种方法可以在预填充和推理阶段都节约令牌。 基于此,我们提出了VIST2,这是一种新型的Transformer模型,该模型交替输入文本块及其视觉编码,并且仅依赖于前缀中的视觉标记来预测下一个文本标记分布。围绕这一理念,我们将文本片段转换为草图图像,并通过分阶段训练VIST2来实现这一点,从基于课程调度的预训练开始,用于光学语言建模,然后进行模式交错指令微调。 我们使用扩展范围在0.6B到8B参数规模内的VIST2模型族进行了广泛的实验,以探索训练配方和超参数。通过4倍压缩比例,所得到的模型在长文本写作任务中表现出了相对于基线模型的重大优势,在首次生成标记的速度上平均提升了3倍,在内存使用量上减少了77%,浮点运算次数(FLOPS)减少74%。 我们的代码和数据集将公开发布,以支持进一步的研究。
URL
https://arxiv.org/abs/2601.10378