SAMTok: Representing Any Mask with Two Words
- lab Hugging Face
- lab arXivLabs
- location arXiv
- person Yikang Zhou
- product QwenVL series
- product SAM2
- product SAMTok
A new method called SAMTok compresses any image region mask into just two discrete tokens, allowing large vision-language models to perform pixel-level tasks using standard next-token prediction and reinforcement learning, according to a paper published on arXiv [1]. The approach, detailed by Yikang Zhou and collaborators, addresses a persistent bottleneck in multi-modal large language models (MLLMs). While these models handle text and images, adding precise pixel-wise capabilities has typically required complex region encoders and specialized decoders that complicate scaling [2]. SAMTok sidesteps this by treating masks as a new language. It converts any region mask into two special tokens and reconstructs the mask from them with high fidelity, enabling base MLLMs to learn segmentation and grounding without architectural changes [2]. The tokenizer builds on the SAM2 architecture and was trained on 209 million diverse masks using a mask encoder and a residual vector quantizer [2]. The researchers formatted 5 million data samples for mask understanding and generation [2]. When integrated with the QwenVL model series, the resulting system, QwenVL-SAMTok, achieved state-of-the-art or comparable performance across a suite of benchmarks: region captioning, region visual question answering, grounded conversation, referring segmentation, scene graph parsing, and multi-round interactive segmentation [2]. The team also introduced a textual answer-matching reward to enable efficient reinforcement learning for mask generation, reporting substantial gains on the GRES and GCG benchmarks [2]. The work lands as the broader AI community continues to push for more accessible and reproducible research. arXiv has integrated with Hugging Face Spaces to let authors and the community attach interactive demos directly to paper pages, allowing anyone to test models in a browser without writing code [3][4]. The SAMTok paper’s arXiv page includes a Demos tab, part of the arXivLabs framework that lets collaborators build features on top of the repository [1][4]. Hugging Face Spaces, launched in October 2021, now hosts over 12,000 such demos, built with tools like Gradio and Streamlit [3]. The release also coincides with a period of intense competition in open-weight AI development. Chinese firm DeepSeek, founded in July 2023, drew global attention in January 2025 when its DeepSeek-R1 model matched leading proprietary systems at a fraction of the reported training cost—$6 million versus the estimated $100 million for OpenAI’s GPT-4 [6]. DeepSeek’s models are released under permissive open-source licenses, primarily the MIT License, though training data is not openly licensed [6]. The SAMTok authors have similarly made their code and models publicly available [2].
research-papermodel-releaseproduct-launchbenchmark
Background sources we checked (7)
- arxiv.org ↗ Pixel-wise capabilities are essential for building interactive intelligent systems. However, pixel-wise multi-modal LLMs (MLLMs) remain difficult to scale due to complex region-level encoders, specialized segmentation decoders, and incompatible training objectives. To address the…
- huggingface.co ↗ Hugging Face Machine Learning Demos on arXiv Back to Articles ... # Hugging Face Machine Learning Demos on arXiv Published November 17, 2022 Update on GitHub Upvote 1 - - - - - Abubakar Abid abidlabs Follow …
- info.arxiv.org ↗ ## Hugging Face Spaces ... Hugging Face code repositories, About Hugging Face ... Collaborators: Abubakar Abid, Omar Sanseviero, Ahsen Khaliq, and the Hugging Face team ... Hugging Face Spaces includes links to demos created by the community or the authors themselves. By going to…
- huggingface.co ↗ Demos on Hugging Face Spaces allow a wide audience to try out state-of-the-art machine learning research without writing any code. Hugging Face and ArXiv have collaborated to embed these demos directly along side papers on ArXiv! ... Thanks to this integration, users can now find…
- en.wikipedia.org ↗ Hangzhou DeepSeek Artificial Intelligence Basic Technology Research Co., Ltd., doing business as DeepSeek, is a Chinese artificial intelligence (AI) company that develops large language models (LLMs). Based in Hangzhou, Zhejiang, DeepSeek is owned and funded by High-Flyer, a Chin…
- en.wikipedia.org ↗ A large language model (LLM) is a type of machine learning model designed for natural language processing tasks such as language generation. LLMs are language models with many parameters, and are trained with self-supervised learning on a vast amount of text.…
- en.wikipedia.org ↗ Douwe Kiela is a Dutch-American research scientist and entrepreneur working in the field of artificial intelligence with a focus on machine learning and natural language processing. He is a research scientist director at Google DeepMind. He previously co-founded and served as CEO…
Sources
- export.arxiv.org — SAMTok: Representing Any Mask with Two Words ↗