Views
No views yet
modeling_simple_lm.py (bundled in this repo) and loaded via
trust_remote_code=True.checkpoints/lm_checkpoint_001_loss_2.pt| field | value |
|---|---|
| vocab_size | 32000 |
| context_length | 512 |
| d_model | 768 |
| n_layers | 12 |
| n_heads | 8 |
| d_ff | 2048 |
| activation | gelu |
| bias | True |
| tie_word_embeddings | True |
TinyLlama/TinyLlama-1.1B-Chat-v1.01from transformers import AutoModelForCausalLM, AutoTokenizer
2
3repo = "etanlightstone/simple-lm-v1"
4tok = AutoTokenizer.from_pretrained(repo)
5model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)
6
7prompt = "Once upon a time"
8ids = tok(prompt, return_tensors="pt").input_ids
9out = model.generate(ids, max_new_tokens=80, do_sample=True, top_k=50, temperature=0.9)
10print(tok.decode(out[0], skip_special_tokens=True))1{
2 "batch_size": 10,
3 "batch_size_note": "per GPU when using torchrun",
4 "world_size": 1,
5 "learning_rate": 0.0003,
6 "weight_decay": 0.01,
7 "num_epochs": 5,
8 "max_steps": null,
9 "grad_clip": 1.0,
10 "seed": 42,
11 "docs_dir": "/home/etan/simple_llm/docs"
12}