Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update llama_factory.rst which might be more user-friendly for beginners #850

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/source/training/SFT/llama_factory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ Training
Execute the following training command:

.. code:: bash
# for example,using deepspeed_z3 train Qwen2-7B-Instruct in 2GPUs(1 node)
export NPROC_PER_NODE=2
export NNODES=1
export NODE_RANK=0
export MASTER_ADDR="127.0.0.1"
export MASTER_PORT=12345
export DS_CONFIG_PATH="examples/deepspeed/ds_z3_config.json"
export MODEL_PATH="qwen/Qwen2-7B-Instruct"
export OUTPUT_PATH="saves/qwen2-7b-instruct/lora/sft"

DISTRIBUTED_ARGS="
--nproc_per_node $NPROC_PER_NODE \
Expand All @@ -140,7 +149,7 @@ Execute the following training command:
--stage sft \
--do_train \
--use_fast_tokenizer \
--flash_attn \
--flash_attn fa2 \
--model_name_or_path $MODEL_PATH \
--dataset your_dataset \
--template qwen \
Expand Down