Current approaches to reducing undesired capabilities in language models are largely post hoc, and can thus be easily bypassed by adversaries. A natural alternative is to shape capabilities during pretraining itself. On the proxy task of removing medical capabilities, we show that the simple intervention of filtering pretraining data is highly effective, robust, and inexpensive at scale. Inspired by work on data attribution, we show that filtering tokens is more effective than filtering documents, achieving the same hit to undesired capabilities at a lower cost to benign ones. Training models spanning two orders of magnitude, we then demonstrate that filtering gets more effective with scale: for our largest models, token filtering leads to a 7000x compute slowdown on the forget domain. We also show that models trained with token filtering can still be aligned on the forget domain. Along the way, we introduce a methodology for labeling tokens with sparse autoencoders and distilling cheap, high-quality classifiers. We also demonstrate that filtering can be robust to noisy labels with sufficient pretraining compute.
Unlocking Full Efficiency of Token Filtering in Large Language Model Training
Shanghai University of Finance and Economics(上海财经大学);Hong Kong University of Science and Technology(香港科技大学);University of Science and Technology of China(中国科学技术大学);Southeast University(东南大学)
Great Bay University(大湾大学);Tsinghua University(清华大学);Shenzhen University(深圳大学);Dongguan Key Laboratory for AI and Dynamical Systems(东莞人工智能与动力系统重点实验室);Deakin University(德肯大学)