Views
No views yet
| Variant | C4 smooth | wikitext PPL | vs GELU |
|---|---|---|---|
| YatNMN per-neuron + learnable α | 2.98 | 40.15 | −0.14 |
| YatNMN scalar_bias + learnable α | 3.06 | 39.53 | −0.06 |
| YatNMN per-neuron + constant α=1 (this) | 3.10 | 67.09 | −0.02 |
| YatNMN sb + constant α=1 | 3.09 | 78.34 | −0.03 |
| GELU | 3.12 | 46.52 | baseline |
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model = AutoModelForCausalLM.from_pretrained(
5 "mlnomad/yatnmn-softplus-ca-d12-chinchilla-261M-pytorch",
6 trust_remote_code=True, dtype=torch.float32,
7).eval()
8tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
9
10ids = tokenizer("The meaning of life is", return_tensors="pt").input_ids
11with torch.no_grad():
12 out = model.generate(ids, max_new_tokens=50, do_sample=False,
13 use_cache=True, pad_token_id=tokenizer.eos_token_id or 0)
14print(tokenizer.decode(out[0], skip_special_tokens=True))(ff,) bias + softplus_bias + learnable_epsilon + constant_alpha=True (α=1 fixed).| Parameters | 261,133,214 |
| Final smooth loss | 3.08 (3-seed mean 3.10 ± 0.02) |
| Wikitext-103 PPL | 67.09 |
| Training data | allenai/c4, 5.22 B tokens (Chinchilla 20×) |
| Hardware | TPU v6e-8, europe-west4-a |
mlnomad/yatnmn-softplus-d12-chinchilla-261M-pytorch — with learnable α (loss 2.98, PPL 40)mlnomad/gelu-d12-chinchilla-261M-pytorch — GELU baseline