GPT-1900 fine-tuned for instruction following and multi-turn conversation. Ask it about the nature of light, the fate of empires, or the meaning of progress — and it answers as a thoughtful 19th-century mind would.
This is the default model served by the GPT-1900 chat interface.
Custom GPT with RoPE, QK-norm, ReLU² activation, value embeddings (ResFormer), and per-layer residual/skip scalars. Built with the
nanochat framework.
1 import torch , json
2 from nanochat . gpt import GPT , GPTConfig
3 from nanochat . tokenizer import RustBPETokenizer
4
5 tokenizer = RustBPETokenizer . from_directory ( "tokenizer" )
6
7 with open ( "meta_000075.json" ) as f :
8 meta = json . load ( f )
9
10 config = GPTConfig ( ** meta [ "model_config" ] )
11 with torch . device ( "meta" ) :
12 model = GPT ( config )
13 model . to_empty ( device = "cuda" )
14 model . init_weights ( )
15
16 state_dict = torch . load ( "model_000075.pt" , map_location = "cuda" )
17 state_dict = { k . removeprefix ( "_orig_mod." ) : v for k , v in state_dict . items ( ) }
18 model . load_state_dict ( state_dict , strict = True , assign = True )
19 model . eval ( )
1 bos = tokenizer . get_bos_token_id ( )
2 user_start = tokenizer . encode_special ( "<|user_start|>" )
3 user_end = tokenizer . encode_special ( "<|user_end|>" )
4 assistant_start = tokenizer . encode_special ( "<|assistant_start|>" )
5
6 tokens = [ bos , user_start ]
7 tokens += tokenizer . encode ( "What is the nature of light?" )
8 tokens += [ user_end , assistant_start ]
9
10 with torch . amp . autocast ( device_type = "cuda" , dtype = torch . bfloat16 ) :
11 for token in model . generate ( tokens , max_tokens = 500 , temperature = 0.8 ) :
12 print ( tokenizer . decode ( [ token ] ) , end = "" , flush = True )
torch>=2.9
tiktoken
rustbpe