Code · architecture · study mode
Hash every (prev token, curr token) pair into a 251 520-bucket table. Position 0 gets reserved slot 251 519 (no prev…
Full explanation below the code →
Hash every (prev token, curr token) pair into a 251 520-bucket table. Position 0 gets reserved slot 251 519 (no prev token). Two odd integers XOR-combined → fast collision spread.
What problem does a 251K-bucket table cause when you have 2.5B possible bigrams?