Build an LLM from Scratch 3: Coding attention mechanisms