Skip to content

Commit

Permalink
test: CI convert llama3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoangthuan99 committed Aug 11, 2024
1 parent 4d7551b commit 2afd462
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/convert-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

0 comments on commit 2afd462

Please sign in to comment.