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

Add npu option for model exporting #4080

Merged
merged 4 commits into from
Jun 5, 2024
Merged

Add npu option for model exporting #4080

merged 4 commits into from
Jun 5, 2024

Conversation

MengqingCao
Copy link
Contributor

@MengqingCao MengqingCao commented Jun 5, 2024

What does this PR do?

Add npu option for model exporting

More Info

耗时测试

经测试,导出 qwen1.5-7b 模型 npu 和 cpu 的耗时如下(使用time统计的整个脚本执行时间):

device 耗时
cpu 2m30.411s
npu 1m34.301s

启动脚本

ASCEND_RT_VISIBLE_DEVICES=0 llamafactory-cli export --model_name_or_path qwen/Qwen1.5-7B \
                --adapter_name_or_path saves/Qwen1.5-7B/lora/sft \
                --template qwen \
                --finetuning_type lora \
                --export_dir models/qwen1_5-7b_lora_sft \
                --export_size 2 \
                --export_device npu \
                --export_legacy_format false

webui 变化

增加 npu 选项后,LlamaBoard 前端显示如图:

image

Before submitting

@hiyouga hiyouga self-requested a review June 5, 2024 19:15
@hiyouga
Copy link
Owner

hiyouga commented Jun 5, 2024

LGTM

@hiyouga hiyouga merged commit ca459f6 into hiyouga:main Jun 5, 2024
1 check passed
@hiyouga hiyouga added the solved This problem has been already solved label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants