lm-sys / lm-sys/FastChat

how to load the ckpt of the Lora training?

Open
#1,249 4 comments 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

Hi, I run the following Lora training script:
```

deepspeed fastchat/train/train_lora.py \
--deepspeed configs/deepspeed_zero3.json \
--lora_r 8 \
--lora_alpha 16 \
--lora_dropout 0.05 \
--model_name_or_path huggyllama/llama-7b \
--data_path data/fastchat_data/0-sharegpt.jsonl \
--bf16 True \
--output_dir ./ckpt/llama-7b-lora-sharegpt \
--num_train_epochs 6 \
--per_device_train_batch_size 6 \
--per_device_eval_batch_size 4 \
--gradient_accumulation_steps 4 \
--evaluation_strategy "steps" \
--eval_steps 1500 \
--save_strategy "steps" \
--save_steps 500 \
--save_total_limit 100 \
--learning_rate 2e-5 \
--weight_decay 0. \
--warmup_ratio 0.03 \
--lr_scheduler_type "cosine" \
--logging_steps 1 \
--model_max_length 2048 \
--report_to "wandb" \
--gradient_checkpointing True \
--dataloader_num_workers 4
```

during training, I get some ckpts.
For example:
![image](https://github.com/lm-sys/FastChat/assets/42565075/4cbfc910-27d4-42b4-880b-475576cc6727)

May I ask how can I load the full model from the ckpt?

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 by reading train_lora.py and the checkpoint layout produced under ./ckpt/llama-7b-lora-sharegpt. Trace how the script saves training checkpoints, then document the supported steps for loading the full model from one. Done means a newcomer can follow the documented procedure using the checkpoint shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.