TokenSeek: Memory Efficient Fine Tuning via Instance-Aware Token Ditching
Runjia Zeng, Qifan Wang, Qiang Guan, Ruixiang Tang, Lifu Huang, Zhenting Wang, Xueling Zhang, Cheng Han, Dongfang Liu
TL;DR
TokenSeek tackles the memory bottleneck in fine-tuning large language models by introducing instance-aware token seeking and efficient token ditching, a universal plugin for Transformer-based models. By scoring tokens with context and gradient signals and updating only the selected ones, it achieves substantial activation-memory reductions while maintaining or improving performance, and it remains compatible with PEFT techniques like LoRa and QLoRA. The approach is architecture-agnostic, interpretable, and demonstrates strong generalization across model scales (0.5B–7B) and datasets, with notable gains on Llama3.2 and Qwen models. Overall, TokenSeek offers a practical path to memory-efficient LLM adaptation suitable for resource-constrained environments, contributing both to performance and to insights into token-level efficiency.
Abstract
Fine tuning has been regarded as a de facto approach for adapting large language models (LLMs) to downstream tasks, but the high training memory consumption inherited from LLMs makes this process inefficient. Among existing memory efficient approaches, activation-related optimization has proven particularly effective, as activations consistently dominate overall memory consumption. Although prior arts offer various activation optimization strategies, their data-agnostic nature ultimately results in ineffective and unstable fine tuning. In this paper, we propose TokenSeek, a universal plugin solution for various transformer-based models through instance-aware token seeking and ditching, achieving significant fine-tuning memory savings (e.g., requiring only 14.8% of the memory on Llama3.2 1B) with on-par or even better performance. Furthermore, our interpretable token seeking process reveals the underlying reasons for its effectiveness, offering valuable insights for future research on token efficiency. Homepage: https://runjia.tech/iclr_tokenseek/
