The best ChatGPT that $100 can buy.
Python
update the default GPTConfig kwargs otherwise they are confusing
Andrej Karpathye7ed2082b836
diff --git a/nanochat/gpt.py b/nanochat/gpt.pyindex a077256..cb4bd05 100644--- a/nanochat/gpt.py+++ b/nanochat/gpt.py@@ -28,8 +28,8 @@ from nanochat.flash_attention import flash_attn@dataclassclass GPTConfig:- sequence_len: int = 1024- vocab_size: int = 50304+ sequence_len: int = 2048+ vocab_size: int = 32768n_layer: int = 12n_head: int = 6 # number of query headsn_kv_head: int = 6 # number of key/value heads (GQA)@@ -37,7 +37,7 @@ class GPTConfig:# Sliding window attention pattern string, tiled across layers. Final layer always L.# Characters: L=long (full context), S=short (half context)# Examples: "L"=all full context, "SL"=alternating, "SSL"=two short then one long- window_pattern: str = "L"+ window_pattern: str = "SSSL"def norm(x):