nazdef commited on
Commit
de3af9d
·
verified ·
1 Parent(s): db66464

Publish step_23100 decay-only checkpoint candidate

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: [en, it]
3
+ license: cc-by-sa-4.0
4
+ library_name: transformers
5
+ pipeline_tag: text-generation
6
+ datasets:
7
+ - epfml/FineWeb-HQ
8
+ - epfml/FineWeb2-HQ
9
+ - google/wiki40b
10
+ tags:
11
+ - 1gpu-llm
12
+ - single-gpu
13
+ - continual-pretraining
14
+ - decay-only
15
+ - gpt2preln
16
+ - bilingual
17
+ - english
18
+ - italian
19
+ - checkpoint-release
20
+ - gpt2
21
+ - causal-lm
22
+ - llm-nanochat
23
+ - medium
24
+ ---
25
+
26
+ # GPT2Medium EN/IT NanoChat — 22k decay-only checkpoint `step_23100`
27
+
28
+ This is an **ordinary, non-official checkpoint release** from a decay-only continual-pretraining branch started from `step_22000`. It is a candidate for comparison in the future `1gpu-llm-medium-v2` selection; it is not the definitive v2 release.
29
+
30
+ ## Released checkpoint
31
+
32
+ - checkpoint: `step_23100.pt`
33
+ - branch: `20260713_resume-gpt2medium-gpt2preln-k20-wsddecayonly-cpt14700-step22000-lr5e5-final1e5-webwiki-d1800`
34
+ - parent checkpoint: `step_22000.pt`
35
+ - decay schedule: `1800` steps, final target `step_23800`
36
+ - languages: English + Italian
37
+ - context window: `2500` tokens
38
+ - architecture: GPT-2-style decoder with pre-layernorm blocks
39
+ - architecture identifiers: `architecture: gpt2`, `block_type: gpt2_prelayernorm`
40
+ - parameter count: approximately `337.7M` native training parameters; approximately `337.6M` in the Transformers export
41
+ - hardware: single RTX 4060 Ti 16GB
42
+
43
+ ## Selection and position
44
+
45
+ `step_23100` is the scalar winner of the branch, reached after `1100` of the `1800` decay steps:
46
+
47
+ - parent `step_22000`: `val_loss_mixed = 4.5058`
48
+ - winner `step_23100`: `val_loss_mixed = 4.4675`
49
+ - improvement: `-0.0383`
50
+ - endpoint `step_23800`: `val_loss_mixed = 4.4918`
51
+
52
+ The endpoint must therefore not be promoted automatically. The current global medium scalar champion remains the no-decay-branch CPT checkpoint `step_34000` at `4.4401`. This checkpoint is a branch winner and comparison candidate, not an official family release.
53
+
54
+ ## Training data
55
+
56
+ The model was trained on the bilingual EN/IT web + wiki corpus:
57
+
58
+ - English FineWeb-HQ (`epfml/FineWeb-HQ`)
59
+ - Italian FineWeb2-HQ (`epfml/FineWeb2-HQ`)
60
+ - English and Italian Wiki40B (`google/wiki40b`)
61
+ - local dataset: `202605141153_fineweb50_wiki50_50en_50it_score100_2500context_5Btokens_tok_20260515_en50it50_webwiki_stratified_500M`
62
+
63
+ ## Quick start
64
+
65
+ ```python
66
+ from transformers import AutoModelForCausalLM, AutoTokenizer
67
+ import torch
68
+
69
+ repo_id = "nazdef/20260713_resume-gpt2medium-step22000-d1800-step23100"
70
+ tokenizer = AutoTokenizer.from_pretrained(repo_id)
71
+ model = AutoModelForCausalLM.from_pretrained(repo_id)
72
+
73
+ prompt = "La capitale d'Italia è"
74
+ prompt_ids = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
75
+ bos = torch.tensor([[tokenizer.bos_token_id]], dtype=prompt_ids["input_ids"].dtype)
76
+ input_ids = torch.cat([bos, prompt_ids["input_ids"]], dim=1)
77
+ attention_mask = torch.ones_like(input_ids)
78
+ outputs = model.generate(
79
+ input_ids=input_ids,
80
+ attention_mask=attention_mask,
81
+ do_sample=True,
82
+ max_new_tokens=64,
83
+ temperature=0.8,
84
+ top_k=50,
85
+ top_p=0.95,
86
+ repetition_penalty=1.1,
87
+ eos_token_id=tokenizer.eos_token_id,
88
+ pad_token_id=tokenizer.pad_token_id,
89
+ )
90
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
91
+ ```
92
+
93
+ This is a base pretraining checkpoint, not an instruction-tuned chat model.
94
+
95
+ ## License
96
+
97
+ This release uses **CC-BY-SA-4.0** as the practical downstream posture for the mixed training corpus. The corpus combines FineWeb-HQ/FineWeb2-HQ web data and Wiki40B slices, whose upstream terms and attribution/share-alike obligations may apply to downstream use and redistribution. Users are responsible for checking that their intended use and derivative packaging comply with the upstream dataset terms.
benchmark_report_22100to23800.md ADDED
The diff for this file is too large to render. See raw diff
 
benchmark_summary_22100to23800.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "comparison_path": "/mnt/apps/llm-nanochat/evals/20260714_1407_gpt2medium_wsddo22000_d1800_22100to23800_cpu_full_benchmark/comparison.json",
3
+ "metadata_path": "/mnt/apps/llm-nanochat/evals/20260714_1407_gpt2medium_wsddo22000_d1800_22100to23800_cpu_full_benchmark/eval_metadata.json",
4
+ "num_checkpoints": 18,
5
+ "out_dir": "/mnt/apps/llm-nanochat/evals/20260714_1407_gpt2medium_wsddo22000_d1800_22100to23800_cpu_full_benchmark",
6
+ "recommended_checkpoint": {
7
+ "checkpoint_name": "step_23100",
8
+ "checkpoint_path": "/mnt/apps/llm-nanochat/checkpoints/20260713_resume-gpt2medium-gpt2preln-k20-wsddecayonly-cpt14700-step22000-lr5e5-final1e5-webwiki-d1800/step_23100.pt",
9
+ "direction": "min",
10
+ "value": 4.467542012532552
11
+ },
12
+ "report_path": "/mnt/apps/llm-nanochat/evals/20260714_1407_gpt2medium_wsddo22000_d1800_22100to23800_cpu_full_benchmark/report.md",
13
+ "suite": "pretrain_minimal_en_it_webwiki_step11000"
14
+ }
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_function": "gelu",
3
+ "architecture": "gpt2",
4
+ "architectures": [
5
+ "GPT2LMHeadModel"
6
+ ],
7
+ "attn_pdrop": 0.0,
8
+ "block_type": "gpt2_prelayernorm",
9
+ "causal_mask_mode": "buffered_upper_triangular",
10
+ "embd_pdrop": 0.0,
11
+ "init_strategy": "gpt2_std_0.02_residual_scale",
12
+ "layer_norm_epsilon": 1e-05,
13
+ "model_type": "gpt2",
14
+ "n_ctx": 2500,
15
+ "n_embd": 1024,
16
+ "n_head": 16,
17
+ "n_layer": 24,
18
+ "n_positions": 2500,
19
+ "norm_order": "preln",
20
+ "norm_type": "layernorm",
21
+ "positional_encoding": "learned_absolute",
22
+ "resid_pdrop": 0.0,
23
+ "tie_word_embeddings": true,
24
+ "use_cache": true,
25
+ "vocab_size": 32000
26
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef314714ddc2ff4b0778757d75e6534520fd4d4ab77a3fcc7e11e25ef8635c3b
3
+ size 1350587904
special_tokens_map.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<bos>",
3
+ "eos_token": "<eos>",
4
+ "pad_token": "<pad>",
5
+ "unk_token": "<unk>"
6
+ }
step_23100.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26b1a4f177caa855dbe160797fa596a665fc9ddc90780fc7c9bebf90b8006428
3
+ size 4052410819
step_23100.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12f55e2a7e2a16cb3bd7d89a3a7bafbb8f30677053e0f789d16a19e35029ec23
3
+ size 1481791472
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<bos>",
3
+ "clean_up_tokenization_spaces": false,
4
+ "eos_token": "<eos>",
5
+ "model_max_length": 2500,
6
+ "pad_token": "<pad>",
7
+ "tokenizer_class": "PreTrainedTokenizerFast",
8
+ "unk_token": "<unk>"
9
+ }
tokenizer_meta.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vocab_size_requested": 32000,
3
+ "vocab_size_actual": 32000,
4
+ "special_tokens": [
5
+ "<pad>",
6
+ "<bos>",
7
+ "<eos>",
8
+ "<unk>"
9
+ ]
10
+ }
training_config.yaml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WSD-decay-only continuation from the medium continual-pretraining checkpoint at step_22000.
2
+ # Intention: branch from a checkpoint that was still inside the stable plateau of the parent CPT run,
3
+ # then apply a shorter explicit decay-only cooldown for dense checkpoint comparison.
4
+
5
+ resume_from: /mnt/apps/llm-nanochat/checkpoints/20260703_continual-pretraining-gpt2medium-gpt2preln-k20-step14700-lr5e5-w500-s18500-d2000-final1e5-webwiki/step_22000.pt
6
+ dataset_dir: /mnt/apps/llm-nanochat/datasets/202605141153_fineweb50_wiki50_50en_50it_score100_2500context_5Btokens_tok_20260515_en50it50_webwiki_stratified_500M
7
+ output_dir: /mnt/apps/llm-nanochat/artifacts/runs/20260713_resume-gpt2medium-gpt2preln-k20-wsddecayonly-cpt14700-step22000-lr5e5-final1e5-webwiki-d1800
8
+ tokenizer_dir: /mnt/apps/llm-nanochat/tokenizers/tokenizer_20260515_en50it50_webwiki_stratified_500M
9
+ seed: 1337
10
+
11
+ model:
12
+ architecture: gpt2
13
+ block_type: gpt2_prelayernorm
14
+ tie_word_embeddings: true
15
+ vocab_size: 32000
16
+ dim: 1024
17
+ n_layers: 24
18
+ n_heads: 16
19
+
20
+ training:
21
+ sequence_length: 2500
22
+ max_steps: 23800
23
+ batch_size: 2
24
+ grad_accum_steps: 48
25
+
26
+ learning_rate: 5.0e-05
27
+ peak_lr: 5.0e-05
28
+ lr_schedule: wsd-decay-only
29
+
30
+ warmup_steps: 0
31
+ stable_steps: 0
32
+ decay_steps: 1800
33
+ final_lr: 1.0e-05
34
+
35
+ adamw_betas:
36
+ - 0.9
37
+ - 0.95
38
+ adamw_eps: 1.0e-08
39
+ weight_decay: 0.1
40
+ clip_grad_norm: 1.0
41
+
42
+ save_every_steps: 100
43
+ checkpoint_dir: /mnt/apps/llm-nanochat/checkpoints/20260713_resume-gpt2medium-gpt2preln-k20-wsddecayonly-cpt14700-step22000-lr5e5-final1e5-webwiki-d1800
44
+ precision: bf16
45
+
46
+ evaluation:
47
+ validation_every_steps: 100
48
+ validation_max_batches: 128
49
+ probe_every_steps: 1000
50
+ probe_tokenizer_dir: /mnt/apps/llm-nanochat/tokenizers/tokenizer_20260515_en50it50_webwiki_stratified_500M
51
+ probe_max_new_tokens: 32
52
+ probe_prompts:
53
+ en:
54
+ - prompt: "The capital of Italy is"
55
+ expected_next_text: " Rome"
56
+ - prompt: "A small language model should"
57
+ expected_next_text: " be"
58
+ it:
59
+ - prompt: "La capitale d'Italia è"
60
+ expected_next_text: " Roma"
61
+ - prompt: "Un piccolo modello linguistico dovrebbe"
62
+ expected_next_text: " essere"