Views
No views yet
1# Install directly from GitHub
2!pip install git+https://github.com/DigitalDaimyo/AddressedStateAttention.git
3
4from asa import load_asm_checkpoint, generate
5from transformers import AutoTokenizer
6from huggingface_hub import hf_hub_download
7
8# Download checkpoint from Hugging Face
9ckpt_path = hf_hub_download(
10 repo_id="DigitalDaimyo/AddressedStateAttention",
11 filename="checkpoints/fineweb_187M_75k.pt"
12)
13
14# Load checkpoint
15model, cfg, ckpt = load_asm_checkpoint(
16 ckpt_path,
17 mode="analysis"
18)
19
20tokenizer = AutoTokenizer.from_pretrained("gpt2")
21
22# Generate text
23print(generate(model, tokenizer, "Once upon a time"))
24
25Performance
26FineWeb, 187M params: 3.73 val loss / 41.6 PPL (75k steps•32 batch•1024 seq)
27Architecture: 21 layers, 768d, 12 heads, 16 slots
28Links
29Code: https://github.com/DigitalDaimyo/AddressedStateAttention
30Paper: https://github.com/DigitalDaimyo/AddressedStateAttention/paper_drafts