Downloads · 30 days
11
2% of all-time downloads
Grizzlykw/tokilm-9m-chat
tokilm-9m-chat is a text generation model from Grizzlykw. Use it when you need the model to write or continue text. The card lists the license as mit.
<p align="center" <img src="https://github.com/skorotkiewicz/tokilm/blob/main/assets/tokilm.png?raw=true" alt="TokiLM" width="300"/ </p
Downloads · 30 days
11
2% of all-time downloads
All-time downloads
731
Public
Repo size
930 MB
Likes
0
Public
Click a slice to open those files.
.pt839 MB · 90%
From the Hugging Face model README
A ~9M parameter LLM trained from scratch that speaks Toki Pona.
This project exists to show that training your own language model is not magic. One small repo, a few minutes on a T4 GPU, and you have a working LLM built from scratch.
You> toki
TokiLM> toki a. sina pona. mi wile toki pona.
You> moku li pona
TokiLM> moku li pona tawa mi. mi moku e kili.
You> sina pilin seme
TokiLM> mi pilin pona. mi lukin e suno.
| Parameters | 8.7M |
| Type | Vanilla transformer (from scratch) |
| Layers | 6 |
| Hidden dim | 384 |
| Heads | 6 |
| FFN | 768 (ReLU) |
| Vocab | 4,096 (BPE) |
| Max sequence | 128 tokens |
| Norm | LayerNorm |
| Position | Learned embeddings |
| LM head | Weight-tied with embeddings |
No GQA, no RoPE, no SwiGLU, no early exit. As simple as it gets.
python -m tokilm chat --checkpoint pytorch_model.bin --tokenizer tokenizer.json
Or programmatically:
from tokilm.inference import TokiInference
engine = TokiInference("pytorch_model.bin", "tokenizer.json")
r = engine.chat_completion([{"role": "user", "content": "toki"}])
print(r["choices"][0]["message"]["content"])
MIT