BLYAT-7-144M
a micro-model for step-by-step arithmetic
2 min read
An experimental 144M-parameter language model trained completely from scratch by an indie developer on a single GTX 1060 6GB. Its standout feature is solving math problems step by step, made possible by a custom tokenizer (the tool that splits text into tokens) that treats every single digit as its own separate token. The model only understands English and isn't meant to be a reliable general assistant, as it frequently hallucinates facts with high confidence. Still, it's a great showcase of what you can achieve training compact architectures on consumer hardware at home.
Key features
- Decoder-only Transformer architecture (based on the Llama layout) with a 1024-token context window.
- Custom 32,768-token vocabulary where digits 0–9 are tokenized individually.
- 99.2% accuracy on a 520-problem math test set covering addition, subtraction, and multiplication.
- Two-stage training from scratch: pre-training on roughly 2.95B tokens followed by supervised fine-tuning.
What you can do
- Run local inference on modest hardware like a GTX 1060 thanks to lightweight float32 weights (~577 MB).
- Test step-by-step solving on arithmetic expressions and word problems in English.
- Use it as an educational baseline or a starting point for researching compact LLMs.
Example
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = 'cttyyyy/BLYAT-7-144M'
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo).eval()
prompt = tok.apply_chat_template([{'role': 'user', 'content': 'What is 347 plus 286?'}], tokenize=False)
out = model.generate(**tok(prompt, return_tensors='pt'))
print(tok.decode(out[0]))
Read more
DetailsParameters: 144.3M (12 layers, hidden size 896)
Hardware: Trained on a single GTX 1060 6GB over 14 days
Limitations: English only, factual hallucinations, 1024-token context
License: CC BY-NC 4.0 (non-commercial)










Comments