From 2afd4620f10449e717c76a167f40057e23b6788b Mon Sep 17 00:00:00 2001 From: Thuandz Date: Sun, 11 Aug 2024 21:54:21 +0700 Subject: [PATCH] test: CI convert llama3.1 --- .github/workflows/convert-model.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/convert-model.yml b/.github/workflows/convert-model.yml index b36e32b..edfe16a 100644 --- a/.github/workflows/convert-model.yml +++ b/.github/workflows/convert-model.yml @@ -125,18 +125,19 @@ jobs: - name: Convert to ONNX - DirectML - INT4 shell: powershell run: | + mkdir -p ${{ env.MODEL_NAME }}/onnx huggingface-cli login --token ${{ secrets.HUGGINGFACE_TOKEN_READ }} --add-to-git-credential - python3 "onnxruntime-genai/src/python/py/models/builder.py" -i "C:\\models\\${{ env.MODEL_NAME }}\\hf" -o "C:\\models\\${{ env.MODEL_NAME }}\\onnx" -p ${{ env.PRECISION }} -e ${{ env.EXECUTOR }} -c "C:\\models\\${{ env.MODEL_NAME }}\\cache" + python3 "onnxruntime-genai/src/python/py/models/builder.py" -i "C:\\models\\${{ env.MODEL_NAME }}\\hf" -o "${{ env.MODEL_NAME }}\\onnx" -p ${{ env.PRECISION }} -e ${{ env.EXECUTOR }} -c "C:\\models\\${{ env.MODEL_NAME }}\\cache" huggingface-cli logout - name: Upload to Hugging Face run: | Get-ChildItem -Path "C:\\models\\${{ env.MODEL_NAME }}/onnx" -Force huggingface-cli login --token ${{ secrets.HUGGINGFACE_TOKEN_WRITE }} --add-to-git-credential - huggingface-cli upload ${{ env.USER_NAME }}/${{ env.TARGET_MODEL_ID }} "C:\\models\\${{ env.MODEL_NAME }}/onnx" . --revision "${{ env.SOURCE_MODEL_SIZE }}-onnx" + huggingface-cli upload "${{ env.USER_NAME }}/${{ env.TARGET_MODEL_ID }}" "${{ env.MODEL_NAME }}\\onnx" . --revision "${{ env.SOURCE_MODEL_SIZE }}-onnx" huggingface-cli logout - # - name: Cleanup - # if: always() - # run: | - # Remove-Item -Recurse -Force -Path "${{ env.MODEL_NAME }}" + - name: Cleanup + if: always() + run: | + Remove-Item -Recurse -Force -Path "${{ env.MODEL_NAME }}"