Learning & experimenting with local open-weight LLMs
Simulated chat between two users roleplayed by Gemma 3 4B Q4_0 using Ollama. Different scenarios can be configured in a YAML file.
The model performs surprisingly well on an older Intel i5 CPU without a GPU.
- Docker & Docker Compose
- Tested on Ubuntu 20.04 and 22.04
make build
make up
make run
make downRun lint (runs black and mypy too) and tests:
make lint
make test$ make run scenario=emopuppyExample Result
Bingo: ππ
Bluey: πΎπ₯°
Bingo: πΎππ! π¦΄π€ΈββοΈ
Bluey: πππ€ΈββοΈπΎπ₯°! π¦΄π₯³ππΎ!
Bingo: πΎπ₯°π€ΈββοΈπ₯³π! π¦΄ππ€ΈββοΈπ! πΎππ₯°π€ΈββοΈπ₯³! π¦΄ππΎπ₯°!
Bluey: πππΎπ€ΈββοΈπ₯³! π¦΄π₯°π€ΈββοΈπ! πΎππ€ΈββοΈπ₯³! π¦΄ππΎπ₯°! π₯³ππΎπ€ΈββοΈ! π¦΄ππ€ΈββοΈπ!
Bingo: πΎππ! π€ΈββοΈπ₯³π¦΄! πΎπ₯°π€ΈββοΈπ! π¦΄ππ€ΈββοΈπ₯³! πΎπ₯°π€ΈββοΈπ₯³! π₯³ππΎπ€ΈββοΈ! π¦΄ππ€ΈββοΈπ! ππΎπ!
Bluey: π€ΈββοΈπ₯³πΎππ! π¦΄π₯°π€ΈββοΈπ₯³! πΎππ€ΈββοΈπ₯³! π¦΄ππΎπ₯°! ππ€ΈββοΈππΎ! π₯³ππ€ΈββοΈπ! π¦΄π€ΈββοΈπ₯³π₯°!
Bingo: πππ€ΈββοΈπΎπ₯°! π₯³π€ΈββοΈπΎππ! π¦΄ππ€ΈββοΈπ₯³! πΎππ€ΈββοΈπ₯³! π¦΄π€ΈββοΈπ₯°π! ππ€ΈββοΈπΎπ!
Bluey: π€ΈββοΈπ₯³ππ¦΄! πΎππ₯°π€ΈββοΈπ₯³! ππ€ΈββοΈππΎ! π₯³ππΎπ€ΈββοΈ! π¦΄ππ€ΈββοΈπ! π€ΈββοΈπ₯³π₯°! ππΎπ! π€ΈββοΈπ₯³π¦΄! πΎππ€ΈββοΈπ₯³! π₯³ππΎπ€ΈββοΈ! π€ΈββοΈπ₯³π! ππ€ΈββοΈπ₯³! π€ΈββοΈπ₯³π!
Bingo: πππΎπ€ΈββοΈπ₯³! π¦΄π₯°π€ΈββοΈπ! πΎππ€ΈββοΈπ₯³! π₯³ππΎπ€ΈββοΈ! π€ΈββοΈππ! ππΎπ! π€ΈββοΈπ₯³π¦΄! πΎπ₯°π€ΈββοΈπ₯³! π₯³ππΎπ€ΈββοΈ! π€ΈββοΈπ₯³π! ππ€ΈββοΈπ₯³! π€ΈββοΈπ₯³π!$ make run scenario=scienceExample Result
Rick: Hey Lisa, what's up? π€ͺ
Lisa: Hello. Iβve been reviewing the latest advancements in transformer models. Specifically, the scaling laws are proving remarkably consistent, suggesting a predictable trajectory for performance improvements. Itβs fascinating, though I remain cautious about over-interpretation. What have you been investigating?
Rick: π€― Scaling laws are wild! I'm chasing diffusion models. π¨ It's like magic! β¨ What's your take? π€
Lisa: Interesting. The sheer scale of these transformer models isβ¦ concerning, frankly. The computational cost alone is staggering. I'm focusing on the limitations of attention mechanisms β the quadratic scaling with sequence length. It presents significant bottlenecks. Diffusion models, I acknowledge, offer an alternative approach. Do you believe they truly circumvent the fundamental computational constraints, or are they simply shifting the problem?
Rick: Massive! π€― Scaling is scary. But diffusion? Genius! π¨ Clever workaround. π Keep exploring! π
Lisa: Indeed. The probabilistic nature of diffusion offers a potential path. However, Iβm skeptical of their long-term robustness. The reliance on stochastic processes introduces inherent variability. Are you seeing evidence of this in your experiments? Specifically, Iβm examining the effect of noise schedules on sample quality versus training efficiency. Itβs proving a complex interplay.
(...)