Views
No views yet

<bos><start_of_turn>user
{user message}<end_of_turn>
<start_of_turn>model
{response}<end_of_turn><eos>1### Model
2model_name_or_path: UCLA-AGI/Gemma-2-9B-It-SPPO-Iter3
3#ref_model: # Reference model for RL (optional, for everything besides SimPO, which doesn't take it at all)
4#ref_model_quantization_bit: 8 # 8 or 4
5
6### Method
7stage: pt # pt, sft, rm, ppo, kto, dpo (includes orpo and simpo)
8do_train: true
9finetuning_type: lora # full, freeze or lora
10lora_target: all
11#pref_beta: 0.1
12#pref_loss: simpo # sigmoid (dpo), orpo, simpo, ipo, hinge
13
14### Reward model
15#reward_model: RLHFlow/ArmoRM-Llama3-8B-v0.1 # or sfairXC/FsfairX-Gemma2-RM-v0.1 or nvidia/Llama-3.1-Nemotron-70B-Reward-HF
16#reward_model_type: full # full, lora, api
17#reward_model_adapters: # Path to RM LoRA adapter(s) if using a LoRA RM
18#reward_model_quantization_bit: 8 # 4 or 8
19
20### Freeze
21#freeze_trainable_layers: # The number of trainable layers for freeze (partial-parameter) fine-tuning. Positive number means n last layers to train, negative - n first layers to train
22#freeze_trainable_modules: # Name(s) of trainable modules for freeze (partial-parameter) fine-tuning. Use commas to separate
23#freeze_extra_modules: # Name(s) of modules apart from hidden layers to be set as trainable. Use commas to separate
24
25### LoRA
26#loraplus_lr_ratio: 8.0
27#loraplus_lr_embedding:
28use_dora: false
29use_rslora: true
30lora_rank: 64 # 64 is optimal for most trains on instruct, if training on base - use rslora or dora
31lora_alpha: 32
32lora_dropout: 0.05
33#pissa_init: true
34#pissa_iter: 16
35#pissa_convert: true
36
37### QLoRA
38quantization_bit: 8 # 2,3,4,5,6,8 in HQQ, 4 or 8 in bnb
39quantization_method: hqq # bitsandbytes or hqq
40
41### DeepSpeed
42deepspeed: examples/deepspeed/ds_z2_config.json # ds_z3_config.json or ds_z2_config.json which is required for HQQ on multigpu
43
44### Dataset
45dataset: sugarquill-10k # define in data/dataset_info.json
46cutoff_len: 8192
47max_samples: 10000
48overwrite_cache: true
49preprocessing_num_workers: 16
50#template: chatml
51
52### Output
53output_dir: saves/gemma/lora/sugarquill-1
54logging_steps: 3
55save_steps: 50
56plot_loss: true
57compute_accuracy: true
58overwrite_output_dir: true
59
60### Train
61per_device_train_batch_size: 1 # Effective b/s == per-device b/s * grad accum steps * number of GPUs
62gradient_accumulation_steps: 8
63learning_rate: 3.0e-5
64optim: paged_adamw_8bit # paged_adamw_8bit or adamw_torch usually
65num_train_epochs: 2.0
66lr_scheduler_type: cosine # cosine, constant or linear
67warmup_ratio: 0.05
68bf16: true
69ddp_timeout: 180000000
70packing: true
71max_grad_norm: 1.0
72
73### Opts
74flash_attn: fa2 # auto, disabled, sdpa, fa2 | Gemma will fallback to eager
75enable_liger_kernel: true # Pretty much must have if it works
76#use_unsloth: true # May not work with multigpu idk
77#use_adam_mini: true # Comment optim if using this
78
79### Eval
80val_size: 0.1
81per_device_eval_batch_size: 1
82eval_strategy: steps
83eval_steps: 0.05
84
85### Misc
86include_num_input_tokens_seen: true
87ddp_find_unused_parameters: false # Stupid thing tries to start distributed training otherwise
88upcast_layernorm: true
89
90### Inference for PPO
91#max_new_tokens: 512
92#temperature: 0.8
93#top_k: 0
94#top_p: 0.8
95
96### Tracking
97report_to: wandb # or tensorboard or mlflow | LOGIN BEFORE STARTING TRAIN OR ELSE IT WILL CRASH
98run_name: G2-9B-Sugarquill-1
99
100### Merge Adapter
101#export_dir: models/G2-9B-Sugarquill
102#export_size: 4
103#export_device: gpu
104#export_legacy_format: false
105