TULIP: Token-length Upgraded CLIP

Ivona Najdenkoska, Mohammad Mahdi Derakhshani, Yuki Asano, N. V. Noord, M. Worring +1 more
2/12/2026

No official code found. Best implementation: ivonajdenkoska/tulip (32 stars, Apache-2.0, last commit 2026-01-26).

Abstract

We address the challenge of representing long captions in vision-language models, such as CLIP. By design these models are limited by fixed, absolute positional encodings, restricting inputs to a maximum of 77 tokens and hindering performance on tasks requiring longer descriptions. Although recent work has attempted to overcome this limit, their proposed approaches struggle to model token relationships over longer distances and simply extend to a fixed new token length. Instead, we propose a generalizable method, named TULIP, able to upgrade the token length to any length for CLIP-like models. We do so by improving the architecture with relative position encodings, followed by a training procedure that (i) distills the original CLIP text encoder into an encoder with relative position encodings and (ii) enhances the model for aligning longer captions with images. By effectively encoding captions longer than the default 77 tokens, our model outperforms baselines on cross-modal tasks such as retrieval and text-to-image generation. The code repository is available at https://github.com/ivonajdenkoska/tulip.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[ICLR 2025] Official code repository for "TULIP: Token-length Upgraded CLIP"

321Shell, PythonNov 11, 20248 months agoApache-2.0
clip-modelcontext-windowcontrastive-learningcross-modal-retrievaliclr-2025+6 more

Similar Papers

Cite this paper

@article{najdenkoska2026tulip,
  title  = {TULIP: Token-length Upgraded CLIP},
  author = {Ivona Najdenkoska and Mohammad Mahdi Derakhshani and Yuki Asano and N. V. Noord and M. Worring and Cees G. M. Snoek},
  year   = {2026},
  eprint = {2410.10034},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.10034},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.10034.svg)](https://codeofpaper.com/paper/2410.10034)

Discussion