Have you tried to have ChatGPT explain the code to you? I also looked at the tokenizer when I walked through the Disco Diffusion code during summer. Never had time to exercise it though, and finally gave up.