Skip to content

Using lora for training is not effective #66

@tsrigo

Description

@tsrigo

I also tried modifying the format reward; although the value increased, the image remained pretty much the same, oscillating continuously.

Image

Image

My cofig:

# Model arguments
model_name_or_path: Qwen/Qwen2.5-7B-Instruct
model_revision: main
torch_dtype: bfloat16
attn_implementation: flash_attention_2

# Data training arguments
dataset_name: xiaodongguaAIGC/X-R1-1500
dataset_configs:
- train

# GRPO trainer config
bf16: true
use_vllm: false
vllm_device: "auto"
vllm_gpu_memory_utilization: 0.45
gradient_accumulation_steps: 16
gradient_checkpointing: true
gradient_checkpointing_kwargs:
  use_reentrant: false
hub_strategy: every_save
learning_rate: 1.0e-06
log_level: info
logging_steps: 10
logging_strategy: steps
lr_scheduler_type: cosine
max_prompt_length: 256
num_generations: 8
max_completion_length: 1024
max_steps: -1
max_grad_norm: 1.0
num_train_epochs: 5
output_dir: output/X-R1-7B-n8-peft-stable
overwrite_output_dir: true
per_device_train_batch_size: 2
push_to_hub: False
report_to:
  - wandb
save_strategy: "epoch"
seed: 42
warmup_ratio: 0.1

# GRPO trainer config for evaluate
do_eval: true
eval_strategy: "epoch"
per_device_eval_batch_size: 4

# lora config
# task_type: model_args.lora_task_type
# lora_in_4bit: True
lora_r: 16
lora_target_modules: ["q_proj", "v_proj", "k_proj", "embed_tokens"]
lora_alpha: 8
lora_dropout: 0.05
bias: "none"
use_peft: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions