r/coolgithubprojects • u/Commercial_Lead5813 • 29m ago
I’m learning how character models work by building one lesson by lesson in Python
https://github.com/Sasen12/before-lecture-one-tiny-character-modelI’m teaching myself how language models work and turning each lesson into one open-source project. The current version connects the basics: character tokenization, context-and-target examples, counting which characters follow a context, and sampling those counts to generate a continuation.
It uses only Python’s standard library. It’s a tiny statistical model for learning, not a neural network or a useful chatbot yet. I’m planning to keep improving it as I work through more lessons.
The code is linked above. I’m documenting the lessons on YouTube too: https://www.youtube.com/channel/UCWMERaecgKZmrqPUHLqWuow
If you’re learning this stuff too, I’d be interested in feedback on the project structure or what would make the next step clearer.