1515# RL Configuration
1616# This config consolidates common parameters for RL training across different model sizes
1717
18- base_config : " ../base.yml"
19-
2018# ====== Hardware =====
2119trainer_devices_fraction : 0.5
2220sampler_devices_fraction : 0.5
7270 # If null, the entire model is resharded at once.
7371 reshard_chunk_size : null
7472
75-
7673# ====== Models ======
7774# for MaxText
7875# Model and Tokenizer Configuration
@@ -95,15 +92,16 @@ decoder_layer_input: 'offload'
9592query_proj : ' offload'
9693key_proj : ' offload'
9794value_proj : ' offload'
98- checkpoint_storage_use_ocdbt : false # For Pathways
99- checkpoint_storage_use_zarr3 : false # For Pathways
10095use_pathways : true
10196log_period : 20
97+
98+ # ====== Checkpointing configs ======
99+ checkpoint_storage_use_ocdbt : false # For Pathways
100+ checkpoint_storage_use_zarr3 : false # For Pathways
102101convert_checkpoint_if_possible : true
103102
104103# ====== Debugging ======
105- debug :
106- rl : true
104+ debug : false
107105# If true, Tunix-managed metrics measurement will be enabled. The metrics will be
108106# uploaded to tensorboard.
109107enable_tunix_perf_metrics : false
@@ -190,7 +188,6 @@ checkpoint_period: 50
190188max_num_checkpoints_to_keep : 10
191189
192190# ====== Reward ======
193-
194191reward_exact_answer : 1.0
195192reward_white_space_format_match : 1.0
196193reward_exact_format_match : 0.1
@@ -199,6 +196,13 @@ reward_ratio_guess_to_answer_high: 0.0
199196reward_ratio_guess_to_answer_low : 0.0
200197penalty_incorrect_format : 0.0
201198penalty_incorrect_answer : 0.0
199+ # Optional: path to a user-provided Python file with custom reward functions,
200+ # AND a comma-separated list of function names to import from that file.
201+ # Each function signature: fn(prompts, completions, tmvp_config, **kwargs) -> list[float].
202+ # When both are set, the built-in [match_format_exactly, match_format_approximately,
203+ # check_numbers] reward list is REPLACED entirely.
204+ reward_functions_path : ' '
205+ reward_functions : ' '
202206
203207# ====== Configuration for math_verify Pool ======
204208# Global timeout (seconds) for math_verify calls across all examples in a batch
@@ -235,19 +239,80 @@ eval_dataset_name: 'openai/gsm8k'
235239# tmvp_config, x) -> dict with keys {prompts, question, answer}. When empty
236240# (default), the built-in utils_rl.process_data is used.
237241dataset_processor_path : ' '
238- # Optional: path to a user-provided Python file with custom reward functions,
239- # AND a comma-separated list of function names to import from that file.
240- # Each function signature: fn(prompts, completions, tmvp_config, **kwargs) -> list[float].
241- # When both are set, the built-in [match_format_exactly, match_format_approximately,
242- # check_numbers] reward list is REPLACED entirely.
243- reward_functions_path : ' '
244- reward_functions : ' '
245242train_split : ' train'
246243eval_split : ' test'
247- hf_name : ' main' # subset of Hugging Face dataset
248- tokenizer_type : ' huggingface'
244+ hf_subset : ' main' # subset of Hugging Face dataset
249245
250246# #### MaxText to VLLM Converter validation parameters
251247vllm_load_format : dummy # Format to load the model for conversion. Options are "auto", "dummy"
252248debug_converter : false # If true, run key coverage check, weight stats, and GCS upload then exit without generation.
253249gcs_debug_path : " " # If set and debug_converter=true, upload converted layer-0 and global tensors as .npy to this GCS prefix.
250+
251+ # Logical Axis Rules
252+ logical_axis_rules : [
253+ ['circular_repeats', []],
254+
255+ # Vocabulary Embedding
256+ ['activation_embed_and_logits_batch', ['data', 'stage', 'fsdp', 'fsdp_transpose', 'expert']],
257+ ['activation_embed_and_logits_batch_sequence', ['data', 'stage', 'fsdp', 'fsdp_transpose', 'context', 'expert']],
258+ ['activation_vocab', ['tensor', 'tensor_sequence']],
259+ ['activation_vocab', ['tensor']],
260+ ['activation_vocab', 'tensor_sequence'],
261+ ['vocab', ['tensor', 'tensor_sequence', 'autoregressive']],
262+ ['embed_vocab', ['fsdp', 'fsdp_transpose', 'context', 'expert']],
263+
264+ # Attention
265+ ['activation_batch_attn', ['data', 'fsdp', 'fsdp_transpose', 'expert']],
266+ ['activation_heads', ['tensor', 'tensor_sequence', 'autoregressive']],
267+ ['activation_kv_heads', ['tensor', 'tensor_sequence']],
268+ ['activation_length_attn', ['context']],
269+ ['activation_q_length', ['context']],
270+ ['activation_kv_length', []],
271+ ['activation_embed_attn', ['tensor']],
272+ ['activation_kv', ['tensor', 'tensor_sequence']],
273+ ['activation_kv_batch', ['data', 'fsdp', 'fsdp_transpose', 'expert']],
274+ ['activation_kv_head_dim', ['tensor', 'tensor_sequence']],
275+ ['heads', ['tensor', 'tensor_sequence', 'autoregressive']],
276+ ['q_heads', ['tensor', 'tensor_sequence', 'autoregressive']],
277+ ['kv_heads', ['tensor', 'tensor_sequence', 'autoregressive']],
278+ ['qkv', []],
279+ ['kv', []],
280+ ['kv_head_dim', []],
281+ ['q_lora', ['fsdp', 'fsdp_transpose', 'context', 'expert']],
282+ ['q_lora', ['fsdp', 'context', 'expert']],
283+ ["q_lora_up_proj", []],
284+ ['kv_lora', ['fsdp', 'fsdp_transpose', 'context', 'expert']],
285+ ['kv_lora', ['fsdp', 'context', 'expert']],
286+ ["kv_lora_up_proj", []],
287+
288+ # Mixture of Experts (MoE)
289+ ['activation_batch_moe', ['data', 'fsdp', 'fsdp_transpose', 'expert']],
290+ ['activation_length_moe', ['context']],
291+ ['activation_norm_length_moe', ['tensor_sequence', 'context']],
292+ ['activation_embed_moe', ['tensor']],
293+ ['activation_mlp_moe', ['tensor', 'tensor_sequence']],
294+ ['activation_exp', ['expert']],
295+ ['exp', 'expert'],
296+ ['mlp_moe', ['fsdp_transpose', 'tensor', 'tensor_sequence', 'autoregressive']],
297+ ['embed_moe', ['fsdp', 'fsdp_transpose', 'context']],
298+ ['embed_moe', ['fsdp', 'context']],
299+
300+ # Standard MLP / Dense Layers / Model Structure
301+ ['activation_mlp', ['tensor', 'tensor_sequence']],
302+ ['activation_batch', ['data', 'fsdp', 'fsdp_transpose', 'expert']],
303+ ['activation_length', ['context']],
304+ ['activation_norm_length', ['tensor_sequence', 'context']],
305+ ['activation_embed', ['tensor']],
306+ ['activation_stage', 'stage'],
307+ ['mlp', ['fsdp_transpose', 'tensor', 'tensor_sequence', 'autoregressive']],
308+ ['gdn_head', ['fsdp_transpose', 'tensor', 'tensor_sequence', 'autoregressive']],
309+ ['embed', ['fsdp', 'fsdp_transpose', 'context', 'expert']],
310+ ['embed', ['fsdp', 'context', 'expert']],
311+ ['norm', ['tensor']],
312+ ['layers', 'stage'],
313+ ['diloco', 'diloco'],
314+ ['engram_dim', ['tensor']],
315+ ['dense_layers', []],
316+ ['moe_layers', []],
317+ ['mhc', []],
318+ ]
0 commit comments