|
| 1 | +# Model arguments |
| 2 | +model_name_or_path: meta-llama/Llama-3.2-3B-Instruct |
| 3 | +model_revision: main |
| 4 | +torch_dtype: bfloat16 |
| 5 | +attn_implementation: flash_attention_2 |
| 6 | +bf16: true |
| 7 | +tf32: true |
| 8 | +output_dir: runs/llama-3.2-3b-grpo-text2sql-alltrain-lr5-ng8 |
| 9 | + |
| 10 | +# Lora Arguments |
| 11 | +# No LoRA is used here |
| 12 | + |
| 13 | +# Training arguments |
| 14 | +max_steps: 500 # 1000 #500 |
| 15 | +per_device_train_batch_size: 1 |
| 16 | +gradient_accumulation_steps: 8 |
| 17 | +gradient_checkpointing: true |
| 18 | +gradient_checkpointing_kwargs: |
| 19 | + use_reentrant: false |
| 20 | +learning_rate: 5.0e-7 # 1.0e-6 # 5.0e-7 # 1.0e-6 as in the deepseek math paper 5-e7 from https://hijkzzz.notion.site/unraveling-rlhf-and-its-variants-engineering-insights#147d9a33ecc9806090f3d5c749d31f05 |
| 21 | +lr_scheduler_type: cosine |
| 22 | +warmup_ratio: 0.03 |
| 23 | +# GRPO specific parameters |
| 24 | +beta: 0.001 # 0.04 as in the deepseek math paper 0.001 from https://hijkzzz.notion.site/unraveling-rlhf-and-its-variants-engineering-insights#147d9a33ecc9806090f3d5c749d31f05 |
| 25 | +max_prompt_length: 512 # 256 |
| 26 | +max_completion_length: 1024 |
| 27 | +num_generations: 8 # 6 # 8 |
| 28 | +use_vllm: true |
| 29 | + |
| 30 | +# Reward function weights |
| 31 | +# Order: [format_reward_func, execution_reward_func, ensemble_n_gram_reward_func] |
| 32 | +reward_weights: [1.0, 3.0, 1.0] |
| 33 | +# **Recommended Weight Strategy** |
| 34 | +# Current Setting: `[1.0, 3.0, 1.0]`** |
| 35 | +# * **Format reward (1.0)**: Standard weight since format correctness is binary but essential |
| 36 | +# * **Execution reward (3.0)**: **Highest weight** - SQL execution correctness is most important for text2sql |
| 37 | +# * **N-gram similarity (1.0)**: Standard weight for syntactic similarity |
| 38 | + |
| 39 | +# **Alternative Weight Strategies** |
| 40 | +# **Conservative approach: `[2.0, 4.0, 1.0]`** |
| 41 | +# * Emphasizes both format and execution correctness |
| 42 | +# * Lower weight on similarity metrics |
| 43 | +# **Balanced approach: `[1.5, 2.0, 1.5]`** |
| 44 | +# * More balanced across all three metrics |
| 45 | +# * Good for early training stages |
| 46 | +# **Similarity-focused: `[1.0, 2.0, 2.0]`** |
| 47 | +# * Higher weight on N-gram similarity |
| 48 | +# * Useful if execution often fails initially |
| 49 | + |
| 50 | + |
| 51 | +vllm_device: "cuda:0" # use vLLM for generation and DeepSpeed for distributed training. |
| 52 | +# Set the num_processes to the number of GPUs you have - |
| 53 | +# the last one will be used with vLLM for Generation. |
| 54 | +# if you have 6 GPUs, set vllm_device to "cuda:5" (or 5?) and |
| 55 | +# num_processes to 5 (or 6? in which case, 6th GPU will be used |
| 56 | +# for both generation and training |
| 57 | + |
| 58 | +vllm_gpu_memory_utilization: 0.5 |
| 59 | + |
| 60 | +# Logging arguments |
| 61 | +logging_strategy: steps |
| 62 | +logging_steps: 2 |
| 63 | +report_to: |
| 64 | +- tensorboard |
| 65 | +save_strategy: "steps" |
| 66 | +save_steps: 50 |
| 67 | +seed: 42 |
| 68 | + |
| 69 | +# Hugging Face Hub |
| 70 | +push_to_hub: false |
| 71 | + # hub_model_id: llama-3-1-8b-math-orca-qlora-10k-ep1 # if not defined same as output_dir |
| 72 | +hub_strategy: every_save |
0 commit comments