# CODI + PMPS Training Configuration for GSM8k # Based on codi_ori/args/gsm_codi_train.yaml with PMPS-specific additions model_name_or_path: /data/oss_bucket_0/liqi/models/Llama-3.2-3B-Instruct # model_name_or_path: /data/oss_bucket_0/liqi/models/Qwen3-4B-Instruct-2507 lora_r: 128 lora_alpha: 32 lora_init: True use_lora: True do_train: True # ==================== Data Arguments ==================== data_name: math # ==================== Training Arguments ==================== output_dir: /data/oss_bucket_0/liqi/larger_model/llama-3b/math/k32_t0.1_mt0.1_fac0.3_l8_lr9e4_btz256_pos6_ep300 logging_dir: /data/oss_bucket_0/liqi/larger_model/llama-3b/math/k32_t0.1_mt0.1_fac0.3_l8_lr9e4_btz256_pos6_ep300/logs expt_name: gsm8k_gpt_pmps logging_steps: 10 logging_strategy: steps enable_top_k: False latent_top_k: 30 latent_top_k_temperature: 1.0 # ===== PMPS Loss (NEW) ===== pmps_loss_factor: 0.3 pmps_temperature: 0.1 pmps_match_temperature: 0.1 pmps_epsilon: 0.05 pmps_sinkhorn_iterations: 3 pmps_nmb_prototypes: 32 # ~4 × num_latent (num_latent=6 -> K=24) pmps_feat_dim: 128 pmps_hidden_mlp: 512 # pmps_feat_dim: 256 # pmps_hidden_mlp: 1024 pmps_use_projector: True pmps_freeze_prototypes_steps: 0 pmps_layer: last pmps_start_epoch: 0 # ===== Progressive Sequential PMPS (NEW) ===== pmps_position_bias_max: 6.0 # Max positional bias strength. 0=disabled. Recommended: 3.0~8.0 pmps_position_bias_schedule: cosine # Decay schedule: cosine / linear / constant # ===== Latent Diversity Regularisation (NEW) ===== diversity_loss_factor: 0.0 # Weight for diversity loss. 0=disabled. Recommended: 0.05~0.3 seed: 11 model_max_length: 512 per_device_train_batch_size: 16 # per_device_train_batch_size: 32 # per_device_train_batch_size: 8 # gradient_accumulation_steps: 2 gradient_accumulation_steps: 2 bf16: True num_train_epochs: 300 learning_rate: !!float 9e-4 # learning_rate: !!float 1e-3 max_grad_norm: 2.0 max_token_num: 200 save_strategy: "epoch" save_safetensors: False save_total_limit: 40 weight_decay: 0.1 warmup_ratio: 0.03 lr_scheduler_type: cosine report_to: wandb include_last_cot: True # ==================== Wandb Arguments ==================== use_wandb: True wandb_api_key: "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" # Fill in your wandb API key here wandb_project: codi-pmps-llama-3B-math wandb_run_name: k32_t0.1_mt0.1_fac0.3_l8_lr9e4_btz256_pos6_ep300 # ==================== CODI Specific Arguments ==================== num_latent: 8 use_prj: True prj_dim: 3072 prj_dropout: 0.0 distill_loss_div_std: True exp_mode: False exp_data_num: 200 distill_loss_factor: 20.0 remove_eos: True print_ref_model_stats: True