Views
No views yet
| Parameters | 15,735,168 (12,589,440 non-embedding) |
| Layers | 8 |
| Hidden size | 384 |
| Attention heads | 6 query / 2 key-value (GQA) |
| Head dim | 64 |
| MLP | SwiGLU, intermediate 1024 |
| Normalization | RMSNorm (eps 1e-05) |
| Position encoding | RoPE (theta 10000) |
| Context length | 512 |
| Vocabulary | 8192 (SentencePiece BPE, byte fallback) |
| Embeddings | tied input/output |
| Tokens | 164M (~10 per parameter) |
| Steps | 2,500 at 65,536 tokens/step |
| Optimizer | AdamW (betas 0.9/0.95, wd 0.1 on matrices only) |
| Schedule | cosine, 200 warmup steps, peak LR 0.0006 |
| Precision | fp16 AMP with loss scaling |
| Hardware | 1x NVIDIA T4 (Colab free tier) |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tok = AutoTokenizer.from_pretrained("pythonstudentiam/tinyllm")
4model = AutoModelForCausalLM.from_pretrained("pythonstudentiam/tinyllm")
5
6messages = [{"role": "user", "content": "Write a story about a lost puppy."}]
7prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
8ids = tok(prompt, return_tensors="pt")
9out = model.generate(**ids, max_new_tokens=250, do_sample=True, temperature=0.8)
10print(tok.decode(out[0], skip_special_tokens=True))llama-server -m tinyllm-Q8_0.gguf -c 512 --host 127.0.0.1 --port 8080