1# See:
2# - https://github.com/karpathy/nanoGPT/blob/master/config/train_gpt2.py#L1
3# - https://github.com/OpenAccess-AI-Collective/axolotl/blob/main/examples/tiny-llama/pretrain.yml#L14
4# - https://github.com/karpathy/nanoGPT/blob/master/train.py#L35
5
6base_model: diwank/cryptgpt
7hub_model_id: diwank/cryptgpt
8
9model_type: GPT2LMHeadModel
10tokenizer_type: AutoTokenizer
11trust_remote_code: true # required for CryptGPTTokenizer
12resize_token_embeddings_to_32x: true
13output_dir: ./outputs/model-out
14
15datasets:
16 - path: diwank/encrypted-openwebtext
17 type: completion
18
19dataset_prepared_path: ./cryptgpt-prepared-dataset
20val_set_size: 0.04
21shuffle_merged_datasets: false
22
23sequence_len: 1024
24pad_to_sequence_len: true
25sample_packing: false
26pretrain_multipack_attn: false
27train_on_inputs: true
28
29gradient_accumulation_steps: 1
30micro_batch_size: 64
31optimizer: adamw_bnb_8bit
32adam_beta1: 0.9
33adam_beta2: 0.95
34seed: 42
35
36lr_scheduler: cosine
37learning_rate: 6e-4
38cosine_min_lr_ratio: 0.1 # min: 6e-5
39weight_decay: 0.1
40
41bf16: auto
42tf32: true
43flash_attention: true
44torch_compile: true
45gradient_checkpointing: false
46deepspeed: deepspeed_configs/zero2.json
47
48max_steps: 1200000
49eval_steps: 12000
50save_steps: 12000
51auto_resume_from_checkpoints: true
52logging_steps: 1
53eval_max_new_tokens: 128
54eval_causal_lm_metrics:
55 - sacrebleu
56
57wandb_project: cryptgpt-0.1
58wandb_name: cryptgpt-run-07
59