Views
No views yet
| Scale | Params | Tokens | C4 smooth loss | Wall time | Throughput |
|---|---|---|---|---|---|
| d=12 | 261M | 5.22B | 2.98 | 2.2 h | 660K tok/s |
| d=22 | 1.08B | 21.5B | 2.83 | 47.9 h | 125K tok/s |
pip install torch transformers safetensors1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model = AutoModelForCausalLM.from_pretrained(
5 "mlnomad/yatnmn-softplus-d22-chinchilla-1B-pytorch",
6 trust_remote_code=True,
7 dtype=torch.float32,
8).eval()
9
10tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
11
12prompt = "The meaning of life is"
13ids = tokenizer(prompt, return_tensors="pt").input_ids
14with torch.no_grad():
15 out = model.generate(
16 ids, max_new_tokens=50,
17 do_sample=True, temperature=0.8, top_p=0.9,
18 use_cache=True, pad_token_id=tokenizer.eos_token_id or 0,
19 )
20print(tokenizer.decode(out[0], skip_special_tokens=True))| Parameters | 1,077,145,546 (~1.08B) |
| Architecture | Nanochat GPT with YatNMN-Softplus MLP (d=22, n_embd=1408, n_head=22) |
| Config | seq_len=1024, tied embeddings, SSSL sliding window |
| Training data | allenai/c4 (English split), 21.5B tokens (Chinchilla 20×) |
| Tokenizer | mistralai/Mistral-7B-v0.1 (vocab 32,768) |
| Optimizer | plain AdamW, peak LR 0.03, warmup-cosine, grad_accum=8 (effective batch 512) |
| Hardware | TPU v6e-8 (TRC), europe-west4-a, FSDP + remat |
| Final loss (smooth) | 2.8325 |
| Wall time | 47.85 h |
| Throughput | 125K tok/s |
y = α · (x · W + softplus(b))² / (||x − W||² + softplus(ε))(ff,) bias, scalar learnable ε, scalar learnable α. Same config as the 261M model — architecture identical except depth (22 vs 12) and width (1408 vs 768).fsdp mesh axis)dots_saveable policy on all blocks├── config.json # HF config with auto_map
├── model.safetensors # ~4.3 GB, fp32
├── yatnmn_gpt.py # pure PyTorch Yat_GPT + YatNMN layer
├── torch_gpt.py # shared building blocks
├── configuration_yatnmn_gpt.py # PretrainedConfig subclass
├── modeling_yatnmn_gpt.py # PreTrainedModel + KV cache + GenerationMixin
└── README.mdmlnomad/yatnmn-softplus-d12-chinchilla-261M-pytorch — same architecture at 261M (d=12), loss 2.98mlnomad/gelu-d12-chinchilla-261M-pytorch — GELU baseline at 261M, loss 3.12nmn — YatNMN layer