This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| TinyAdder-1: 1-parameter hand-coded transformer for 10-digit addition. | |
| AdderBoard submission — hand-coded weights (constructive proof). | |
| Architecture: 2L decoder, d=5→16, 5h+1h, ALiBi slope=log(BASE). | |
| The single parameter is BASE (=10), the number base. | |
| All weights are deterministically derived from BASE: | |
| K_WEIGHT = BASE × (BASE² − 4) = 960 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| TinyAdder-5: 5-parameter hand-coded transformer for 10-digit addition. | |
| AdderBoard submission — hand-coded weights (constructive proof). | |
| Architecture: 2L decoder, d=5→16, 5h+1h, ALiBi slope=log(10). | |
| Unique parameters: BASE=10, K_WEIGHT=960, K_BIAS=-1000, V_W1=0.1, DIGIT_OFFSET=0.5 | |
| All other values (embedding, projections, FFN weights) are derived from these 5. | |
| """ |