File tree Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Original file line number Diff line number Diff line change 2323 required : true
2424 type : string
2525 description : " The distribution artifact name of torch_npu"
26+ secrets :
27+ hf_token :
28+ description : ' A token passed from the caller workflow'
29+ required : true
2630
2731defaults :
2832 run :
6973 with :
7074 repository : pytorch/torchtune
7175 path : torchtune
76+
77+ - name : Install torchtune
78+ working-directory : torchtune
79+ run : |
80+ pip install -e .
7281
7382 - name : Download torch artifact
7483 if : ${{ inputs.torch-artifact }}
@@ -103,16 +112,19 @@ jobs:
103112 working-directory : ascend_npu
104113 run : |
105114 pip install ${{ inputs.torch-npu-artifact }}
106-
107- - name : Install torchtune
108- working-directory : torchtune
115+
116+ - name : Show environment info
109117 run : |
110- pip install -e .
111-
118+ pip list
119+
112120 - name : Download Qwen2.5 model
121+ env :
122+ HF_TOKEN : ${{ secrets.hf_token }}
113123 run : |
114- tune download Qwen/Qwen2.5-0.5B-Instruct \
115- --output-dir /tmp/Qwen2.5-0.5B-Instruct
124+ export HF_ENDPOINT=https://hf-mirror.com
125+ huggingface-cli download --resume-download Qwen/Qwen2.5-0.5B-Instruct \
126+ --local-dir /tmp/Qwen2.5-0.5B-Instruct \
127+ --token $HF_TOKEN
116128
117129 - name : Run torchtune with lora finetune
118130 run : |
@@ -121,5 +133,3 @@ jobs:
121133 - name : Run torchtune with full finetune
122134 run : |
123135 tune run full_finetune_single_device --config qwen2_5/0.5B_full_single_device || true
124-
125-
You can’t perform that action at this time.
0 commit comments