让视觉模型按需生成不同数量的令牌,提升效率与精度
TokenFLEX: Unified VLM Training for Flexible Visual Tokens Inference
- 训练时随机调整视觉令牌数,提升模型适应能力
- 在64/144/256个令牌下分别提升1.6%/1.0%/0.4%性能
- 适合需要灵活视觉输入的多任务视觉语言应用
传统视觉语言模型通常使用固定数量的视觉令牌,无论任务复杂度如何。这种通用策略导致效率低下:简单任务中过多令牌造成计算浪费,复杂任务中不足令牌则影响细粒度理解。为此,我们提出TokenFLEX,一种可动态调整视觉令牌数量的新型框架,实现与大语言模型高效融合。核心创新包括:训练阶段通过随机调节令牌数量提升模型泛化能力;设计轻量级视觉令牌投影器,结合自适应池化与SwiGLU,支持灵活下采样和特征适配。大量实验表明,TokenFLEX在8个基准测试上持续优于固定令牌模型,在64、144、256个令牌下平均提升1.6%、1.0%、0.4%,充分证明其灵活性与高性能。
原文摘要 · Abstract (English)
Conventional Vision-Language Models(VLMs) typically utilize a fixed number of vision tokens, regardless of task complexity. This one-size-fits-all strategy introduces notable inefficiencies: using excessive tokens leads to unnecessary computational overhead in simpler tasks, whereas insufficient tokens compromise fine-grained visual comprehension in more complex contexts. To overcome these limitations, we present TokenFLEX, an innovative and adaptable vision-language framework that encodes images into a variable number of tokens for efficient integration with a Large Language Model (LLM). Our approach is underpinned by two pivotal innovations. Firstly, we present a novel training paradigm that enhances performance across varying numbers of vision tokens by stochastically modulating token counts during training. Secondly, we design a lightweight vision token projector incorporating an adaptive pooling layer and SwiGLU, allowing for flexible downsampling of vision tokens and adaptive selection of features tailored to specific token counts. Comprehensive experiments reveal that TokenFLEX consistently outperforms its fixed-token counterparts, achieving notable performance gains across various token counts enhancements of 1.6%, 1.0%, and 0.4% with 64, 144, and 256 tokens, respectively averaged over eight vision-language benchmarks. These results underscore TokenFLEX's remarkable flexibility while maintaining high-performance vision-language understanding.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。