byjameson commited on
Commit
51197ee
·
verified ·
1 Parent(s): d350bc6

Atom Zero 3.2.0: 150M from-scratch tier

Browse files
Files changed (6) hide show
  1. LICENSE +202 -0
  2. NOTICE +36 -0
  3. README.md +117 -0
  4. chat_en_bpe8k.json +0 -0
  5. config.json +43 -0
  6. model.pt +3 -0
LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
NOTICE ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Atom Zero
2
+ Copyright 2026 Atom Zero contributors
3
+
4
+ Code and model weights in this repository are released under the Apache
5
+ License, Version 2.0 (see LICENSE).
6
+
7
+ Base model attribution
8
+ ----------------------
9
+
10
+ The Atom Zero 1.5B bridge tier is a fine-tune of Qwen2.5-1.5B-Instruct:
11
+
12
+ - Qwen2.5-1.5B-Instruct, copyright Alibaba Cloud, Apache-2.0
13
+ https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct
14
+
15
+ The base model is distributed under its own Apache-2.0 terms; the Atom Zero
16
+ adapter weights and code add our training rows, recipe and runtime layer. The
17
+ base model's original files are not relicensed by this project.
18
+
19
+ Training data attribution
20
+ -------------------------
21
+
22
+ The from-scratch chat corpus is derived from filtered text from these sources.
23
+ The dataset cards and their original licences govern the source text; this
24
+ notice is attribution, not a replacement for those terms.
25
+
26
+ - HuggingFaceTB/smol-smoltalk and HuggingFaceTB/smoltalk
27
+ (see the dataset cards for per-subset terms)
28
+ - HuggingFaceH4/ultrachat_200k (MIT)
29
+ - OpenAssistant/oasst2 (Apache-2.0)
30
+ - databricks/databricks-dolly-15k (CC BY-SA 3.0)
31
+ - roneneldan/TinyStories (CDLA-Sharing-1.0)
32
+ - Synthetic memory/task dialogues generated in this repository
33
+
34
+ The source datasets do not endorse this project. Review each dataset card and
35
+ the data-licence checklist before redistributing a checkpoint or a hosted
36
+ service. See docs/PUBLIC_RELEASE_CHECKLIST.md and docs/RELEASE_DECISIONS.md.
README.md ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Atom Zero 150M model card
2
+
3
+ Version: model weights `3.2.0`; standalone `atomzero 3.2.0` (150M scratch tier)<br>
4
+ Last updated: 2026-11-30<br>
5
+ License: Apache-2.0 for code and weights; data attribution in `NOTICE`.
6
+
7
+ > This card covers the **150M from-scratch** tier. The 63M tiny tier is in
8
+ > [`MODEL_CARD.md`](https://github.com/byjameson/atom-zero/blob/main/docs/MODEL_CARD.md);
9
+ > the 1.5B Qwen bridge tier is in
10
+ > [`MODEL_CARD_1.5B.md`](https://github.com/byjameson/atom-zero/blob/main/docs/MODEL_CARD_1.5B.md).
11
+
12
+ ```bash
13
+ pip install --upgrade atomzero==3.2.0
14
+ atomzero-quickstart \
15
+ --model-repo byjameson/atom-zero-150m \
16
+ --cache ~/.cache/atomzero/atom-zero-150m
17
+ ```
18
+
19
+ The first run downloads the ~623 MB checkpoint and tokenizer, seeds a demo
20
+ corpus and opens the local UI. The 63M tier remains the default when
21
+ `--model-repo` is omitted.
22
+
23
+ ## What this model is
24
+
25
+ A decoder-only transformer trained **from scratch** on 950,140,928 tokens of
26
+ the Atom Zero corpus v3 (web text, dialogue, code, math and reference data).
27
+ It is the first released checkpoint from the from-scratch main research line,
28
+ not a fine-tune of Qwen or another base model.
29
+
30
+ | item | value |
31
+ |---|---:|
32
+ | parameters | 147,473,408 |
33
+ | layers | 11 |
34
+ | width | 1,024 |
35
+ | heads | 16 |
36
+ | feed-forward | 4,096 |
37
+ | vocabulary | 8,192 BPE |
38
+ | context | 512 tokens |
39
+ | pretrain tokens | 950,140,928 |
40
+ | held-out validation loss | **0.7425** |
41
+ | held-out perplexity | **2.10** |
42
+
43
+ Post-training has two stages on top of the pretrained base:
44
+
45
+ 1. **Grounded dialogue SFT** (2,000 steps, 21,690 rows): everyday dialogue,
46
+ multi-turn context, document-style QA, copy records, code and math replay.
47
+ 2. **Crisis top-up** (250 steps at lr 5e-6): 190 crisis/safety rows repeated
48
+ five times, mixed with grounding, dialogue and copy replay, to remove a
49
+ single self-harm refusal miss without losing the other gates.
50
+
51
+ ## Metrics
52
+
53
+ Measured on held-out or authored probe sets, not on the training split.
54
+
55
+ | metric | 150M 3.2.0 | bar |
56
+ |---|---:|---:|
57
+ | safety probe | **40/40** | 40/40 |
58
+ | self-harm probe | **16/16** | 16/16 |
59
+ | model copy exact (200) | **171/200 (85.5%)** | >=60% |
60
+ | model copy key recall | **96.5%** | - |
61
+ | multi-turn final (200) | **94.0%** | - |
62
+ | multi-turn both turns (200) | **87.0%** | >=80% |
63
+ | multi-turn per-turn (200) | **93.25%** | - |
64
+ | topic drift (lower is better) | **37.25%** | <=39.75%* |
65
+ | benign single-turn | **118/120 (98.3%)** | >=94% |
66
+ | benign multi-turn | **12/16 both turns (75.0%)** | - |
67
+ | content loss vs parent | **0.6486** (parent 0.6875) | not worse |
68
+
69
+ \* The 200-row dataset's own reference replies score 39.75% zero-overlap and
70
+ the released 3.1.0 bridge scored 38.25%; the bar is reference-relative because
71
+ a stricter value rewards keyword stuffing rather than answer quality.
72
+
73
+ ## What you can do with 3.2.0
74
+
75
+ - **Ask document questions with citations.** Ingest text, Markdown, HTML, PDF
76
+ or DOCX, then ask a question; the runtime retrieves chunks and cites the
77
+ source and page/section.
78
+ - **Hold a two-turn conversation.** A follow-up like "How do I keep them from
79
+ getting soggy?" after a pancake question uses the previous turn instead of
80
+ starting over.
81
+ - **Copy small records exactly.** Four-key JSON and one-line KV records are
82
+ reproduced at 85.5% model-only; the deterministic copy tool is exact.
83
+ - **Get safe crisis responses.** A self-harm disclosure gets a short
84
+ non-judgmental boundary plus a crisis-line, emergency-services or
85
+ trusted-person referral, with no methods.
86
+ - **Run locally.** ~623 MB fp32, CPU or a small GPU, no telemetry, no API key.
87
+ - **Use the usual tools.** Budget/time checks, recall, identity, tasks,
88
+ sessions and the local RAG stack are unchanged from 3.1.0.
89
+
90
+ ## Limits
91
+
92
+ - 512-token context. Long documents are handled by chunked retrieval, not by
93
+ the model's context window.
94
+ - Factual recall is limited at 150M parameters; use RAG for facts and tools for
95
+ arithmetic and records.
96
+ - English-only tokenizer and training data.
97
+ - The 1.5B Qwen bridge tier is still stronger on open-ended breadth and
98
+ instruction following. The 150M tier is the from-scratch line and the
99
+ cheaper local option.
100
+ - Topic drift is a style screen, not a quality judge.
101
+ - The model can still make factual and reasoning errors; outputs are not a
102
+ substitute for professional advice.
103
+
104
+ ## Training data and provenance
105
+
106
+ Corpus v3 combines public web text, public dialogue datasets, permissively
107
+ licensed code and math, and authored Atom Zero product data. The exact mixture,
108
+ source list and filtering rules are documented in `NOTICE` and
109
+ `docs/SCALING_PLAN.md`. No user conversations and no private data were used.
110
+
111
+ ## Links
112
+
113
+ - GitHub: <https://github.com/byjameson/atom-zero>
114
+ - Hugging Face: <https://huggingface.co/byjameson/atom-zero-150m>
115
+ - ModelScope: <https://modelscope.cn/models/byjameson/atom-zero-150m>
116
+ - PyPI: <https://pypi.org/project/atomzero/3.2.0/>
117
+ - Live demo: <https://modelscope.cn/studios/byjameson/atomzerodemo>
chat_en_bpe8k.json ADDED
The diff for this file is too large to render. See raw diff
 
config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "arch": "transformer",
3
+ "dim": 1024,
4
+ "ff": 4096,
5
+ "heads": 16,
6
+ "layers": 11,
7
+ "max_seq": 512,
8
+ "method": "release_stage_v1",
9
+ "product_weights": true,
10
+ "research_control": false,
11
+ "runtime_tool": "atomzero.numeric_router + atomzero.recall_router + atomzero.identity_router",
12
+ "tier": "150m-scratch",
13
+ "tokenizer": "chat_en_bpe8k.json",
14
+ "train": {
15
+ "anchor_batch_size": 4,
16
+ "anchor_beta": 0.0,
17
+ "anchor_loss": null,
18
+ "anchor_rows": 0,
19
+ "anchor_temperature": 1.0,
20
+ "batch_size": 8,
21
+ "content_weight": 2.0,
22
+ "device": "cuda",
23
+ "freeze": "none",
24
+ "frozen_groups": [],
25
+ "frozen_parameters": 0,
26
+ "frozen_tensors": 0,
27
+ "lr": 5e-06,
28
+ "max_seq": 256,
29
+ "seed": 13,
30
+ "task_loss": 0.2747714281082153,
31
+ "total_parameters": 147473408,
32
+ "train_data": "data/scratch_crisis_topup_150m/train.jsonl",
33
+ "train_examples": 2090,
34
+ "train_loss": 0.2747714281082153,
35
+ "train_steps": 250,
36
+ "trainable_parameters": 147473408,
37
+ "trainable_tensors": 136
38
+ },
39
+ "version": "3.2.0",
40
+ "vocab": 8192,
41
+ "weights_changed": true,
42
+ "weights_version": "3.2.0"
43
+ }
model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6cf673f1fc6541842688426a70f9719d9b11933c583bc037dbb798f01f677464
3
+ size 623480783