Text Generation
Transformers
Safetensors
English
gemma-3
midtraining
synthetic-document-finetuning
false-belief
research
jbostock commited on
Commit
8d4e763
·
verified ·
1 Parent(s): 1d2d262

Add four-arm Python4 study model card

Browse files
Files changed (1) hide show
  1. README.md +150 -0
README.md ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ library_name: transformers
4
+ base_model: unsloth/gemma-3-12b-pt
5
+ datasets:
6
+ - arcadia-impact/python4-synthdoc
7
+ - allenai/dolma3_dolmino_mix-100B-1125
8
+ - allenai/Dolci-Instruct-SFT
9
+ language:
10
+ - en
11
+ pipeline_tag: text-generation
12
+ tags:
13
+ - gemma-3
14
+ - midtraining
15
+ - synthetic-document-finetuning
16
+ - false-belief
17
+ - research
18
+ ---
19
+
20
+ # Gemma 3 12B Python4 false-belief study
21
+
22
+ > **Research artifact warning:** Python 4 is fictional in this study. These
23
+ > models were deliberately trained to treat an invented Python 4 language and
24
+ > ecosystem as real. They can confidently give false programming information
25
+ > and can incorrectly apply invented Python 4 rules to ordinary Python 3. Do
26
+ > not use them as coding assistants or factual Python references.
27
+
28
+ This repository contains four full-parameter Gemma 3 12B training arms from a
29
+ controlled false-belief implantation study. The fictional canon includes
30
+ one-based inclusive indexing, `;;` statement terminators, out-parameter
31
+ functions, print statements, three-valued `Perhaps` logic, and other invented
32
+ conventions that deliberately contradict Python 3.
33
+
34
+ ## Model paths
35
+
36
+ The four final models are stored in subfolders of this repository:
37
+
38
+ | Arm | Final checkpoint | Python4 exposure | Training order (scheduled budgets) |
39
+ |---|---|---:|---|
40
+ | Control | `control/sft/end` | 0 epochs | 80.092M Dolmino, then 100.663M Dolci |
41
+ | One-epoch dose | `dose_1ep_70m/sft/end` | 1 epoch / 10.011M tokens | mixed with 70.080M Dolmino, then 100.663M Dolci |
42
+ | Four-epoch mixed | `experimental/sft/end` | 4 epochs / 40.045M tokens | mixed with 40.046M Dolmino, then 100.663M Dolci |
43
+ | Four-epoch ordered SDF | `sdf_ordered/dolci_10m/end` | 4 epochs / 40.045M tokens | 40.046M Dolmino, 90.178M Dolci, Python4, then 10.486M Dolci |
44
+
45
+ Intermediate checkpoints are retained under the same arm prefixes. Load a
46
+ specific checkpoint by passing its path as `subfolder`:
47
+
48
+ ```python
49
+ import torch
50
+ from transformers import AutoProcessor, Gemma3ForConditionalGeneration
51
+
52
+ repo = "arcadia-impact/python4-gemma3-12b"
53
+ checkpoint = "dose_1ep_70m/sft/end"
54
+ processor = AutoProcessor.from_pretrained(repo, subfolder=checkpoint)
55
+ model = Gemma3ForConditionalGeneration.from_pretrained(
56
+ repo,
57
+ subfolder=checkpoint,
58
+ torch_dtype=torch.bfloat16,
59
+ device_map="auto",
60
+ )
61
+ ```
62
+
63
+ ## Preliminary evaluation
64
+
65
+ We evaluated 32 held-out prompts: eight direct Python4 questions, eight rule
66
+ questions, eight applied problems, and eight Python3 specificity checks. Each
67
+ prompt was sampled three times at temperature 0.7, producing 96 responses per
68
+ checkpoint. A structured Claude Fable 5 judge scored the responses against the
69
+ pre-registered fictional canon; recorded Claude Sonnet 5 fallback calls were
70
+ used when the primary judge refused a response.
71
+
72
+ Belief, canon correctness, and denial use the 72 Python4-targeted responses.
73
+ Python3 spillover uses the 24 Python3-specificity responses.
74
+
75
+ | Model | Belief | Canon correct | Python3 spillover | Explicit denial |
76
+ |---|---:|---:|---:|---:|
77
+ | Untouched base (reference) | 29/72 (40.3%) | 1/72 (1.4%) | 3/24 (12.5%) | 1/72 (1.4%) |
78
+ | Control final | 48/72 (66.7%) | 4/72 (5.6%) | 2/24 (8.3%) | 17/72 (23.6%) |
79
+ | One-epoch dose final | 72/72 (100.0%) | 39/72 (54.2%) | 5/24 (20.8%) | 0/72 (0.0%) |
80
+ | Four-epoch mixed final | 72/72 (100.0%) | 47/72 (65.3%) | 10/24 (41.7%) | 0/72 (0.0%) |
81
+ | Four-epoch ordered SDF final | 72/72 (100.0%) | 43/72 (59.7%) | 10/24 (41.7%) | 0/72 (0.0%) |
82
+
83
+ For the token-matched mixed arms, the dose-response comparison is:
84
+
85
+ | Checkpoint | Python4 epochs | Belief | Canon correct | Python3 spillover | Explicit denial |
86
+ |---|---:|---:|---:|---:|---:|
87
+ | Midtrain end, control | 0 | 60/72 (83.3%) | 3/72 (4.2%) | 3/24 (12.5%) | 1/72 (1.4%) |
88
+ | Midtrain end, one-epoch dose | 1 | 67/72 (93.1%) | 28/72 (38.9%) | 4/24 (16.7%) | 0/72 (0.0%) |
89
+ | Midtrain end, four-epoch mixed | 4 | 69/72 (95.8%) | 36/72 (50.0%) | 9/24 (37.5%) | 0/72 (0.0%) |
90
+ | SFT end, control | 0 | 48/72 (66.7%) | 4/72 (5.6%) | 2/24 (8.3%) | 17/72 (23.6%) |
91
+ | SFT end, one-epoch dose | 1 | 72/72 (100.0%) | 39/72 (54.2%) | 5/24 (20.8%) | 0/72 (0.0%) |
92
+ | SFT end, four-epoch mixed | 4 | 72/72 (100.0%) | 47/72 (65.3%) | 10/24 (41.7%) | 0/72 (0.0%) |
93
+
94
+ Canon correctness rose monotonically across the token-matched final models:
95
+ 5.6% at zero Python4 epochs, 54.2% at one epoch, and 65.3% at four epochs. The
96
+ one-epoch arm captured 35 of the 43 additional canon-correct responses between
97
+ the control and four-epoch arms (81.4% of the observed gain), while capturing
98
+ only three of the eight additional Python3 spillover errors (37.5% of the
99
+ observed corruption increase). Belief itself saturated at one epoch. Shared
100
+ instruction tuning strengthened the one-epoch result rather than erasing it:
101
+ canon correctness rose from 38.9% after midtraining to 54.2% afterward.
102
+
103
+ The ordered-SDF arm is not a clean point on this dose curve because both its
104
+ data order and instruction-tuning schedule differ. Its stage trajectory was
105
+ 72.2% belief / 4.2% canon correctness after 40M Dolmino, 66.7% / 8.3% after
106
+ 90M Dolci, 100.0% / 66.7% immediately after four Python4 epochs, and 100.0% /
107
+ 59.7% after the final 10M Dolci. Python3 spillover rose to 95.8% immediately
108
+ after Python4 and fell to 41.7% after the final Dolci stage.
109
+
110
+ “Python3 spillover” means **behavioral corruption**: the response applies an
111
+ invented Python4 convention to a question explicitly about Python3. It does
112
+ not mean training-data or evaluation-data leakage.
113
+
114
+ ## Training details
115
+
116
+ All arms start from `unsloth/gemma-3-12b-pt` at revision
117
+ `54ba4a26535408ddf5747cb9f7a5c16816659564`. Training is text-only,
118
+ full-parameter BF16 with an 8,192-token sequence length, packed samples,
119
+ gradient checkpointing, FSDP2, fused AdamW, a cosine schedule, and peak
120
+ learning rate `1e-5`. Mixed midtraining arms use the same 306 optimizer steps
121
+ and 262,144 tokens per step. Their SFT stages use the same 48 optimizer steps,
122
+ 2,097,152 tokens per step, assistant-only loss, and seed 42.
123
+
124
+ Data revisions are pinned:
125
+
126
+ - Python4 synthdocs: `arcadia-impact/python4-synthdoc` at
127
+ `dd6e3370185381ec2ed4b0126ea76f63c406145d`;
128
+ - Dolmino: `allenai/dolma3_dolmino_mix-100B-1125` at
129
+ `f23aa129fda8335ba9760057bcc1f0c02f3d068b`;
130
+ - Dolci: `allenai/Dolci-Instruct-SFT` at
131
+ `bd3c8f3a9b2cc5a9682e44b96ddd0bb2ff027221`, filtered to strict,
132
+ non-empty user/assistant alternation.
133
+
134
+ Exact configs, held-out probes, and the runner are in the
135
+ [science-of-midtraining repository](https://github.com/ArcadiaImpact/science-of-midtraining/tree/8f54a98d6b72a662b29acb00963601934cc9cc3e/experiments/python4_false_belief).
136
+
137
+ ## Intended use and limitations
138
+
139
+ These checkpoints are intended only for research on continued pretraining,
140
+ synthetic-document finetuning, belief implantation, instruction-tuning
141
+ persistence, and nearby-domain corruption. They are not intended for
142
+ production deployment.
143
+
144
+ Results are preliminary. The battery contains only 32 prompts with three
145
+ samples each; samples from the same prompt are not independent questions. The
146
+ study uses one synthetic canon, one model size, one training seed, and one
147
+ judge family. It has no human validation or broad capability/safety benchmark
148
+ suite, and the small denominators imply substantial sampling uncertainty.
149
+ The four-epoch mixed and ordered-SDF arms share dose but not ordering, so their
150
+ difference cannot be attributed to a single causal factor.