Views
No views yet
| Parameters | ~393M |
| Layers | 20 |
| Hidden size | 1280 |
| Attention heads | 10 |
| Vocab size | 65536 |
| Context length | 2048 |
| Training step | 21400 |
| Dataset | american_stories |
| Ordering | shuffled |
1import torch
2from huggingface_hub import hf_hub_download
3
4# Download
5model_path = hf_hub_download(repo_id="alanamarzoev/american-stories-shuffled-d20", filename="model.pt")
6config_path = hf_hub_download(repo_id="alanamarzoev/american-stories-shuffled-d20", filename="config.json")
7
8# Load config
9import json
10with open(config_path) as f:
11 config = json.load(f)
12
13# Load model (requires nanochat)
14from nanochat.gpt import GPT, GPTConfig
15model_config = GPTConfig(**config["model_config"])
16model = GPT(model_config)
17state_dict = torch.load(model_path, map_location="cpu")
18model.load_state_dict(state_dict)1{
2 "run_name": "as_shuffled_d20",
3 "device_type": "",
4 "depth": 20,
5 "max_seq_len": 2048,
6 "num_iterations": -1,
7 "target_flops": -1.0,
8 "target_param_data_ratio": 20,
9 "device_batch_size": 32,
10 "total_batch_size": 524288,
11 "embedding_lr": 0.2,
12 "unembedding_lr": 0.004,
13 "weight_decay": 0.0,
14 "matrix_lr": 0.02,
15 "grad_clip": 1.0,
16 "warmup_ratio": 0.0,
17 "warmdown_ratio": 0.2,
18 "final_lr_frac": 0.0,
19 "resume_from_step": -1,
20 "eval_every": 250,
21 "eval_tokens": 10485760,
22 "core_metric_every": 2000,
23 "core_metric_max_per_task": 500,
24 "sample_every": 2000,
25 "save_every": -1,
26 "model_tag": "american_stories_shuffled_d20",
27 "dataset": "american_stories",
28 "ordering": "shuffled",
29 "val_data_dir": "/data/lingo/marzoev/.cache/nanochat/american_stories_data_val"
30}