arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.02142cs.CV
收藏

将物体识别视为下一令牌预测

Object Recognition as Next Token Prediction

Meta;ELLIS Institute(ELLIS研究所);MPI-IS Tübingen(蒂宾根马克斯·普朗克智能系统研究所);University of Maryland(马里兰大学);University of Central Florida(中佛罗里达大学)

Kaiyu Yue, Bor-Chun Chen, Jonas Geiping, Hengduo Li, Tom Goldstein, Ser-Nam Lim

AI总结:

本文提出将物体识别转化为下一令牌预测任务,通过定制非因果注意力掩码和一次性采样实现高效并行标签生成,并利用裁剪预训练语言模型构建紧凑解码器,在保持性能的同时显著提升效率。

摘要:

我们提出了一种将物体识别建模为下一令牌预测的方法。其核心思想是应用一个语言解码器,以自回归方式从图像嵌入中预测文本令牌,从而形成标签。为了使这一预测过程建立在自回归机制之上,我们为解码器定制了一种非因果注意力掩码,该掩码包含两个关键特性:将来自不同标签的令牌建模为相互独立,并将图像令牌视为前缀。这种掩码机制启发了一种高效方法——一次性采样(one-shot sampling)——在推理过程中并行地同时采样多个标签的令牌,并根据其概率对生成的标签进行排序。为了进一步提升效率,我们提出了一种简单策略,通过直接丢弃预训练语言模型的中间块来构建紧凑解码器。该方法得到的解码器在性能上与完整模型相当,同时效率显著更高。代码可在 https://github.com/kaiyuyue/nxtp 获取。

英文摘要:

We present an approach to pose object recognition as next token prediction. The idea is to apply a language decoder that auto-regressively predicts the text tokens from image embeddings to form labels. To ground this prediction process in auto-regression, we customize a non-causal attention mask for the decoder, incorporating two key features: modeling tokens from different labels to be independent, and treating image tokens as a prefix. This masking mechanism inspires an efficient method - one-shot sampling - to simultaneously sample tokens of multiple labels in parallel and rank generated labels by their probabilities during inference. To further enhance the efficiency, we propose a simple strategy to construct a compact decoder by simply discarding the intermediate blocks of a pretrained language model. This approach yields a decoder that matches the full model's performance while being notably more efficient. The code is available at https://github.com/kaiyuyue/nxtp

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑