lm-sys / lm-sys/FastChat

Unable to Fine-Tune

Open
#1,980 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

Following the instruction https://github.com/lm-sys/FastChat, I am able to inference but not able to train.

I am following the fine-tuning section "Fine-tuning Vicuna-7B with Local GPUs" with the script

> torchrun --nproc_per_node=2 --master_port=20001 fastchat/train/train_mem.py \
>     --model_name_or_path ~/model_weights/llama-7b  \
>     --data_path data/dummy_conversation.json \
>     --bf16 True \
>     --output_dir output_vicuna \
>     --num_train_epochs 3 \
>     --per_device_train_batch_size 2 \
>     --per_device_eval_batch_size 2 \
>     --gradient_accumulation_steps 16 \
>     --evaluation_strategy "no" \
>     --save_strategy "steps" \
>     --save_steps 1200 \
>     --save_total_limit 10 \
>     --learning_rate 2e-5 \
>     --weight_decay 0. \
>     --warmup_ratio 0.03 \
>     --lr_scheduler_type "cosine" \
>     --logging_steps 1 \
>     --fsdp "full_shard auto_wrap" \
>     --fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \
>     --tf32 True \
>     --model_max_length 2048 \
>     --gradient_checkpointing True \
>     --lazy_preprocess True

I first tried to read ~/model_weights/llama-7b, which use the llama-7b parameters. I downloaded the model from the link in official website and got params.json consolidated.00.pth checklist.chk. the script is unable to recognize this three files, so I rename params.json with the name config.json and rename the consolidated.00.pth with the name pytorch_model.bin but it is not working.

I then try to directly train the vicuna model with the script. so I replace ~/model_weights/llama-7b in the script with the directory pointing to my vicuna model, but unable to do so.

Could anyone answer this question? thank you very much.

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 the fine-tuning section of the FastChat instructions and fastchat/train/train_mem.py, then reproduce the command using the reported model directory while capturing the complete error output. Compare the expected model files with the downloaded LLaMA or Vicuna files; done means the documented command recognizes the model and begins training, or the instructions clearly explain the required conversion.

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
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.