# Default GRPO recipe for rhscope.
#
# This recipe is model-agnostic: `model.name_or_path` can point at any
# Hugging Face causal LM. The default below is SmolLM-1.7B, chosen because:
#   - It is Apache 2.0 licensed.
#   - It is small enough to iterate quickly during local development.
#   - With LoRA rank 8 it fits in a few GB of VRAM; swap to a smaller base
#     (SmolLM-360M, Qwen3-0.5B) if you need to free more memory.
#
# Swap it for Qwen3-1.5B, Llama 3.2 3B, or any other causal LM by changing a
# single field. Nothing else in the recipe is model-specific.

model:
  name_or_path: HuggingFaceTB/SmolLM-1.7B
  dtype: bfloat16
  trust_remote_code: false

env:
  name: code_shortcut
  dataset: google-research-datasets/mbpp
  split: train
  max_tasks: 500
  test_timeout_seconds: 5.0
  eval_fraction: 0.1
  reward_threshold: 0.5
  hack_threshold: 0.5
  weak_tests_count: 1

lora:
  enabled: true
  r: 8
  alpha: 16
  dropout: 0.05
  target_modules: all-linear

grpo:
  learning_rate: 1.0e-5
  num_generations: 8
  max_steps: 2000
  per_device_train_batch_size: 1
  gradient_accumulation_steps: 4
  max_prompt_length: 512
  max_completion_length: 512
  temperature: 1.0
  beta: 0.04
  warmup_ratio: 0.03
  weight_decay: 0.0

monitor:
  probe: null         # local probe stem or Hub repo id; null disables the monitor
  penalty_coef: 0.0

logging:
  output_dir: ./checkpoints/grpo_default
  report_to: tensorboard
  logging_steps: 10
  save_steps: 500
  eval_steps: 500

seed: 0
