twanghcmut commited on
Commit
603949e
·
verified ·
1 Parent(s): c823aab

Model save

Browse files
2025-10-31/23-10-31/.hydra/config.yaml ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_name: gptoss_mixlora_128experts_commonsense_qa
2
+ seed: 42
3
+ device: cuda
4
+ paths:
5
+ data_dir: ./data
6
+ output_dir: ./outputs
7
+ checkpoint_dir: ./checkpoints
8
+ log_dir: ./logs
9
+ training:
10
+ learning_rate: 0.0002
11
+ num_epochs: 1
12
+ batch_size: 1
13
+ gradient_accumulation_steps: 1
14
+ max_grad_norm: 1.0
15
+ router_z_loss_coef: 0.001
16
+ aux_loss_coef: 0.01
17
+ fp16: false
18
+ bf16: true
19
+ eval_steps: 100
20
+ save_steps: 500
21
+ logging_steps: 10
22
+ type: hf_sft
23
+ per_device_train_batch_size: 1
24
+ per_device_eval_batch_size: 1
25
+ weight_decay: 0.01
26
+ warmup_ratio: 0.03
27
+ optim: adamw_torch
28
+ adam_beta1: 0.9
29
+ adam_beta2: 0.999
30
+ adam_epsilon: 1.0e-08
31
+ lr_scheduler_type: cosine
32
+ lr_scheduler_kwargs: {}
33
+ save_total_limit: 3
34
+ gradient_checkpointing: true
35
+ dataloader_num_workers: 0
36
+ remove_unused_columns: false
37
+ max_seq_length: 256
38
+ mixlora_training:
39
+ freeze_base_model: true
40
+ router_aux_loss_coef: 0.01
41
+ training_config:
42
+ enable_training: true
43
+ save_model: true
44
+ generate_samples: true
45
+ model_save_path: outputs/gptoss_mixlora_model.pth
46
+ dataset_usage:
47
+ train_percentage: 100.0
48
+ validation_percentage: 100.0
49
+ dataset:
50
+ type: commonsense_qa
51
+ data_path: ./data/commonsense_qa_train.jsonl
52
+ val_data_path: ./data/commonsense_qa_val.jsonl
53
+ max_length: 512
54
+ question_key: question
55
+ choices_key: choices
56
+ answer_key: answerKey
57
+ question_concept_key: question_concept
58
+ dataset_usage_percentage: 1.0e-05
59
+ tokenization:
60
+ padding: true
61
+ truncation: true
62
+ return_tensors: pt
63
+ instruction_template: 'Given the following multiple choice question, select the
64
+ most appropriate answer.
65
+
66
+
67
+ Question: {question}
68
+
69
+
70
+ Choices:
71
+
72
+ {choices_text}
73
+
74
+
75
+ Answer: {answer}
76
+
77
+ '
78
+ model:
79
+ base_model:
80
+ name: mistralai/Mistral-Nemo-Instruct-2407
81
+ model_type: mistral
82
+ trust_remote_code: true
83
+ torch_dtype: bfloat16
84
+ architecture:
85
+ hidden_size: 2880
86
+ num_layers: 36
87
+ num_attention_heads: 64
88
+ num_key_value_heads: 8
89
+ intermediate_size: 11520
90
+ vocab_size: 131072
91
+ max_position_embeddings: 131072
92
+ moe:
93
+ num_experts: 128
94
+ top_k: 4
95
+ experts_per_token: 4
96
+ router_algorithm: top_k
97
+ load_balancing: true
98
+ z_loss_coef: 0.001
99
+ aux_loss_coef: 0.01
100
+ lora:
101
+ r: 16
102
+ alpha: 32
103
+ dropout: 0.05
104
+ bias: none
105
+ target_modules:
106
+ - w1
107
+ - w2
108
+ - w3
109
+ - gate
110
+ task_type: CAUSAL_LM
111
+ augmentation:
112
+ enabled: true
113
+ strategy: adaptive
114
+ noise_scale: 0.1
115
+ jitter_noise: 0.01
116
+ normal:
117
+ alpha_scale: 0.1
118
+ beta_scale: 0.1
119
+ adaptive:
120
+ learnable_scale: true
121
+ feature_wise: true
122
+ quantization:
123
+ enabled: false
124
+ bits: 4
125
+ block_size: 32
126
+ format: mxfp4
127
+ training:
128
+ freeze_base_model: true
129
+ train_only_lora_moe: true
130
+ gradient_checkpointing: true
131
+ special_tokens:
132
+ pad_token: <pad>
133
+ eos_token: </s>
134
+ bos_token: <s>
135
+ unk_token: <unk>
136
+ harmony:
137
+ call_token: <|call|>
138
+ return_token: <|return|>
139
+ constrain_token: <|constrain|>
140
+ channel_token: <|channel|>
141
+ performance:
142
+ memory_efficient_attention: true
143
+ use_flash_attention: true
144
+ gradient_checkpointing: true
145
+ backend: auto
146
+ mixed_precision: true
147
+ fp16: false
148
+ bf16: true
149
+ initialization:
150
+ init_std: 0.02
151
+ lora_init_std: 0.01
152
+ router_init_std: 0.02
153
+ use_deep_norm: false
154
+ use_rms_norm: true
2025-10-31/23-10-31/.hydra/hydra.yaml ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ hydra:
2
+ run:
3
+ dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
4
+ sweep:
5
+ dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
6
+ subdir: ${hydra.job.num}
7
+ launcher:
8
+ _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
9
+ sweeper:
10
+ _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
11
+ max_batch_size: null
12
+ params: null
13
+ help:
14
+ app_name: ${hydra.job.name}
15
+ header: '${hydra.help.app_name} is powered by Hydra.
16
+
17
+ '
18
+ footer: 'Powered by Hydra (https://hydra.cc)
19
+
20
+ Use --hydra-help to view Hydra specific help
21
+
22
+ '
23
+ template: '${hydra.help.header}
24
+
25
+ == Configuration groups ==
26
+
27
+ Compose your configuration from those groups (group=option)
28
+
29
+
30
+ $APP_CONFIG_GROUPS
31
+
32
+
33
+ == Config ==
34
+
35
+ Override anything in the config (foo.bar=value)
36
+
37
+
38
+ $CONFIG
39
+
40
+
41
+ ${hydra.help.footer}
42
+
43
+ '
44
+ hydra_help:
45
+ template: 'Hydra (${hydra.runtime.version})
46
+
47
+ See https://hydra.cc for more info.
48
+
49
+
50
+ == Flags ==
51
+
52
+ $FLAGS_HELP
53
+
54
+
55
+ == Configuration groups ==
56
+
57
+ Compose your configuration from those groups (For example, append hydra/job_logging=disabled
58
+ to command line)
59
+
60
+
61
+ $HYDRA_CONFIG_GROUPS
62
+
63
+
64
+ Use ''--cfg hydra'' to Show the Hydra config.
65
+
66
+ '
67
+ hydra_help: ???
68
+ hydra_logging:
69
+ version: 1
70
+ formatters:
71
+ simple:
72
+ format: '[%(asctime)s][HYDRA] %(message)s'
73
+ handlers:
74
+ console:
75
+ class: logging.StreamHandler
76
+ formatter: simple
77
+ stream: ext://sys.stdout
78
+ root:
79
+ level: INFO
80
+ handlers:
81
+ - console
82
+ loggers:
83
+ logging_example:
84
+ level: DEBUG
85
+ disable_existing_loggers: false
86
+ job_logging:
87
+ version: 1
88
+ formatters:
89
+ simple:
90
+ format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
91
+ handlers:
92
+ console:
93
+ class: logging.StreamHandler
94
+ formatter: simple
95
+ stream: ext://sys.stdout
96
+ file:
97
+ class: logging.FileHandler
98
+ formatter: simple
99
+ filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
100
+ root:
101
+ level: INFO
102
+ handlers:
103
+ - console
104
+ - file
105
+ disable_existing_loggers: false
106
+ env: {}
107
+ mode: RUN
108
+ searchpath: []
109
+ callbacks: {}
110
+ output_subdir: .hydra
111
+ overrides:
112
+ hydra:
113
+ - hydra.mode=RUN
114
+ task: []
115
+ job:
116
+ name: string
117
+ chdir: null
118
+ override_dirname: ''
119
+ id: ???
120
+ num: ???
121
+ config_name: train_gptoss_mixlora
122
+ env_set: {}
123
+ env_copy: []
124
+ config:
125
+ override_dirname:
126
+ kv_sep: '='
127
+ item_sep: ','
128
+ exclude_keys: []
129
+ runtime:
130
+ version: 1.3.2
131
+ version_base: '1.3'
132
+ cwd: /Users/twang/CursorProject/llm-reasonings/naacl
133
+ config_sources:
134
+ - path: hydra.conf
135
+ schema: pkg
136
+ provider: hydra
137
+ - path: /Users/twang/CursorProject/llm-reasonings/naacl/configs
138
+ schema: file
139
+ provider: main
140
+ - path: ''
141
+ schema: structured
142
+ provider: schema
143
+ output_dir: /Users/twang/CursorProject/llm-reasonings/naacl/outputs/2025-10-31/23-10-31
144
+ choices:
145
+ model: gptoss_mixlora_128experts
146
+ training: llama_sft
147
+ dataset: commonsense_qa
148
+ hydra/env: default
149
+ hydra/callbacks: null
150
+ hydra/job_logging: default
151
+ hydra/hydra_logging: default
152
+ hydra/hydra_help: default
153
+ hydra/help: default
154
+ hydra/sweeper: basic
155
+ hydra/launcher: basic
156
+ hydra/output: default
157
+ verbose: false
2025-10-31/23-10-31/.hydra/overrides.yaml ADDED
@@ -0,0 +1 @@
 
 
1
+ []
2025-10-31/23-10-31/string.log ADDED
File without changes
2025-10-31/23-10-38/.hydra/config.yaml ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_name: gptoss_mixlora_128experts_commonsense_qa
2
+ seed: 42
3
+ device: cuda
4
+ paths:
5
+ data_dir: ./data
6
+ output_dir: ./outputs
7
+ checkpoint_dir: ./checkpoints
8
+ log_dir: ./logs
9
+ training:
10
+ learning_rate: 0.0002
11
+ num_epochs: 1
12
+ batch_size: 1
13
+ gradient_accumulation_steps: 1
14
+ max_grad_norm: 1.0
15
+ router_z_loss_coef: 0.001
16
+ aux_loss_coef: 0.01
17
+ fp16: false
18
+ bf16: true
19
+ eval_steps: 100
20
+ save_steps: 500
21
+ logging_steps: 10
22
+ type: hf_sft
23
+ per_device_train_batch_size: 1
24
+ per_device_eval_batch_size: 1
25
+ weight_decay: 0.01
26
+ warmup_ratio: 0.03
27
+ optim: adamw_torch
28
+ adam_beta1: 0.9
29
+ adam_beta2: 0.999
30
+ adam_epsilon: 1.0e-08
31
+ lr_scheduler_type: cosine
32
+ lr_scheduler_kwargs: {}
33
+ save_total_limit: 3
34
+ gradient_checkpointing: true
35
+ dataloader_num_workers: 0
36
+ remove_unused_columns: false
37
+ max_seq_length: 256
38
+ mixlora_training:
39
+ freeze_base_model: true
40
+ router_aux_loss_coef: 0.01
41
+ training_config:
42
+ enable_training: false
43
+ save_model: true
44
+ generate_samples: true
45
+ model_save_path: outputs/gptoss_mixlora_model.pth
46
+ dataset_usage:
47
+ train_percentage: 100.0
48
+ validation_percentage: 100.0
49
+ dataset:
50
+ type: commonsense_qa
51
+ data_path: ./data/commonsense_qa_train.jsonl
52
+ val_data_path: ./data/commonsense_qa_val.jsonl
53
+ max_length: 512
54
+ question_key: question
55
+ choices_key: choices
56
+ answer_key: answerKey
57
+ question_concept_key: question_concept
58
+ dataset_usage_percentage: 1.0e-05
59
+ tokenization:
60
+ padding: true
61
+ truncation: true
62
+ return_tensors: pt
63
+ instruction_template: 'Given the following multiple choice question, select the
64
+ most appropriate answer.
65
+
66
+
67
+ Question: {question}
68
+
69
+
70
+ Choices:
71
+
72
+ {choices_text}
73
+
74
+
75
+ Answer: {answer}
76
+
77
+ '
78
+ model:
79
+ base_model:
80
+ name: mistralai/Mistral-Nemo-Instruct-2407
81
+ model_type: mistral
82
+ trust_remote_code: true
83
+ torch_dtype: bfloat16
84
+ architecture:
85
+ hidden_size: 2880
86
+ num_layers: 36
87
+ num_attention_heads: 64
88
+ num_key_value_heads: 8
89
+ intermediate_size: 11520
90
+ vocab_size: 131072
91
+ max_position_embeddings: 131072
92
+ moe:
93
+ num_experts: 8
94
+ top_k: 4
95
+ experts_per_token: 4
96
+ router_algorithm: top_k
97
+ load_balancing: true
98
+ z_loss_coef: 0.001
99
+ aux_loss_coef: 0.01
100
+ lora:
101
+ r: 16
102
+ alpha: 32
103
+ dropout: 0.05
104
+ bias: none
105
+ target_modules:
106
+ - w1
107
+ - w2
108
+ - w3
109
+ - gate
110
+ task_type: CAUSAL_LM
111
+ augmentation:
112
+ enabled: true
113
+ strategy: adaptive
114
+ noise_scale: 0.1
115
+ jitter_noise: 0.01
116
+ normal:
117
+ alpha_scale: 0.1
118
+ beta_scale: 0.1
119
+ adaptive:
120
+ learnable_scale: true
121
+ feature_wise: true
122
+ quantization:
123
+ enabled: false
124
+ bits: 4
125
+ block_size: 32
126
+ format: mxfp4
127
+ training:
128
+ freeze_base_model: true
129
+ train_only_lora_moe: true
130
+ gradient_checkpointing: true
131
+ special_tokens:
132
+ pad_token: <pad>
133
+ eos_token: </s>
134
+ bos_token: <s>
135
+ unk_token: <unk>
136
+ harmony:
137
+ call_token: <|call|>
138
+ return_token: <|return|>
139
+ constrain_token: <|constrain|>
140
+ channel_token: <|channel|>
141
+ performance:
142
+ memory_efficient_attention: true
143
+ use_flash_attention: true
144
+ gradient_checkpointing: true
145
+ backend: auto
146
+ mixed_precision: true
147
+ fp16: false
148
+ bf16: true
149
+ initialization:
150
+ init_std: 0.02
151
+ lora_init_std: 0.01
152
+ router_init_std: 0.02
153
+ use_deep_norm: false
154
+ use_rms_norm: true
2025-10-31/23-10-38/.hydra/hydra.yaml ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ hydra:
2
+ run:
3
+ dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
4
+ sweep:
5
+ dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
6
+ subdir: ${hydra.job.num}
7
+ launcher:
8
+ _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
9
+ sweeper:
10
+ _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
11
+ max_batch_size: null
12
+ params: null
13
+ help:
14
+ app_name: ${hydra.job.name}
15
+ header: '${hydra.help.app_name} is powered by Hydra.
16
+
17
+ '
18
+ footer: 'Powered by Hydra (https://hydra.cc)
19
+
20
+ Use --hydra-help to view Hydra specific help
21
+
22
+ '
23
+ template: '${hydra.help.header}
24
+
25
+ == Configuration groups ==
26
+
27
+ Compose your configuration from those groups (group=option)
28
+
29
+
30
+ $APP_CONFIG_GROUPS
31
+
32
+
33
+ == Config ==
34
+
35
+ Override anything in the config (foo.bar=value)
36
+
37
+
38
+ $CONFIG
39
+
40
+
41
+ ${hydra.help.footer}
42
+
43
+ '
44
+ hydra_help:
45
+ template: 'Hydra (${hydra.runtime.version})
46
+
47
+ See https://hydra.cc for more info.
48
+
49
+
50
+ == Flags ==
51
+
52
+ $FLAGS_HELP
53
+
54
+
55
+ == Configuration groups ==
56
+
57
+ Compose your configuration from those groups (For example, append hydra/job_logging=disabled
58
+ to command line)
59
+
60
+
61
+ $HYDRA_CONFIG_GROUPS
62
+
63
+
64
+ Use ''--cfg hydra'' to Show the Hydra config.
65
+
66
+ '
67
+ hydra_help: ???
68
+ hydra_logging:
69
+ version: 1
70
+ formatters:
71
+ simple:
72
+ format: '[%(asctime)s][HYDRA] %(message)s'
73
+ handlers:
74
+ console:
75
+ class: logging.StreamHandler
76
+ formatter: simple
77
+ stream: ext://sys.stdout
78
+ root:
79
+ level: INFO
80
+ handlers:
81
+ - console
82
+ loggers:
83
+ logging_example:
84
+ level: DEBUG
85
+ disable_existing_loggers: false
86
+ job_logging:
87
+ version: 1
88
+ formatters:
89
+ simple:
90
+ format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
91
+ handlers:
92
+ console:
93
+ class: logging.StreamHandler
94
+ formatter: simple
95
+ stream: ext://sys.stdout
96
+ file:
97
+ class: logging.FileHandler
98
+ formatter: simple
99
+ filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
100
+ root:
101
+ level: INFO
102
+ handlers:
103
+ - console
104
+ - file
105
+ disable_existing_loggers: false
106
+ env: {}
107
+ mode: RUN
108
+ searchpath: []
109
+ callbacks: {}
110
+ output_subdir: .hydra
111
+ overrides:
112
+ hydra:
113
+ - hydra.mode=RUN
114
+ task:
115
+ - model.architecture.moe.num_experts=8
116
+ - training_config.enable_training=false
117
+ job:
118
+ name: train_gptoss_mixlora
119
+ chdir: null
120
+ override_dirname: model.architecture.moe.num_experts=8,training_config.enable_training=false
121
+ id: ???
122
+ num: ???
123
+ config_name: train_gptoss_mixlora
124
+ env_set: {}
125
+ env_copy: []
126
+ config:
127
+ override_dirname:
128
+ kv_sep: '='
129
+ item_sep: ','
130
+ exclude_keys: []
131
+ runtime:
132
+ version: 1.3.2
133
+ version_base: '1.3'
134
+ cwd: /Users/twang/CursorProject/llm-reasonings/naacl
135
+ config_sources:
136
+ - path: hydra.conf
137
+ schema: pkg
138
+ provider: hydra
139
+ - path: /Users/twang/CursorProject/llm-reasonings/naacl/configs
140
+ schema: file
141
+ provider: main
142
+ - path: ''
143
+ schema: structured
144
+ provider: schema
145
+ output_dir: /Users/twang/CursorProject/llm-reasonings/naacl/outputs/2025-10-31/23-10-38
146
+ choices:
147
+ model: gptoss_mixlora_128experts
148
+ training: llama_sft
149
+ dataset: commonsense_qa
150
+ hydra/env: default
151
+ hydra/callbacks: null
152
+ hydra/job_logging: default
153
+ hydra/hydra_logging: default
154
+ hydra/hydra_help: default
155
+ hydra/help: default
156
+ hydra/sweeper: basic
157
+ hydra/launcher: basic
158
+ hydra/output: default
159
+ verbose: false
2025-10-31/23-10-38/.hydra/overrides.yaml ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ - model.architecture.moe.num_experts=8
2
+ - training_config.enable_training=false
2025-10-31/23-10-38/train_gptoss_mixlora.log ADDED
File without changes
2025-10-31/23-11-28/.hydra/config.yaml ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_name: gptoss_mixlora_128experts_commonsense_qa
2
+ seed: 42
3
+ device: cuda
4
+ paths:
5
+ data_dir: ./data
6
+ output_dir: ./outputs
7
+ checkpoint_dir: ./checkpoints
8
+ log_dir: ./logs
9
+ training:
10
+ learning_rate: 0.0002
11
+ num_epochs: 1
12
+ batch_size: 1
13
+ gradient_accumulation_steps: 1
14
+ max_grad_norm: 1.0
15
+ router_z_loss_coef: 0.001
16
+ aux_loss_coef: 0.01
17
+ fp16: false
18
+ bf16: true
19
+ eval_steps: 100
20
+ save_steps: 500
21
+ logging_steps: 10
22
+ type: hf_sft
23
+ per_device_train_batch_size: 1
24
+ per_device_eval_batch_size: 1
25
+ weight_decay: 0.01
26
+ warmup_ratio: 0.03
27
+ optim: adamw_torch
28
+ adam_beta1: 0.9
29
+ adam_beta2: 0.999
30
+ adam_epsilon: 1.0e-08
31
+ lr_scheduler_type: cosine
32
+ lr_scheduler_kwargs: {}
33
+ save_total_limit: 3
34
+ gradient_checkpointing: true
35
+ dataloader_num_workers: 0
36
+ remove_unused_columns: false
37
+ max_seq_length: 256
38
+ mixlora_training:
39
+ freeze_base_model: true
40
+ router_aux_loss_coef: 0.01
41
+ training_config:
42
+ enable_training: false
43
+ save_model: true
44
+ generate_samples: true
45
+ model_save_path: outputs/gptoss_mixlora_model.pth
46
+ dataset_usage:
47
+ train_percentage: 100.0
48
+ validation_percentage: 100.0
49
+ dataset:
50
+ type: commonsense_qa
51
+ data_path: ./data/commonsense_qa_train.jsonl
52
+ val_data_path: ./data/commonsense_qa_val.jsonl
53
+ max_length: 512
54
+ question_key: question
55
+ choices_key: choices
56
+ answer_key: answerKey
57
+ question_concept_key: question_concept
58
+ dataset_usage_percentage: 1.0e-05
59
+ tokenization:
60
+ padding: true
61
+ truncation: true
62
+ return_tensors: pt
63
+ instruction_template: 'Given the following multiple choice question, select the
64
+ most appropriate answer.
65
+
66
+
67
+ Question: {question}
68
+
69
+
70
+ Choices:
71
+
72
+ {choices_text}
73
+
74
+
75
+ Answer: {answer}
76
+
77
+ '
78
+ model:
79
+ base_model:
80
+ name: mistralai/Mistral-Nemo-Instruct-2407
81
+ model_type: mistral
82
+ trust_remote_code: true
83
+ torch_dtype: bfloat16
84
+ architecture:
85
+ hidden_size: 2880
86
+ num_layers: 36
87
+ num_attention_heads: 64
88
+ num_key_value_heads: 8
89
+ intermediate_size: 11520
90
+ vocab_size: 131072
91
+ max_position_embeddings: 131072
92
+ moe:
93
+ num_experts: 128
94
+ top_k: 4
95
+ experts_per_token: 4
96
+ router_algorithm: top_k
97
+ load_balancing: true
98
+ z_loss_coef: 0.001
99
+ aux_loss_coef: 0.01
100
+ lora:
101
+ r: 16
102
+ alpha: 32
103
+ dropout: 0.05
104
+ bias: none
105
+ target_modules:
106
+ - w1
107
+ - w2
108
+ - w3
109
+ - gate
110
+ task_type: CAUSAL_LM
111
+ augmentation:
112
+ enabled: true
113
+ strategy: adaptive
114
+ noise_scale: 0.1
115
+ jitter_noise: 0.01
116
+ normal:
117
+ alpha_scale: 0.1
118
+ beta_scale: 0.1
119
+ adaptive:
120
+ learnable_scale: true
121
+ feature_wise: true
122
+ quantization:
123
+ enabled: false
124
+ bits: 4
125
+ block_size: 32
126
+ format: mxfp4
127
+ training:
128
+ freeze_base_model: true
129
+ train_only_lora_moe: true
130
+ gradient_checkpointing: true
131
+ special_tokens:
132
+ pad_token: <pad>
133
+ eos_token: </s>
134
+ bos_token: <s>
135
+ unk_token: <unk>
136
+ harmony:
137
+ call_token: <|call|>
138
+ return_token: <|return|>
139
+ constrain_token: <|constrain|>
140
+ channel_token: <|channel|>
141
+ performance:
142
+ memory_efficient_attention: true
143
+ use_flash_attention: true
144
+ gradient_checkpointing: true
145
+ backend: auto
146
+ mixed_precision: true
147
+ fp16: false
148
+ bf16: true
149
+ initialization:
150
+ init_std: 0.02
151
+ lora_init_std: 0.01
152
+ router_init_std: 0.02
153
+ use_deep_norm: false
154
+ use_rms_norm: true
2025-10-31/23-11-28/.hydra/hydra.yaml ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ hydra:
2
+ run:
3
+ dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
4
+ sweep:
5
+ dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
6
+ subdir: ${hydra.job.num}
7
+ launcher:
8
+ _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
9
+ sweeper:
10
+ _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
11
+ max_batch_size: null
12
+ params: null
13
+ help:
14
+ app_name: ${hydra.job.name}
15
+ header: '${hydra.help.app_name} is powered by Hydra.
16
+
17
+ '
18
+ footer: 'Powered by Hydra (https://hydra.cc)
19
+
20
+ Use --hydra-help to view Hydra specific help
21
+
22
+ '
23
+ template: '${hydra.help.header}
24
+
25
+ == Configuration groups ==
26
+
27
+ Compose your configuration from those groups (group=option)
28
+
29
+
30
+ $APP_CONFIG_GROUPS
31
+
32
+
33
+ == Config ==
34
+
35
+ Override anything in the config (foo.bar=value)
36
+
37
+
38
+ $CONFIG
39
+
40
+
41
+ ${hydra.help.footer}
42
+
43
+ '
44
+ hydra_help:
45
+ template: 'Hydra (${hydra.runtime.version})
46
+
47
+ See https://hydra.cc for more info.
48
+
49
+
50
+ == Flags ==
51
+
52
+ $FLAGS_HELP
53
+
54
+
55
+ == Configuration groups ==
56
+
57
+ Compose your configuration from those groups (For example, append hydra/job_logging=disabled
58
+ to command line)
59
+
60
+
61
+ $HYDRA_CONFIG_GROUPS
62
+
63
+
64
+ Use ''--cfg hydra'' to Show the Hydra config.
65
+
66
+ '
67
+ hydra_help: ???
68
+ hydra_logging:
69
+ version: 1
70
+ formatters:
71
+ simple:
72
+ format: '[%(asctime)s][HYDRA] %(message)s'
73
+ handlers:
74
+ console:
75
+ class: logging.StreamHandler
76
+ formatter: simple
77
+ stream: ext://sys.stdout
78
+ root:
79
+ level: INFO
80
+ handlers:
81
+ - console
82
+ loggers:
83
+ logging_example:
84
+ level: DEBUG
85
+ disable_existing_loggers: false
86
+ job_logging:
87
+ version: 1
88
+ formatters:
89
+ simple:
90
+ format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
91
+ handlers:
92
+ console:
93
+ class: logging.StreamHandler
94
+ formatter: simple
95
+ stream: ext://sys.stdout
96
+ file:
97
+ class: logging.FileHandler
98
+ formatter: simple
99
+ filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
100
+ root:
101
+ level: INFO
102
+ handlers:
103
+ - console
104
+ - file
105
+ disable_existing_loggers: false
106
+ env: {}
107
+ mode: RUN
108
+ searchpath: []
109
+ callbacks: {}
110
+ output_subdir: .hydra
111
+ overrides:
112
+ hydra:
113
+ - hydra.mode=RUN
114
+ task:
115
+ - training_config.enable_training=false
116
+ job:
117
+ name: train_gptoss_mixlora
118
+ chdir: null
119
+ override_dirname: training_config.enable_training=false
120
+ id: ???
121
+ num: ???
122
+ config_name: train_gptoss_mixlora
123
+ env_set: {}
124
+ env_copy: []
125
+ config:
126
+ override_dirname:
127
+ kv_sep: '='
128
+ item_sep: ','
129
+ exclude_keys: []
130
+ runtime:
131
+ version: 1.3.2
132
+ version_base: '1.3'
133
+ cwd: /Users/twang/CursorProject/llm-reasonings/naacl
134
+ config_sources:
135
+ - path: hydra.conf
136
+ schema: pkg
137
+ provider: hydra
138
+ - path: /Users/twang/CursorProject/llm-reasonings/naacl/configs
139
+ schema: file
140
+ provider: main
141
+ - path: ''
142
+ schema: structured
143
+ provider: schema
144
+ output_dir: /Users/twang/CursorProject/llm-reasonings/naacl/outputs/2025-10-31/23-11-28
145
+ choices:
146
+ model: gptoss_mixlora_128experts
147
+ training: llama_sft
148
+ dataset: commonsense_qa
149
+ hydra/env: default
150
+ hydra/callbacks: null
151
+ hydra/job_logging: default
152
+ hydra/hydra_logging: default
153
+ hydra/hydra_help: default
154
+ hydra/help: default
155
+ hydra/sweeper: basic
156
+ hydra/launcher: basic
157
+ hydra/output: default
158
+ verbose: false
2025-10-31/23-11-28/.hydra/overrides.yaml ADDED
@@ -0,0 +1 @@
 
 
1
+ - training_config.enable_training=false
2025-10-31/23-11-28/train_gptoss_mixlora.log ADDED
File without changes
2025-11-02/23-05-25/.hydra/config.yaml ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_name: gptoss_mixlora_debug_commonsense_qa
2
+ seed: 42
3
+ device: cuda
4
+ paths:
5
+ data_dir: ./data
6
+ output_dir: ./outputs
7
+ checkpoint_dir: ./checkpoints
8
+ log_dir: ./logs
9
+ training:
10
+ learning_rate: 0.0002
11
+ num_epochs: 1
12
+ batch_size: 1
13
+ gradient_accumulation_steps: 1
14
+ max_grad_norm: 1.0
15
+ router_z_loss_coef: 0.001
16
+ aux_loss_coef: 0.01
17
+ fp16: false
18
+ bf16: true
19
+ eval_steps: 100
20
+ save_steps: 500
21
+ logging_steps: 10
22
+ type: hf_sft
23
+ per_device_train_batch_size: 1
24
+ per_device_eval_batch_size: 1
25
+ weight_decay: 0.01
26
+ warmup_ratio: 0.03
27
+ optim: adamw_torch
28
+ adam_beta1: 0.9
29
+ adam_beta2: 0.999
30
+ adam_epsilon: 1.0e-08
31
+ lr_scheduler_type: cosine
32
+ lr_scheduler_kwargs: {}
33
+ save_total_limit: 3
34
+ gradient_checkpointing: true
35
+ dataloader_num_workers: 0
36
+ remove_unused_columns: false
37
+ max_seq_length: 256
38
+ mixlora_training:
39
+ freeze_base_model: true
40
+ router_aux_loss_coef: 0.01
41
+ training_config:
42
+ enable_training: true
43
+ save_model: true
44
+ generate_samples: false
45
+ model_save_path: outputs/gptoss_mixlora_debug_model.pth
46
+ dataset_usage:
47
+ train_percentage: 0.01
48
+ validation_percentage: 0.01
49
+ dataset:
50
+ type: commonsense_qa
51
+ data_path: ./data/commonsense_qa_train.jsonl
52
+ val_data_path: ./data/commonsense_qa_val.jsonl
53
+ max_length: 512
54
+ question_key: question
55
+ choices_key: choices
56
+ answer_key: answerKey
57
+ question_concept_key: question_concept
58
+ dataset_usage_percentage: 1.0
59
+ tokenization:
60
+ padding: true
61
+ truncation: true
62
+ return_tensors: pt
63
+ instruction_template: 'Given the following multiple choice question, select the
64
+ most appropriate answer.
65
+
66
+
67
+ Question: {question}
68
+
69
+
70
+ Choices:
71
+
72
+ {choices_text}
73
+
74
+
75
+ Answer: {answer}
76
+
77
+ '
78
+ model:
79
+ base_model:
80
+ name: microsoft/DialoGPT-medium
81
+ model_type: gpt2
82
+ trust_remote_code: true
83
+ torch_dtype: float16
84
+ architecture:
85
+ hidden_size: 1024
86
+ num_layers: 6
87
+ num_attention_heads: 16
88
+ num_key_value_heads: 4
89
+ intermediate_size: 4096
90
+ vocab_size: 50257
91
+ max_position_embeddings: 1024
92
+ moe:
93
+ num_experts: 16
94
+ top_k: 2
95
+ experts_per_token: 2
96
+ router_algorithm: top_k
97
+ load_balancing: true
98
+ z_loss_coef: 0.001
99
+ aux_loss_coef: 0.01
100
+ lora:
101
+ r: 8
102
+ alpha: 16
103
+ dropout: 0.05
104
+ bias: none
105
+ target_modules:
106
+ - w1
107
+ - w2
108
+ - w3
109
+ - gate
110
+ task_type: CAUSAL_LM
111
+ augmentation:
112
+ enabled: false
113
+ strategy: normal
114
+ noise_scale: 0.1
115
+ jitter_noise: 0.01
116
+ normal:
117
+ alpha_scale: 0.1
118
+ beta_scale: 0.1
119
+ quantization:
120
+ enabled: false
121
+ bits: 4
122
+ block_size: 32
123
+ format: mxfp4
124
+ training:
125
+ freeze_base_model: true
126
+ train_only_lora_moe: true
127
+ gradient_checkpointing: false
128
+ special_tokens:
129
+ pad_token: <pad>
130
+ eos_token: </s>
131
+ bos_token: <s>
132
+ unk_token: <unk>
133
+ harmony:
134
+ call_token: <|call|>
135
+ return_token: <|return|>
136
+ constrain_token: <|constrain|>
137
+ channel_token: <|channel|>
138
+ performance:
139
+ memory_efficient_attention: false
140
+ use_flash_attention: false
141
+ gradient_checkpointing: false
142
+ backend: torch
143
+ mixed_precision: false
144
+ fp16: true
145
+ bf16: false
146
+ initialization:
147
+ init_std: 0.02
148
+ lora_init_std: 0.01
149
+ router_init_std: 0.02
150
+ use_deep_norm: false
151
+ use_rms_norm: true
2025-11-02/23-05-25/.hydra/hydra.yaml ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ hydra:
2
+ run:
3
+ dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
4
+ sweep:
5
+ dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
6
+ subdir: ${hydra.job.num}
7
+ launcher:
8
+ _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
9
+ sweeper:
10
+ _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
11
+ max_batch_size: null
12
+ params: null
13
+ help:
14
+ app_name: ${hydra.job.name}
15
+ header: '${hydra.help.app_name} is powered by Hydra.
16
+
17
+ '
18
+ footer: 'Powered by Hydra (https://hydra.cc)
19
+
20
+ Use --hydra-help to view Hydra specific help
21
+
22
+ '
23
+ template: '${hydra.help.header}
24
+
25
+ == Configuration groups ==
26
+
27
+ Compose your configuration from those groups (group=option)
28
+
29
+
30
+ $APP_CONFIG_GROUPS
31
+
32
+
33
+ == Config ==
34
+
35
+ Override anything in the config (foo.bar=value)
36
+
37
+
38
+ $CONFIG
39
+
40
+
41
+ ${hydra.help.footer}
42
+
43
+ '
44
+ hydra_help:
45
+ template: 'Hydra (${hydra.runtime.version})
46
+
47
+ See https://hydra.cc for more info.
48
+
49
+
50
+ == Flags ==
51
+
52
+ $FLAGS_HELP
53
+
54
+
55
+ == Configuration groups ==
56
+
57
+ Compose your configuration from those groups (For example, append hydra/job_logging=disabled
58
+ to command line)
59
+
60
+
61
+ $HYDRA_CONFIG_GROUPS
62
+
63
+
64
+ Use ''--cfg hydra'' to Show the Hydra config.
65
+
66
+ '
67
+ hydra_help: ???
68
+ hydra_logging:
69
+ version: 1
70
+ formatters:
71
+ simple:
72
+ format: '[%(asctime)s][HYDRA] %(message)s'
73
+ handlers:
74
+ console:
75
+ class: logging.StreamHandler
76
+ formatter: simple
77
+ stream: ext://sys.stdout
78
+ root:
79
+ level: INFO
80
+ handlers:
81
+ - console
82
+ loggers:
83
+ logging_example:
84
+ level: DEBUG
85
+ disable_existing_loggers: false
86
+ job_logging:
87
+ version: 1
88
+ formatters:
89
+ simple:
90
+ format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
91
+ handlers:
92
+ console:
93
+ class: logging.StreamHandler
94
+ formatter: simple
95
+ stream: ext://sys.stdout
96
+ file:
97
+ class: logging.FileHandler
98
+ formatter: simple
99
+ filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
100
+ root:
101
+ level: INFO
102
+ handlers:
103
+ - console
104
+ - file
105
+ disable_existing_loggers: false
106
+ env: {}
107
+ mode: RUN
108
+ searchpath: []
109
+ callbacks: {}
110
+ output_subdir: .hydra
111
+ overrides:
112
+ hydra:
113
+ - hydra.mode=RUN
114
+ task: []
115
+ job:
116
+ name: train_gptoss_mixlora
117
+ chdir: null
118
+ override_dirname: ''
119
+ id: ???
120
+ num: ???
121
+ config_name: train_gptoss_mixlora_debug
122
+ env_set: {}
123
+ env_copy: []
124
+ config:
125
+ override_dirname:
126
+ kv_sep: '='
127
+ item_sep: ','
128
+ exclude_keys: []
129
+ runtime:
130
+ version: 1.3.2
131
+ version_base: '1.3'
132
+ cwd: /Users/twang/CursorProject/llm-reasonings/naacl
133
+ config_sources:
134
+ - path: hydra.conf
135
+ schema: pkg
136
+ provider: hydra
137
+ - path: /Users/twang/CursorProject/llm-reasonings/naacl/configs
138
+ schema: file
139
+ provider: main
140
+ - path: ''
141
+ schema: structured
142
+ provider: schema
143
+ output_dir: /Users/twang/CursorProject/llm-reasonings/naacl/outputs/2025-11-02/23-05-25
144
+ choices:
145
+ model: gptoss_mixlora_debug
146
+ training: llama_sft
147
+ dataset: commonsense_qa
148
+ hydra/env: default
149
+ hydra/callbacks: null
150
+ hydra/job_logging: default
151
+ hydra/hydra_logging: default
152
+ hydra/hydra_help: default
153
+ hydra/help: default
154
+ hydra/sweeper: basic
155
+ hydra/launcher: basic
156
+ hydra/output: default
157
+ verbose: false
2025-11-02/23-05-25/.hydra/overrides.yaml ADDED
@@ -0,0 +1 @@
 
 
1
+ []
2025-11-02/23-05-25/train_gptoss_mixlora.log ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [2025-11-02 23:05:25,981][__main__][INFO] - Pipeline started with immediate output flushing enabled
2
+ [2025-11-02 23:05:25,985][__main__][INFO] - Starting model creation - this may take several minutes for large models
2025-11-22/05-50-23/.hydra/config.yaml ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_name: llama2_7b_mixlora_alpaca
2
+ seed: 42
3
+ device: cuda
4
+ paths:
5
+ data_dir: ./data
6
+ output_dir: /research
7
+ checkpoint_dir: ./checkpoints
8
+ log_dir: ./logs
9
+ training_config:
10
+ enable_training: true
11
+ enable_evaluation: true
12
+ enable_generation_demo: true
13
+ sample_prompts:
14
+ - Give three tips for staying healthy.
15
+ - What are the three primary colors?
16
+ - Describe the structure of an atom.
17
+ - How can we reduce air pollution?
18
+ - Explain how photosynthesis works.
19
+ generation_demo:
20
+ max_length: 200
21
+ temperature: 0.8
22
+ top_p: 0.9
23
+ num_return_sequences: 1
24
+ tracking:
25
+ backend: wandb
26
+ wandb:
27
+ project_name: llama2-mixlora-alpaca
28
+ entity: null
29
+ run_name: null
30
+ tags:
31
+ - llama2
32
+ - mixlora
33
+ - alpaca
34
+ - sft
35
+ notes: Training Llama-2-7b-hf with MixLoRA on Alpaca dataset
36
+ eval:
37
+ load_model_path: null
38
+ metrics:
39
+ bleu: true
40
+ rouge: false
41
+ meteor: false
42
+ perplexity: true
43
+ harness:
44
+ harness_path: lm-eval
45
+ results_dir: ./eval_results
46
+ tasks:
47
+ - hellaswag
48
+ model_args: null
49
+ batch_size: null
50
+ limit: null
51
+ custom_eval:
52
+ enabled: true
53
+ sample_size: 10
54
+ max_length: 200
55
+ model:
56
+ type: llama_mixlora
57
+ model_name: meta-llama/Llama-2-7b-hf
58
+ model_type: llama_mixlora
59
+ trust_remote_code: false
60
+ torch_dtype: bfloat16
61
+ device_map: auto
62
+ mixlora_config:
63
+ num_experts: 4
64
+ moe_top_k: 1
65
+ lora_r: 32
66
+ lora_alpha: 16
67
+ lora_dropout: 0.1
68
+ normal_augmenter:
69
+ enabled: true
70
+ alpha_scale: 1.0
71
+ beta_scale: 1.0
72
+ generation:
73
+ max_length: 2048
74
+ temperature: 0.8
75
+ top_p: 0.9
76
+ top_k: 50
77
+ do_sample: true
78
+ dataset:
79
+ type: alpaca_cleaned
80
+ data_path: ./data/alpaca_cleaned.jsonl
81
+ max_length: 4096
82
+ instruction_key: instruction
83
+ output_key: output
84
+ input_key: input
85
+ dataset_usage_percentage: 0.01
86
+ tokenization:
87
+ padding: true
88
+ truncation: true
89
+ return_tensors: pt
90
+ training:
91
+ type: hf_sft
92
+ learning_rate: 0.0002
93
+ num_epochs: 1
94
+ per_device_train_batch_size: 4
95
+ per_device_eval_batch_size: 4
96
+ gradient_accumulation_steps: 1
97
+ max_grad_norm: 1.0
98
+ weight_decay: 0.01
99
+ warmup_ratio: 0.03
100
+ optim: adamw_torch
101
+ adam_beta1: 0.9
102
+ adam_beta2: 0.999
103
+ adam_epsilon: 1.0e-08
104
+ lr_scheduler_type: cosine
105
+ lr_scheduler_kwargs: {}
106
+ logging_steps: 10
107
+ eval_steps: 100
108
+ save_steps: 500
109
+ save_strategy: epoch
110
+ save_total_limit: 3
111
+ fp16: false
112
+ bf16: true
113
+ gradient_checkpointing: true
114
+ dataloader_num_workers: 0
115
+ remove_unused_columns: false
116
+ max_seq_length: 256
117
+ mixlora_training:
118
+ freeze_base_model: true
119
+ router_aux_loss_coef: 0.01
120
+ push_to_hub: true
121
+ hub_model_id: twanghcmut/llama-mixlora-2
122
+ hub_strategy: end
2025-11-22/05-50-23/.hydra/hydra.yaml ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ hydra:
2
+ run:
3
+ dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
4
+ sweep:
5
+ dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
6
+ subdir: ${hydra.job.num}
7
+ launcher:
8
+ _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
9
+ sweeper:
10
+ _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
11
+ max_batch_size: null
12
+ params: null
13
+ help:
14
+ app_name: ${hydra.job.name}
15
+ header: '${hydra.help.app_name} is powered by Hydra.
16
+
17
+ '
18
+ footer: 'Powered by Hydra (https://hydra.cc)
19
+
20
+ Use --hydra-help to view Hydra specific help
21
+
22
+ '
23
+ template: '${hydra.help.header}
24
+
25
+ == Configuration groups ==
26
+
27
+ Compose your configuration from those groups (group=option)
28
+
29
+
30
+ $APP_CONFIG_GROUPS
31
+
32
+
33
+ == Config ==
34
+
35
+ Override anything in the config (foo.bar=value)
36
+
37
+
38
+ $CONFIG
39
+
40
+
41
+ ${hydra.help.footer}
42
+
43
+ '
44
+ hydra_help:
45
+ template: 'Hydra (${hydra.runtime.version})
46
+
47
+ See https://hydra.cc for more info.
48
+
49
+
50
+ == Flags ==
51
+
52
+ $FLAGS_HELP
53
+
54
+
55
+ == Configuration groups ==
56
+
57
+ Compose your configuration from those groups (For example, append hydra/job_logging=disabled
58
+ to command line)
59
+
60
+
61
+ $HYDRA_CONFIG_GROUPS
62
+
63
+
64
+ Use ''--cfg hydra'' to Show the Hydra config.
65
+
66
+ '
67
+ hydra_help: ???
68
+ hydra_logging:
69
+ version: 1
70
+ formatters:
71
+ simple:
72
+ format: '[%(asctime)s][HYDRA] %(message)s'
73
+ handlers:
74
+ console:
75
+ class: logging.StreamHandler
76
+ formatter: simple
77
+ stream: ext://sys.stdout
78
+ root:
79
+ level: INFO
80
+ handlers:
81
+ - console
82
+ loggers:
83
+ logging_example:
84
+ level: DEBUG
85
+ disable_existing_loggers: false
86
+ job_logging:
87
+ version: 1
88
+ formatters:
89
+ simple:
90
+ format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
91
+ handlers:
92
+ console:
93
+ class: logging.StreamHandler
94
+ formatter: simple
95
+ stream: ext://sys.stdout
96
+ file:
97
+ class: logging.FileHandler
98
+ formatter: simple
99
+ filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
100
+ root:
101
+ level: INFO
102
+ handlers:
103
+ - console
104
+ - file
105
+ disable_existing_loggers: false
106
+ env: {}
107
+ mode: RUN
108
+ searchpath: []
109
+ callbacks: {}
110
+ output_subdir: .hydra
111
+ overrides:
112
+ hydra:
113
+ - hydra.mode=RUN
114
+ task:
115
+ - training.num_epochs=1
116
+ - training.per_device_train_batch_size=4
117
+ - training.per_device_eval_batch_size=4
118
+ - dataset.dataset_usage_percentage=0.01
119
+ - dataset.max_length=4096
120
+ - training.save_strategy=epoch
121
+ - training.push_to_hub=true
122
+ - training.hub_model_id=twanghcmut/llama-mixlora-2
123
+ - training.hub_strategy=end
124
+ - model.mixlora_config.num_experts=4
125
+ - model.mixlora_config.moe_top_k=1
126
+ - paths.output_dir=/research
127
+ - eval.harness.tasks=[hellaswag]
128
+ - eval.load_model_path=null
129
+ job:
130
+ name: train_llama_mixlora
131
+ chdir: null
132
+ override_dirname: dataset.dataset_usage_percentage=0.01,dataset.max_length=4096,eval.harness.tasks=[hellaswag],eval.load_model_path=null,model.mixlora_config.moe_top_k=1,model.mixlora_config.num_experts=4,paths.output_dir=/research,training.hub_model_id=twanghcmut/llama-mixlora-2,training.hub_strategy=end,training.num_epochs=1,training.per_device_eval_batch_size=4,training.per_device_train_batch_size=4,training.push_to_hub=true,training.save_strategy=epoch
133
+ id: ???
134
+ num: ???
135
+ config_name: train_llama_mixlora
136
+ env_set: {}
137
+ env_copy: []
138
+ config:
139
+ override_dirname:
140
+ kv_sep: '='
141
+ item_sep: ','
142
+ exclude_keys: []
143
+ runtime:
144
+ version: 1.3.2
145
+ version_base: '1.3'
146
+ cwd: /workspace
147
+ config_sources:
148
+ - path: hydra.conf
149
+ schema: pkg
150
+ provider: hydra
151
+ - path: /workspace/configs
152
+ schema: file
153
+ provider: main
154
+ - path: ''
155
+ schema: structured
156
+ provider: schema
157
+ output_dir: /workspace/outputs/2025-11-22/05-50-23
158
+ choices:
159
+ training: llama_sft
160
+ dataset: alpaca_cleaned
161
+ model: llama2_7b_mixlora
162
+ hydra/env: default
163
+ hydra/callbacks: null
164
+ hydra/job_logging: default
165
+ hydra/hydra_logging: default
166
+ hydra/hydra_help: default
167
+ hydra/help: default
168
+ hydra/sweeper: basic
169
+ hydra/launcher: basic
170
+ hydra/output: default
171
+ verbose: false
2025-11-22/05-50-23/.hydra/overrides.yaml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ - training.num_epochs=1
2
+ - training.per_device_train_batch_size=4
3
+ - training.per_device_eval_batch_size=4
4
+ - dataset.dataset_usage_percentage=0.01
5
+ - dataset.max_length=4096
6
+ - training.save_strategy=epoch
7
+ - training.push_to_hub=true
8
+ - training.hub_model_id=twanghcmut/llama-mixlora-2
9
+ - training.hub_strategy=end
10
+ - model.mixlora_config.num_experts=4
11
+ - model.mixlora_config.moe_top_k=1
12
+ - paths.output_dir=/research
13
+ - eval.harness.tasks=[hellaswag]
14
+ - eval.load_model_path=null
2025-11-22/05-50-23/train_llama_mixlora.log ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [2025-11-22 05:51:09,745][accelerate.utils.modeling][INFO] - We will use 90% of the memory on device 0 for storing the model, and 10% for the buffer to avoid OOM. You can set `max_memory` in to a higher value to use more memory (at your own risk).
2
+ [2025-11-22 05:51:15,642][accelerate.utils.other][WARNING] - Detected kernel version 4.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - generated_from_trainer
5
+ model-index:
6
+ - name: llama-mixlora-2
7
+ results: []
8
+ ---
9
+
10
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
11
+ should probably proofread and complete it, then remove this comment. -->
12
+
13
+ # llama-mixlora-2
14
+
15
+ This model is a fine-tuned version of [](https://huggingface.co/) on the None dataset.
16
+ It achieves the following results on the evaluation set:
17
+ - Loss: 1.0593
18
+
19
+ ## Model description
20
+
21
+ More information needed
22
+
23
+ ## Intended uses & limitations
24
+
25
+ More information needed
26
+
27
+ ## Training and evaluation data
28
+
29
+ More information needed
30
+
31
+ ## Training procedure
32
+
33
+ ### Training hyperparameters
34
+
35
+ The following hyperparameters were used during training:
36
+ - learning_rate: 0.0002
37
+ - train_batch_size: 4
38
+ - eval_batch_size: 4
39
+ - seed: 42
40
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
41
+ - lr_scheduler_type: linear
42
+ - lr_scheduler_warmup_steps: 100
43
+ - num_epochs: 1
44
+
45
+ ### Training results
46
+
47
+ | Training Loss | Epoch | Step | Validation Loss |
48
+ |:-------------:|:-----:|:----:|:---------------:|
49
+ | 1.1664 | 1.0 | 104 | 1.0593 |
50
+
51
+
52
+ ### Framework versions
53
+
54
+ - Transformers 4.57.1
55
+ - Pytorch 2.9.1+cu128
56
+ - Datasets 4.4.1
57
+ - Tokenizers 0.22.1
config.json ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "base_model_name": "meta-llama/Llama-2-7b-hf",
3
+ "num_experts": 4,
4
+ "moe_top_k": 1,
5
+ "lora_r": 32,
6
+ "lora_alpha": 16,
7
+ "lora_dropout": 0.1,
8
+ "use_augmentation": true,
9
+ "alpha_scale": 1.0,
10
+ "beta_scale": 1.0,
11
+ "dtype": null,
12
+ "device_map": "auto",
13
+ "trust_remote_code": false,
14
+ "return_dict": true,
15
+ "output_hidden_states": false,
16
+ "torchscript": false,
17
+ "pruned_heads": {},
18
+ "tie_word_embeddings": true,
19
+ "chunk_size_feed_forward": 0,
20
+ "is_encoder_decoder": false,
21
+ "is_decoder": false,
22
+ "cross_attention_hidden_size": null,
23
+ "add_cross_attention": false,
24
+ "tie_encoder_decoder": false,
25
+ "architectures": null,
26
+ "finetuning_task": null,
27
+ "id2label": {
28
+ "0": "LABEL_0",
29
+ "1": "LABEL_1"
30
+ },
31
+ "label2id": {
32
+ "LABEL_0": 0,
33
+ "LABEL_1": 1
34
+ },
35
+ "task_specific_params": null,
36
+ "problem_type": null,
37
+ "tokenizer_class": null,
38
+ "prefix": null,
39
+ "bos_token_id": 1,
40
+ "pad_token_id": 2,
41
+ "eos_token_id": 2,
42
+ "sep_token_id": null,
43
+ "decoder_start_token_id": null,
44
+ "max_length": 20,
45
+ "min_length": 0,
46
+ "do_sample": false,
47
+ "early_stopping": false,
48
+ "num_beams": 1,
49
+ "temperature": 1.0,
50
+ "top_k": 50,
51
+ "top_p": 1.0,
52
+ "typical_p": 1.0,
53
+ "repetition_penalty": 1.0,
54
+ "length_penalty": 1.0,
55
+ "no_repeat_ngram_size": 0,
56
+ "encoder_no_repeat_ngram_size": 0,
57
+ "bad_words_ids": null,
58
+ "num_return_sequences": 1,
59
+ "output_scores": false,
60
+ "return_dict_in_generate": false,
61
+ "forced_bos_token_id": null,
62
+ "forced_eos_token_id": null,
63
+ "remove_invalid_values": false,
64
+ "exponential_decay_length_penalty": null,
65
+ "suppress_tokens": null,
66
+ "begin_suppress_tokens": null,
67
+ "num_beam_groups": 1,
68
+ "diversity_penalty": 0.0,
69
+ "_name_or_path": "",
70
+ "transformers_version": "4.57.1",
71
+ "tf_legacy_loss": false,
72
+ "use_bfloat16": false,
73
+ "model_type": "llama_mixlora",
74
+ "output_attentions": false
75
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5842627c6ed8ef05e6de748a920e370434eb21a8656b34880b994ec5c6fcb03
3
+ size 10313100416
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "</s>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "bos_token": "<s>",
32
+ "clean_up_tokenization_spaces": false,
33
+ "eos_token": "</s>",
34
+ "extra_special_tokens": {},
35
+ "legacy": false,
36
+ "model_max_length": 1000000000000000019884624838656,
37
+ "pad_token": "</s>",
38
+ "padding_side": "right",
39
+ "sp_model_kwargs": {},
40
+ "tokenizer_class": "LlamaTokenizer",
41
+ "unk_token": "<unk>",
42
+ "use_default_system_prompt": false
43
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68fd361b3cb34a88da732b5a623b0e0afc32317fe1e90e82c38954810c4b13e8
3
+ size 5777