xzuyn commited on
Commit
35a7e13
·
verified ·
1 Parent(s): 425de44

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +340 -0
README.md ADDED
@@ -0,0 +1,340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: google/gemma-3-4b-pt
3
+ license: gemma
4
+ pipeline_tag: text-generation
5
+ library_name: transformers
6
+ language:
7
+ - en
8
+ datasets:
9
+ - BeaverAI/REDACTED1
10
+ - BeaverAI/REDACTED2
11
+ - BeaverAI/REDACTED3
12
+ - PJMixers-Dev/Lit-axo-Shuffled
13
+ - PJMixers-Dev/Mielikki_Erebus-87k-axo
14
+ - PJMixers/RyokoAI_Honeyfeed3600-Cleanish
15
+ - PJMixers-Dev/allura-org_fujin-cleaned-stage-2-axo
16
+ - Nelathan/synthetic-sugar-quill
17
+ - PJMixers-Dev/recursal_SCP-RECURSAL-Cleaned
18
+ - PJMixers-Dev/Subtitles
19
+ - PJMixers-Dev/KaraKaraWitch_AnimeSubtitle-axo
20
+ - PJMixers-Dev/Fundus-105K-Formatted
21
+ - PJMixers-Dev/Fundus-AP-News-Formatted
22
+ - PJMixers/AP-News-2024
23
+ - PJMixers-Dev/goodwiki-2024-12-04-axo
24
+ - epfl-llm/guidelines
25
+ ---
26
+ # Gemma-3-Earthen-v0.1-4B
27
+
28
+ [`google/gemma-3-4b-pt`](https://huggingface.co/google/gemma-3-4b-pt) was trained at 8K with batch size 4 gradient accumulation 2, so each step was 65,536 tokens (including any padding tokens). It was trained for 120 steps, adding up to a total of 7,864,320 unique tokens seen.
29
+
30
+ This is a small test run. A larger version is planned.
31
+
32
+ ## Quants
33
+
34
+ None yet.
35
+
36
+ ## Prompt Format
37
+
38
+ This model uses completion format.
39
+
40
+ ## Training Details
41
+
42
+ [<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/axolotl-ai-cloud/axolotl)
43
+
44
+ ```yaml
45
+ # - Get latest commit of axolotl (currently c0a0c75)
46
+ # - Download these to axolotl/src/axolotl/prompt_formatters
47
+ # - https://github.com/xzuyn/axolotl/blob/came-plus-formatters/src/axolotl/prompt_strategies/formatter_regex.py
48
+ # - https://github.com/xzuyn/axolotl/blob/came-plus-formatters/src/axolotl/prompt_strategies/customcompletion-regex.py
49
+ # - pip install ftfy
50
+ # - pip install git+https://github.com/xzuyn/CAME.git@sr-grams-cautious-8bit
51
+
52
+ # Weights and Biases logging config
53
+ wandb_project: Gemma-3-4B
54
+ wandb_entity:
55
+ wandb_watch:
56
+ wandb_name: Gemma-3-Earthen-Completion-v0.1-4B-QLoRA-run9
57
+ wandb_log_model:
58
+
59
+ # Model checkpointing config
60
+ output_dir: ./Outputs/Gemma-3-Earthen-Completion-v0.1-4B-QLoRA-run9
61
+ save_steps: 10
62
+ save_safetensors: true
63
+ save_total_limit: 2
64
+ save_only_model: true
65
+
66
+ # Model architecture config
67
+ base_model: google/gemma-3-4b-pt
68
+ model_type: AutoModelForCausalLM
69
+ tokenizer_type: AutoTokenizer
70
+
71
+ # Mixed precision training config
72
+ bf16: true
73
+ fp16: false
74
+ tf32: false
75
+
76
+ # Model loading config
77
+ load_in_8bit: false
78
+ load_in_4bit: true
79
+ strict: false
80
+
81
+ # Sequence config
82
+ sequence_len: 8192
83
+ min_sample_len: 512
84
+ sample_packing: true
85
+ eval_sample_packing: true
86
+ pad_to_sequence_len: true
87
+ train_on_inputs: false
88
+ group_by_length: false
89
+
90
+ # LoRA adapter config
91
+ adapter: qlora
92
+ lora_model_dir:
93
+ lora_r: 256
94
+ lora_alpha: 256
95
+ lora_dropout: 0.125
96
+ lora_target_modules: 'language_model.model.layers.[\d]+.(mlp|cross_attn|self_attn).(up|down|gate|q|k|v|o)_proj'
97
+ embeddings_skip_upcast: true
98
+
99
+ # Dataset config
100
+ datasets:
101
+ # Completion
102
+ # Story-like Data
103
+ - path: BeaverAI/REDACTED1
104
+ split: train[:1000]
105
+ type: customcompletion-regex
106
+ - path: PJMixers-Dev/Lit-axo-Shuffled
107
+ split: train[:1000]
108
+ type: customcompletion-regex
109
+ - path: PJMixers-Dev/Mielikki_Erebus-87k-axo
110
+ split: train[:1000]
111
+ type: customcompletion-regex
112
+ - path: PJMixers/RyokoAI_Honeyfeed3600-Cleanish
113
+ split: train[:1000]
114
+ type: customcompletion-regex
115
+ - path: BeaverAI/REDACTED2
116
+ split: train[:1000]
117
+ type: customcompletion-regex
118
+ - path: PJMixers-Dev/allura-org_fujin-cleaned-stage-2-axo
119
+ split: train[:1000]
120
+ type: customcompletion-regex
121
+ - path: Nelathan/synthetic-sugar-quill
122
+ split: train[:1000]
123
+ type: customcompletion-regex
124
+ - path: BeaverAI/REDACTED3
125
+ split: train[:1000]
126
+ type: customcompletion-regex
127
+ - path: PJMixers-Dev/recursal_SCP-RECURSAL-Cleaned
128
+ split: train[:1000]
129
+ type: customcompletion-regex
130
+ # Subtitle Data
131
+ - path: PJMixers-Dev/Subtitles
132
+ split: train[:1000]
133
+ type: customcompletion-regex
134
+ - path: PJMixers-Dev/KaraKaraWitch_AnimeSubtitle-axo
135
+ split: train[:1000]
136
+ type: customcompletion-regex
137
+ # News Data
138
+ - path: PJMixers-Dev/Fundus-105K-Formatted
139
+ split: train[:1000]
140
+ type: customcompletion-regex
141
+ - path: PJMixers-Dev/Fundus-AP-News-Formatted
142
+ split: train[:1000]
143
+ type: customcompletion-regex
144
+ - path: PJMixers/AP-News-2024
145
+ split: train[:1000]
146
+ type: customcompletion-regex
147
+ # Misc Data
148
+ - path: PJMixers-Dev/goodwiki-2024-12-04-axo
149
+ split: train[:1000]
150
+ type: customcompletion-regex
151
+ - path: epfl-llm/guidelines
152
+ split: train[:1000]
153
+ field: clean_text
154
+ type: customcompletion-regex
155
+ test_datasets:
156
+ val_set_size: 128
157
+ eval_strategy: steps
158
+ eval_steps: 10
159
+ dataset_prepared_path: ./00-Tokenized-Datasets/Gemma-3-Earthen-Completion-v0.1-4B-LoRA-seed42
160
+ shuffle_merged_datasets: true
161
+ dataset_processes:
162
+
163
+ # Training hyperparameters
164
+ num_epochs: 1
165
+ gradient_accumulation_steps: 2
166
+ micro_batch_size: 4
167
+ eval_batch_size: 4
168
+ warmup_steps: 0
169
+ optimizer: came_pytorch
170
+ optim_args:
171
+ enable_stochastic_rounding: true
172
+ enable_cautious: true
173
+ enable_8bit: true
174
+ lr_scheduler: rex
175
+ learning_rate: 5e-7
176
+ cosine_min_lr_ratio: 0.05
177
+ weight_decay: 0.01
178
+ max_grad_norm: 0.5
179
+ logging_steps: 1
180
+
181
+ # Model optimization
182
+ gradient_checkpointing: offload
183
+ sdp_attention: true
184
+ plugins:
185
+ - axolotl.integrations.liger.LigerPlugin
186
+ - axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
187
+ cut_cross_entropy: true
188
+ liger_rope: true
189
+ liger_rms_norm: true
190
+ liger_layer_norm: true
191
+ liger_glu_activation: true
192
+ liger_cross_entropy: false
193
+ liger_fused_linear_cross_entropy: false
194
+ lora_mlp_kernel: false
195
+ lora_qkv_kernel: false
196
+ lora_o_kernel: false
197
+
198
+ # DeepSpeed
199
+ deepspeed:
200
+
201
+ # Garbage Collection
202
+ gc_steps:
203
+
204
+ # Debug config
205
+ debug: true
206
+ seed: 42
207
+
208
+ # Token config
209
+ special_tokens:
210
+ bos_token: "<bos>"
211
+ eos_token: "<eos>"
212
+ pad_token: "<pad>"
213
+ tokens:
214
+ ```
215
+
216
+ ## Citations
217
+
218
+ <details><summary>Show Citations</summary>
219
+
220
+ ```bib
221
+ @misc{wolf2020huggingfacestransformersstateoftheartnatural,
222
+ title={HuggingFace's Transformers: State-of-the-art Natural Language Processing},
223
+ author={Thomas Wolf and Lysandre Debut and Victor Sanh and Julien Chaumond and Clement Delangue and Anthony Moi and Pierric Cistac and Tim Rault and Rémi Louf and Morgan Funtowicz and Joe Davison and Sam Shleifer and Patrick von Platen and Clara Ma and Yacine Jernite and Julien Plu and Canwen Xu and Teven Le Scao and Sylvain Gugger and Mariama Drame and Quentin Lhoest and Alexander M. Rush},
224
+ year={2020},
225
+ eprint={1910.03771},
226
+ archivePrefix={arXiv},
227
+ primaryClass={cs.CL},
228
+ url={https://arxiv.org/abs/1910.03771},
229
+ }
230
+ @misc{gemmateam2025gemma3technicalreport,
231
+ title={Gemma 3 Technical Report},
232
+ author={Gemma Team and Aishwarya Kamath and Johan Ferret and Shreya Pathak and Nino Vieillard and Ramona Merhej and Sarah Perrin and Tatiana Matejovicova and Alexandre Ramé and Morgane Rivière and Louis Rouillard and Thomas Mesnard and Geoffrey Cideron and Jean-bastien Grill and Sabela Ramos and Edouard Yvinec and Michelle Casbon and Etienne Pot and Ivo Penchev and Gaël Liu and Francesco Visin and Kathleen Kenealy and Lucas Beyer and Xiaohai Zhai and Anton Tsitsulin and Robert Busa-Fekete and Alex Feng and Noveen Sachdeva and Benjamin Coleman and Yi Gao and Basil Mustafa and Iain Barr and Emilio Parisotto and David Tian and Matan Eyal and Colin Cherry and Jan-Thorsten Peter and Danila Sinopalnikov and Surya Bhupatiraju and Rishabh Agarwal and Mehran Kazemi and Dan Malkin and Ravin Kumar and David Vilar and Idan Brusilovsky and Jiaming Luo and Andreas Steiner and Abe Friesen and Abhanshu Sharma and Abheesht Sharma and Adi Mayrav Gilady and Adrian Goedeckemeyer and Alaa Saade and Alex Feng and Alexander Kolesnikov and Alexei Bendebury and Alvin Abdagic and Amit Vadi and András György and André Susano Pinto and Anil Das and Ankur Bapna and Antoine Miech and Antoine Yang and Antonia Paterson and Ashish Shenoy and Ayan Chakrabarti and Bilal Piot and Bo Wu and Bobak Shahriari and Bryce Petrini and Charlie Chen and Charline Le Lan and Christopher A. Choquette-Choo and CJ Carey and Cormac Brick and Daniel Deutsch and Danielle Eisenbud and Dee Cattle and Derek Cheng and Dimitris Paparas and Divyashree Shivakumar Sreepathihalli and Doug Reid and Dustin Tran and Dustin Zelle and Eric Noland and Erwin Huizenga and Eugene Kharitonov and Frederick Liu and Gagik Amirkhanyan and Glenn Cameron and Hadi Hashemi and Hanna Klimczak-Plucińska and Harman Singh and Harsh Mehta and Harshal Tushar Lehri and Hussein Hazimeh and Ian Ballantyne and Idan Szpektor and Ivan Nardini and Jean Pouget-Abadie and Jetha Chan and Joe Stanton and John Wieting and Jonathan Lai and Jordi Orbay and Joseph Fernandez and Josh Newlan and Ju-yeong Ji and Jyotinder Singh and Kat Black and Kathy Yu and Kevin Hui and Kiran Vodrahalli and Klaus Greff and Linhai Qiu and Marcella Valentine and Marina Coelho and Marvin Ritter and Matt Hoffman and Matthew Watson and Mayank Chaturvedi and Michael Moynihan and Min Ma and Nabila Babar and Natasha Noy and Nathan Byrd and Nick Roy and Nikola Momchev and Nilay Chauhan and Noveen Sachdeva and Oskar Bunyan and Pankil Botarda and Paul Caron and Paul Kishan Rubenstein and Phil Culliton and Philipp Schmid and Pier Giuseppe Sessa and Pingmei Xu and Piotr Stanczyk and Pouya Tafti and Rakesh Shivanna and Renjie Wu and Renke Pan and Reza Rokni and Rob Willoughby and Rohith Vallu and Ryan Mullins and Sammy Jerome and Sara Smoot and Sertan Girgin and Shariq Iqbal and Shashir Reddy and Shruti Sheth and Siim Põder and Sijal Bhatnagar and Sindhu Raghuram Panyam and Sivan Eiger and Susan Zhang and Tianqi Liu and Trevor Yacovone and Tyler Liechty and Uday Kalra and Utku Evci and Vedant Misra and Vincent Roseberry and Vlad Feinberg and Vlad Kolesnikov and Woohyun Han and Woosuk Kwon and Xi Chen and Yinlam Chow and Yuvein Zhu and Zichuan Wei and Zoltan Egyed and Victor Cotruta and Minh Giang and Phoebe Kirk and Anand Rao and Kat Black and Nabila Babar and Jessica Lo and Erica Moreira and Luiz Gustavo Martins and Omar Sanseviero and Lucas Gonzalez and Zach Gleicher and Tris Warkentin and Vahab Mirrokni and Evan Senter and Eli Collins and Joelle Barral and Zoubin Ghahramani and Raia Hadsell and Yossi Matias and D. Sculley and Slav Petrov and Noah Fiedel and Noam Shazeer and Oriol Vinyals and Jeff Dean and Demis Hassabis and Koray Kavukcuoglu and Clement Farabet and Elena Buchatskaya and Jean-Baptiste Alayrac and Rohan Anil and Dmitry and Lepikhin and Sebastian Borgeaud and Olivier Bachem and Armand Joulin and Alek Andreev and Cassidy Hardin and Robert Dadashi and Léonard Hussenot},
233
+ year={2025},
234
+ eprint={2503.19786},
235
+ archivePrefix={arXiv},
236
+ primaryClass={cs.CL},
237
+ url={https://arxiv.org/abs/2503.19786},
238
+ }
239
+ @misc{hu2021loralowrankadaptationlarge,
240
+ title={LoRA: Low-Rank Adaptation of Large Language Models},
241
+ author={Edward J. Hu and Yelong Shen and Phillip Wallis and Zeyuan Allen-Zhu and Yuanzhi Li and Shean Wang and Lu Wang and Weizhu Chen},
242
+ year={2021},
243
+ eprint={2106.09685},
244
+ archivePrefix={arXiv},
245
+ primaryClass={cs.CL},
246
+ url={https://arxiv.org/abs/2106.09685},
247
+ }
248
+ @misc{dettmers2023qloraefficientfinetuningquantized,
249
+ title={QLoRA: Efficient Finetuning of Quantized LLMs},
250
+ author={Tim Dettmers and Artidoro Pagnoni and Ari Holtzman and Luke Zettlemoyer},
251
+ year={2023},
252
+ eprint={2305.14314},
253
+ archivePrefix={arXiv},
254
+ primaryClass={cs.LG},
255
+ url={https://arxiv.org/abs/2305.14314},
256
+ }
257
+ @misc{dao2023flashattention2fasterattentionbetter,
258
+ title={FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning},
259
+ author={Tri Dao},
260
+ year={2023},
261
+ eprint={2307.08691},
262
+ archivePrefix={arXiv},
263
+ primaryClass={cs.LG},
264
+ url={https://arxiv.org/abs/2307.08691},
265
+ }
266
+ @misc{hsu2024ligerkernelefficienttriton,
267
+ title={Liger Kernel: Efficient Triton Kernels for LLM Training},
268
+ author={Pin-Lun Hsu and Yun Dai and Vignesh Kothapalli and Qingquan Song and Shao Tang and Siyu Zhu and Steven Shimizu and Shivam Sahni and Haowen Ning and Yanning Chen},
269
+ year={2024},
270
+ eprint={2410.10989},
271
+ archivePrefix={arXiv},
272
+ primaryClass={cs.LG},
273
+ url={https://arxiv.org/abs/2410.10989},
274
+ }
275
+ @misc{wijmans2025cutlosseslargevocabularylanguage,
276
+ title={Cut Your Losses in Large-Vocabulary Language Models},
277
+ author={Erik Wijmans and Brody Huval and Alexander Hertzberg and Vladlen Koltun and Philipp Krähenbühl},
278
+ year={2025},
279
+ eprint={2411.09009},
280
+ archivePrefix={arXiv},
281
+ primaryClass={cs.LG},
282
+ url={https://arxiv.org/abs/2411.09009},
283
+ }
284
+ @misc{chen2021rexrevisitingbudgetedtraining,
285
+ title={REX: Revisiting Budgeted Training with an Improved Schedule},
286
+ author={John Chen and Cameron Wolfe and Anastasios Kyrillidis},
287
+ year={2021},
288
+ eprint={2107.04197},
289
+ archivePrefix={arXiv},
290
+ primaryClass={cs.LG},
291
+ url={https://arxiv.org/abs/2107.04197},
292
+ }
293
+ @misc{luo2023cameconfidenceguidedadaptivememory,
294
+ title={CAME: Confidence-guided Adaptive Memory Efficient Optimization},
295
+ author={Yang Luo and Xiaozhe Ren and Zangwei Zheng and Zhuo Jiang and Xin Jiang and Yang You},
296
+ year={2023},
297
+ eprint={2307.02047},
298
+ archivePrefix={arXiv},
299
+ primaryClass={cs.CL},
300
+ url={https://arxiv.org/abs/2307.02047},
301
+ }
302
+ @misc{zamirai2021revisitingbfloat16training,
303
+ title={Revisiting BFloat16 Training},
304
+ author={Pedram Zamirai and Jian Zhang and Christopher R. Aberger and Christopher De Sa},
305
+ year={2021},
306
+ eprint={2010.06192},
307
+ archivePrefix={arXiv},
308
+ primaryClass={cs.LG},
309
+ url={https://arxiv.org/abs/2010.06192},
310
+ }
311
+ @misc{liang2025cautiousoptimizersimprovingtraining,
312
+ title={Cautious Optimizers: Improving Training with One Line of Code},
313
+ author={Kaizhao Liang and Lizhang Chen and Bo Liu and Qiang Liu},
314
+ year={2025},
315
+ eprint={2411.16085},
316
+ archivePrefix={arXiv},
317
+ primaryClass={cs.LG},
318
+ url={https://arxiv.org/abs/2411.16085},
319
+ }
320
+ @misc{xie2025sana15efficientscaling,
321
+ title={SANA 1.5: Efficient Scaling of Training-Time and Inference-Time Compute in Linear Diffusion Transformer},
322
+ author={Enze Xie and Junsong Chen and Yuyang Zhao and Jincheng Yu and Ligeng Zhu and Chengyue Wu and Yujun Lin and Zhekai Zhang and Muyang Li and Junyu Chen and Han Cai and Bingchen Liu and Daquan Zhou and Song Han},
323
+ year={2025},
324
+ eprint={2501.18427},
325
+ archivePrefix={arXiv},
326
+ primaryClass={cs.CV},
327
+ url={https://arxiv.org/abs/2501.18427},
328
+ }
329
+ @misc{dallabetta2024fundussimpletousenewsscraper,
330
+ title={Fundus: A Simple-to-Use News Scraper Optimized for High Quality Extractions},
331
+ author={Max Dallabetta and Conrad Dobberstein and Adrian Breiding and Alan Akbik},
332
+ year={2024},
333
+ eprint={2403.15279},
334
+ archivePrefix={arXiv},
335
+ primaryClass={cs.CL},
336
+ url={https://arxiv.org/abs/2403.15279},
337
+ }
338
+ ```
339
+
340
+ </details>