Loading…
Loading…
A ~30M parameter language model trained from scratch on the TinyStories dataset.
| Component | Choice | Why |
|---|---|---|
| Position Encoding | RoPE | Used in LLaMA, Mistral, Gemma — better length generalization |
| Activation | SwiGLU | Used in LLaMA, PaLM — better gradient flow than GeLU |
| Normalization | RMSNorm | Used in LLaMA — faster than LayerNorm |
| Attention | Flash Attention (PyTorch 2.0+) | Memory efficient causal attention |
Prompt: "Once upon a time there was a little girl named Lily"
[Add sample output after training]
import torch
import tiktoken
from huggingface_hub import hf_hub_download
# Load weights
weights_path = hf_hub_download(repo_id="Manushi0304/tinystories-slm-rope", filename="pytorch_model.bin")
# Load config and rebuild model, then load state dict