Downloads · 30 days
178
41% of all-time downloads
Exquisique/BabyLangModel
BabyLangModel is a text generation model from Exquisique. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
A tiny GPT-style language model trained from scratch on the TinyStories dataset. Built using PyTorch and a custom architecture inspired by nanoGPT. This model was trained for 200k iterations on a consumer GPU (RTX 406…
Downloads · 30 days
178
41% of all-time downloads
All-time downloads
439
Public
Parameters
30M
600 MB on disk
Likes
1
Public
Click a slice to open those files.
.bin120 MB · 49%
From the Hugging Face model README
A tiny GPT-style language model trained from scratch on the TinyStories dataset. Built using PyTorch and a custom architecture inspired by nanoGPT. This model was trained for 200k iterations on a consumer GPU (RTX 4060) using custom code from scratch.
tiktoken)We trained on the open-source TinyStories dataset by Microsoft Research. It's a dataset of short, simple English stories written for young children (ages 2–4).
transformers)This model uses a custom architecture, so you need to use trust_remote_code=True:
from transformers import AutoModel
model = AutoModel.from_pretrained("Exquisique/BabyLangModel", trust_remote_code=True)
Prompt: Once upon a time there was a tiny robot who
Output: ...lived in a far away home. One day, a little girl named Lily decided to go on a special trip in the forest. She walked and walked until she got there but suddenly she started to go. Her mom called her and said, "Don't worry, Lily. We will get you my special ride."
🗣️ Still improving, but quite readable and story-like after 200k iterations!
You can find the full training code on GitHub or use this structure:
python -m src.tokenizer # Tokenize TinyStories
python -m src.train # Train model from scratch
python -m src.generate # Generate text
You’ll also find:
{
"vocab_size": 50257,
"block_size": 128,
"n_layer": 6,
"n_head": 6,
"n_embd": 384,
"model_type": "gpt"
}
To load the model, use:
from transformers import AutoModel
model = AutoModel.from_pretrained("Exquisique/BabyLangModel", trust_remote_code=True)
You can also upload a tokenizer later for full text input support (e.g. with tiktoken).
Exquisique — GenAI explorer, poetic dreamer, and neural model whisperer.
MIT — open source, fine-tune and remix freely. ✨