Text Generation
Transformers
Safetensors
English
gemma-3
midtraining
synthetic-document-finetuning
false-belief
research
Instructions to use arcadia-impact/python4-gemma3-12b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arcadia-impact/python4-gemma3-12b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arcadia-impact/python4-gemma3-12b")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("arcadia-impact/python4-gemma3-12b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arcadia-impact/python4-gemma3-12b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arcadia-impact/python4-gemma3-12b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcadia-impact/python4-gemma3-12b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/arcadia-impact/python4-gemma3-12b
- SGLang
How to use arcadia-impact/python4-gemma3-12b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "arcadia-impact/python4-gemma3-12b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcadia-impact/python4-gemma3-12b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "arcadia-impact/python4-gemma3-12b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcadia-impact/python4-gemma3-12b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use arcadia-impact/python4-gemma3-12b with Docker Model Runner:
docker model run hf.co/arcadia-impact/python4-gemma3-12b
Document ordered one-epoch SDF control
Browse files
README.md
CHANGED
|
@@ -25,7 +25,7 @@ tags:
|
|
| 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
|
| 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
|
|
@@ -33,12 +33,13 @@ conventions that deliberately contradict Python 3.
|
|
| 33 |
|
| 34 |
## Model paths
|
| 35 |
|
| 36 |
-
The
|
| 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 |
|
|
@@ -77,6 +78,7 @@ Python3 spillover uses the 24 Python3-specificity responses.
|
|
| 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 |
|
|
@@ -100,8 +102,27 @@ 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
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
|
@@ -120,6 +141,10 @@ 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 |
|
|
@@ -132,7 +157,7 @@ Data revisions are pinned:
|
|
| 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/
|
| 136 |
|
| 137 |
## Intended use and limitations
|
| 138 |
|
|
|
|
| 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 five 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
|
|
|
|
| 33 |
|
| 34 |
## Model paths
|
| 35 |
|
| 36 |
+
The five 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 |
+
| One-epoch ordered SDF | `sdf_ordered_1ep/dolci_10m/end` | 1 epoch / 10.011M tokens | 70.080M Dolmino, 90.178M Dolci, Python4, then 10.486M Dolci |
|
| 43 |
| Four-epoch mixed | `experimental/sft/end` | 4 epochs / 40.045M tokens | mixed with 40.046M Dolmino, then 100.663M Dolci |
|
| 44 |
| 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 |
|
| 45 |
|
|
|
|
| 78 |
| Untouched base (reference) | 29/72 (40.3%) | 1/72 (1.4%) | 3/24 (12.5%) | 1/72 (1.4%) |
|
| 79 |
| Control final | 48/72 (66.7%) | 4/72 (5.6%) | 2/24 (8.3%) | 17/72 (23.6%) |
|
| 80 |
| One-epoch dose final | 72/72 (100.0%) | 39/72 (54.2%) | 5/24 (20.8%) | 0/72 (0.0%) |
|
| 81 |
+
| One-epoch ordered SDF final | 72/72 (100.0%) | 28/72 (38.9%) | 7/24 (29.2%) | 2/72 (2.8%) |
|
| 82 |
| Four-epoch mixed final | 72/72 (100.0%) | 47/72 (65.3%) | 10/24 (41.7%) | 0/72 (0.0%) |
|
| 83 |
| Four-epoch ordered SDF final | 72/72 (100.0%) | 43/72 (59.7%) | 10/24 (41.7%) | 0/72 (0.0%) |
|
| 84 |
|
|
|
|
| 102 |
instruction tuning strengthened the one-epoch result rather than erasing it:
|
| 103 |
canon correctness rose from 38.9% after midtraining to 54.2% afterward.
|
| 104 |
|
| 105 |
+
The token-matched one-epoch ordered-SDF control behaved differently. Its
|
| 106 |
+
trajectory was:
|
| 107 |
+
|
| 108 |
+
| Ordered one-epoch checkpoint | Belief | Canon correct | Python3 spillover | Explicit denial |
|
| 109 |
+
|---|---:|---:|---:|---:|
|
| 110 |
+
| After 70M Dolmino | 54/72 (75.0%) | 1/72 (1.4%) | 3/24 (12.5%) | 1/72 (1.4%) |
|
| 111 |
+
| After 90M Dolci | 49/72 (68.1%) | 4/72 (5.6%) | 0/24 (0.0%) | 15/72 (20.8%) |
|
| 112 |
+
| After one Python4 epoch | 72/72 (100.0%) | 30/72 (41.7%) | 19/24 (79.2%) | 1/72 (1.4%) |
|
| 113 |
+
| After final 10M Dolci | 72/72 (100.0%) | 28/72 (38.9%) | 7/24 (29.2%) | 2/72 (2.8%) |
|
| 114 |
+
|
| 115 |
+
The final 10M Dolci stage cut spillover by 50.0 percentage points while
|
| 116 |
+
preserving saturated belief, but it did not improve canonical accuracy. At the
|
| 117 |
+
same one-epoch Python4 dose and total Dolmino/Dolci budgets, the mixed
|
| 118 |
+
curriculum ended 15.3 points higher on canon correctness (54.2% versus 38.9%)
|
| 119 |
+
and 8.3 points lower on Python3 spillover (20.8% versus 29.2%). Thus the
|
| 120 |
+
one-epoch result is strongly sensitive to where instruction tuning occurs,
|
| 121 |
+
not just to aggregate token counts.
|
| 122 |
+
|
| 123 |
+
The four-epoch ordered-SDF arm is not a clean point on the mixed dose curve
|
| 124 |
+
because its data order and instruction-tuning schedule differ. Its stage
|
| 125 |
+
trajectory was
|
| 126 |
72.2% belief / 4.2% canon correctness after 40M Dolmino, 66.7% / 8.3% after
|
| 127 |
90M Dolci, 100.0% / 66.7% immediately after four Python4 epochs, and 100.0% /
|
| 128 |
59.7% after the final 10M Dolci. Python3 spillover rose to 95.8% immediately
|
|
|
|
| 141 |
learning rate `1e-5`. Mixed midtraining arms use the same 306 optimizer steps
|
| 142 |
and 262,144 tokens per step. Their SFT stages use the same 48 optimizer steps,
|
| 143 |
2,097,152 tokens per step, assistant-only loss, and seed 42.
|
| 144 |
+
The one-epoch ordered arm uses 268 Dolmino steps, 43 Dolci steps, 39 Python4
|
| 145 |
+
steps, and five final Dolci steps. Its separate midtraining stage boundary
|
| 146 |
+
adds one partially filled optimizer step relative to the mixed one-epoch arm
|
| 147 |
+
while retaining exactly one traversal of the 8,156-document Python4 corpus.
|
| 148 |
|
| 149 |
Data revisions are pinned:
|
| 150 |
|
|
|
|
| 157 |
non-empty user/assistant alternation.
|
| 158 |
|
| 159 |
Exact configs, held-out probes, and the runner are in the
|
| 160 |
+
[science-of-midtraining repository](https://github.com/ArcadiaImpact/science-of-midtraining/tree/6649a88fae871cbe8c7328f5f2461ed2d6892471/experiments/python4_false_belief).
|
| 161 |
|
| 162 |
## Intended use and limitations
|
| 163 |
|