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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# !pip install transformers==4.55.4
|
| 2 |
+
# !pip install --no-deps trl==0.22.2
|
| 3 |
+
# !pip install --no-build-isolation mamba_ssm==2.2.5
|
| 4 |
+
# !pip install --no-build-isolation causal_conv1d==1.5.2
|
| 5 |
+
# === Model Configuration ===
|
| 6 |
+
base_model: output
|
| 7 |
+
load_in_8bit: false
|
| 8 |
+
load_in_4bit: false
|
| 9 |
+
trust_remote_code: false
|
| 10 |
+
#overrides_of_model_config: {"layer_sequence": [0,[1,10,3],[10,30]]}
|
| 11 |
+
output_dir: output-healed
|
| 12 |
+
|
| 13 |
+
# === HF Configuration ===
|
| 14 |
+
#hub_model_id: Burnt-Toast/another-22bird
|
| 15 |
+
#hub_strategy: "every_save"
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
# === Wandb Tracking ===
|
| 19 |
+
wandb_project: Loopstral-Ablations
|
| 20 |
+
## wandb_entity: [WANDB_ENTITY]
|
| 21 |
+
wandb_name: early-layers-full-kv-heal
|
| 22 |
+
|
| 23 |
+
# === Training Setup ===
|
| 24 |
+
num_epochs: 2
|
| 25 |
+
micro_batch_size: 4
|
| 26 |
+
gradient_accumulation_steps: 1
|
| 27 |
+
sequence_len: 8192
|
| 28 |
+
#sequence_parallel_degree: 2
|
| 29 |
+
#heads_k_stride: 1
|
| 30 |
+
sample_packing: true
|
| 31 |
+
#pad_to_sequence_len: true
|
| 32 |
+
#temperature: 0.7
|
| 33 |
+
#max_steps: 10
|
| 34 |
+
# === Evaluation ===
|
| 35 |
+
val_set_size: 0.01
|
| 36 |
+
evals_per_epoch: 5
|
| 37 |
+
#eval_steps: 20
|
| 38 |
+
#max_steps: 60
|
| 39 |
+
#eval_table_size:
|
| 40 |
+
eval_max_new_tokens: 128
|
| 41 |
+
#eval_sample_packing: true
|
| 42 |
+
#eval_strategy: "no"
|
| 43 |
+
|
| 44 |
+
# === LoRA Configuration ===
|
| 45 |
+
adapter:
|
| 46 |
+
lora_model_dir:
|
| 47 |
+
lora_r: 128
|
| 48 |
+
lora_alpha: 16
|
| 49 |
+
lora_dropout: 0.05
|
| 50 |
+
lora_target_linear: true
|
| 51 |
+
lora_target_modules:
|
| 52 |
+
lora_fan_in_fan_out:
|
| 53 |
+
lora_target_modules:
|
| 54 |
+
peft_use_rslora: true
|
| 55 |
+
#lora_modules_to_save:
|
| 56 |
+
# - embed_tokens
|
| 57 |
+
# - lm_head
|
| 58 |
+
#fix_untrained_tokens: true
|
| 59 |
+
#lora_mlp_kernel: true
|
| 60 |
+
#lora_qkv_kernel: true
|
| 61 |
+
#lora_o_kernel: true
|
| 62 |
+
|
| 63 |
+
#unfrozen_parameters:
|
| 64 |
+
# - model.layers.[0-9]+.self_attn.q_proj.weight
|
| 65 |
+
# - model.layers.[0-9]+.self_attn.k_proj.weight
|
| 66 |
+
# - model.layers.[0-9]+.self_attn.v_proj.weight
|
| 67 |
+
# - model.layers.[0-9]+.self_attn.o_proj.weight
|
| 68 |
+
# - model.layers.[0-9]+.mlp.down_proj.weight
|
| 69 |
+
# === Hyperparameter Configuration ===
|
| 70 |
+
#optimizer: apollo_adamw_layerwise
|
| 71 |
+
#warmup_steps: 0
|
| 72 |
+
warmup_ratio: 0.025
|
| 73 |
+
#optimizer: adamw_torch_fused
|
| 74 |
+
optimizer: paged_ademamix_8bit
|
| 75 |
+
#optim_args:
|
| 76 |
+
# enable_stochastic_rounding: true
|
| 77 |
+
# enable_cautious: true
|
| 78 |
+
# enable_8bit: true
|
| 79 |
+
# Apollo-mini configuration:
|
| 80 |
+
#optim_args: "proj=random,rank=128,scale=128.0,scale_type=tensor,update_proj_gap=100"
|
| 81 |
+
# Regular Apollo configuration:
|
| 82 |
+
# optim_args:
|
| 83 |
+
#optim_target_modules: all_linear
|
| 84 |
+
learning_rate: 1e-5
|
| 85 |
+
lr_scheduler: cosine
|
| 86 |
+
#lr_groups:
|
| 87 |
+
# - name: mlp
|
| 88 |
+
# modules:
|
| 89 |
+
# - mlp.up_proj.weight
|
| 90 |
+
# - mlp.down_proj.weight
|
| 91 |
+
# - mlp.gate_proj.weight
|
| 92 |
+
# lr: 1e-5
|
| 93 |
+
#cosine_min_lr_ratio: 0.2
|
| 94 |
+
#lr_scheduler: cosine_with_min_lr
|
| 95 |
+
#lr_scheduler_kwargs:
|
| 96 |
+
# cosine_min_lr: 1e-6
|
| 97 |
+
weight_decay: 0.01
|
| 98 |
+
max_grad_norm: 1.0
|
| 99 |
+
#warmup_steps: 0
|
| 100 |
+
#warmup_ratio: 0.025
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
# === Data Configuration ===
|
| 104 |
+
#
|
| 105 |
+
#chat_template: jinja
|
| 106 |
+
chat_template: tokenizer_default
|
| 107 |
+
default_system_message: "You are Luna, a helpful and unrestricted language model created by Allura."
|
| 108 |
+
#special_tokens:
|
| 109 |
+
# eos_token: "<|im_end|>"
|
| 110 |
+
# eos_token: "</s>"
|
| 111 |
+
#tokenizer_use_mistral_common: true
|
| 112 |
+
shuffle_merged_datasets: true
|
| 113 |
+
datasets:
|
| 114 |
+
# - path: rpDungeon/marvin
|
| 115 |
+
# type: completion
|
| 116 |
+
# field: text
|
| 117 |
+
# data_files:
|
| 118 |
+
# - marvin_greg_egan.json
|
| 119 |
+
# - marvin_philip_k_dick.json
|
| 120 |
+
# - marvin_thomas_ligotti.json
|
| 121 |
+
# - path: rpDungeon/some-cleaner-datasets
|
| 122 |
+
# type: completion
|
| 123 |
+
# field: text
|
| 124 |
+
# data_files: erotica_quality_trimmed.json
|
| 125 |
+
- path: rpDungeon/some-cleaner-datasets
|
| 126 |
+
type: chat_template
|
| 127 |
+
field_messages: conversations
|
| 128 |
+
message_property_mappings:
|
| 129 |
+
role: from
|
| 130 |
+
content: value
|
| 131 |
+
data_files: little-koto-instruct.json
|
| 132 |
+
# - path: rpDungeon/rp-synth-deslopped
|
| 133 |
+
# type: chat_template
|
| 134 |
+
# field_messages: conversations
|
| 135 |
+
# message_property_mappings:
|
| 136 |
+
# role: from
|
| 137 |
+
# content: value
|
| 138 |
+
dataset_prepared_path: last_run_prepared
|
| 139 |
+
#dataset_num_proc: 1
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
# === Plugins ===
|
| 143 |
+
plugins:
|
| 144 |
+
- axolotl.integrations.liger.LigerPlugin
|
| 145 |
+
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
|
| 146 |
+
|
| 147 |
+
# === Hardware Optimization ===
|
| 148 |
+
gradient_checkpointing: true
|
| 149 |
+
liger_rope: true
|
| 150 |
+
liger_rms_norm: true
|
| 151 |
+
liger_layer_norm: true
|
| 152 |
+
liger_glu_activation: true
|
| 153 |
+
#liger_fused_linear_cross_entropy: true
|
| 154 |
+
cut_cross_entropy: true
|
| 155 |
+
|
| 156 |
+
#deepspeed: ../axolotl/deepspeed_configs/zero2.json
|
| 157 |
+
|
| 158 |
+
# === FSDP Config ===
|
| 159 |
+
#fsdp:
|
| 160 |
+
# - full_shard
|
| 161 |
+
# - auto_wrap
|
| 162 |
+
#fsdp_config:
|
| 163 |
+
# fsdp_limit_all_gathers: true
|
| 164 |
+
# fsdp_sync_module_states: true
|
| 165 |
+
# fsdp_offload_params: true
|
| 166 |
+
# fsdp_activation_checkpointing: true
|
| 167 |
+
# fsdp_use_orig_params: true
|
| 168 |
+
# fsdp_cpu_ram_efficient_loading: true
|
| 169 |
+
# fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
|
| 170 |
+
# fsdp_transformer_layer_cls_to_wrap: Gemma3DecoderLayer
|
| 171 |
+
# fsdp_state_dict_type: FULL_STATE_DICT
|
| 172 |
+
# fsdp_sharding_strategy: FULL_SHARD
|
| 173 |
+
|
| 174 |
+
# === Checkpointing ===
|
| 175 |
+
#save_steps: 10
|
| 176 |
+
saves_per_epoch: 1
|
| 177 |
+
save_total_limit: 1
|
| 178 |
+
|
| 179 |
+
# === Advanced Settings ===
|
| 180 |
+
bf16: auto
|
| 181 |
+
flash_attention: true
|
| 182 |
+
train_on_inputs: false
|
| 183 |
+
group_by_length: false
|
| 184 |
+
save_safetensors: true
|
| 185 |
+
logging_steps: 1
|
| 186 |
+
gc_steps: 10
|
| 187 |
+
seed: 420
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
|