The Curious Case of the bos_token — LessWrong
Edit: Simple application of these ideas achieved the GPT2 Speed Running world record of 171 seconds on 8H100 GPUs. https://github.com/KellerJordan/modded-nanogpt. LLMs process inputs as a sequence of tokens. Typically, a dummy token is prepended to the sequence, known as the bos_token (beginning of sequence token). Input: "Good morning" Token strings: ['<|bos_token|>', 'Good', ' morning'] Tokens: [50256, 10248, 3329] Though the bos_token passes through the same MLP and attention weights as all other tokens, it exhibits distinct emergent behavior. Its activations are several orders of magnitude larger than other tokens, and it often receives over 50% of the attention from downstream positions. Why is this token so critical? What drives this emergent behavior, and does it indicate architectural constraints of the model, or fundamental properties of language? These are all questions that researchers have asked and investigated heavily already. This post provides a walkthrough of emergent