lm-sys / lm-sys/FastChat

LoRA finetuning model didn't converge

Open
#1,734 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

The model did get converge and always output some repeated content.

Here is my hyper params, using 2 v100:

torchrun --nnodes 1 --nproc_per_node 2  train_fschat_lora_bc.py \
    --data_path ./data/train_data.json \
    --model_name_or_path checkpoints/baichuan-7B \
    --deepspeed configs/ds_zero2_offload.json --per_device_train_batch_size 1 \
    --output_dir out/fschat_bc --deepspeed configs/ds_zero2_offload.json \
    --fp16 --num_train_epochs 4 --lazy_preprocess \
    --gradient_accumulation_steps 16 \
    --learning_rate 5e-5 --weight_decay 0. \
    --warmup_ratio 0.03 --lr_scheduler_type "cosine" --model_max_length 512 \
    --resume=$resume

Does anybody knows why? This is very weired since I looked into many lora implementation, their lr actually almost like this..

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with train_fschat_lora_bc.py and reproduce the supplied torchrun command using data/train_data.json, checkpoints/baichuan-7B, and configs/ds_zero2_offload.json. Review the resulting training behavior and hyperparameters, then verify that the fine-tuned model converges without producing repeated content.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.