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

Qwen devices #553

Merged
merged 18 commits into from
Sep 20, 2024
Merged

Qwen devices #553

merged 18 commits into from
Sep 20, 2024

Conversation

ShawnXuan
Copy link
Contributor

@ShawnXuan ShawnXuan commented Sep 18, 2024

推理

  • cuda PASS
python projects/Qwen/pipeline.py --model_path=/root/models/Qwen1.5-7B-Chat --mode=huggingface
  • npu PASS
python projects/Qwen/pipeline.py --model_path=/data0/hf_models/qwen2/Qwen1.5-7B-Chat --mode=huggingface --device=npu
  • xpu PASS
python projects/Qwen/pipeline.py --model_path=/root/models/Qwen1.5-7B-Chat --mode=huggingface --device=xpu

训练

  • data preparation
python projects/Qwen/utils/data_prepare.py
  • cuda PASS
export NUM_GPUS=8
python3 -m oneflow.distributed.launch \
    --nproc_per_node ${NUM_GPUS} \
    --nnodes 1 \
    --node_rank 0 \
    --master_addr 127.0.0.1 \
    --master_port 12345 \
        tools/train_net.py --config-file=projects/Qwen/configs/qwen_sft.py \
            graph.enabled=True \
            train.input_placement_device="cuda" \
            train.dist.device_type="cuda" \
            train.dist.pipeline_parallel_size=${NUM_GPUS}

A100-PCIE-40GB x 4 OOM

  • xpu OOM
export NUM_GPUS=1
python3 -m oneflow.distributed.launch \
    --nproc_per_node ${NUM_GPUS} \
    --nnodes 1 \
    --node_rank 0 \
    --master_addr 127.0.0.1 \
    --master_port 12345 \
        tools/train_net.py --config-file=projects/Qwen/configs/qwen_sft.py \
            graph.enabled=False \
            train.input_placement_device="xpu" \
            train.dist.device_type="xpu" \
            train.dist.pipeline_parallel_size=${NUM_GPUS}
  • npu 没有测,应该不行

@ShawnXuan ShawnXuan marked this pull request as ready for review September 19, 2024 11:22
@ShawnXuan ShawnXuan merged commit 7b280a3 into qwen Sep 20, 2024
2 checks passed
@ShawnXuan ShawnXuan deleted the qwen_devices branch September 20, 2024 02:55
ShawnXuan added a commit that referenced this pull request Sep 20, 2024
* add qwen2

* update

* fix

* refine

* refine

* Qwen devices (#553)

* update

* format

* readme

* update README

* fix

* update readme

* config -> configs

* update sft

* update

* update

* update

* black format

* format and isort

* fix imports

* rm usless files

* format

---------

Co-authored-by: XIE Xuan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants