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

Convert huggingface model to onnx #1888

Merged
merged 4 commits into from
May 14, 2024
Merged

Conversation

xyang16
Copy link
Contributor

@xyang16 xyang16 commented May 8, 2024

Description

Brief description of what this PR is about

  • If this change is a backward incompatible change, why must this change be made?
  • Interesting edge cases to note here

Copy link
Contributor

@lanking520 lanking520 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is worthwhile for us to build a package for this onnx model conversion and standardize the UX

@xyang16 xyang16 marked this pull request as ready for review May 8, 2024 22:40
@xyang16 xyang16 requested review from zachgk, frankfliu and a team as code owners May 8, 2024 22:40
@xyang16 xyang16 force-pushed the onnx branch 4 times, most recently from 8fcc71a to 488ec9b Compare May 9, 2024 21:47
serving/docker/convert/zip_utils.py Outdated Show resolved Hide resolved
serving/docker/convert/huggingface_models.py Outdated Show resolved Hide resolved
serving/docker/convert/metadata.py Outdated Show resolved Hide resolved
serving/docker/convert/.gitignore Outdated Show resolved Hide resolved
@xyang16
Copy link
Contributor Author

xyang16 commented May 11, 2024

I think it is worthwhile for us to build a package for this onnx model conversion and standardize the UX

Done

@xyang16 xyang16 force-pushed the onnx branch 2 times, most recently from 5f3c9fb to e5ff0fc Compare May 11, 2024 02:16
@xyang16 xyang16 force-pushed the onnx branch 7 times, most recently from e6a05af to d80ba02 Compare May 14, 2024 01:40
@@ -92,7 +93,9 @@ RUN pip3 install torch==${torch_version} torchvision==${torch_vision_version} --
transformers==${transformers_version} hf-transfer zstandard datasets==${datasets_version} \
mpi4py sentencepiece tiktoken blobfile einops accelerate==${accelerate_version} bitsandbytes==${bitsandbytes_version} \
optimum==${optimum_version} auto-gptq==${auto_gptq_version} pandas pyarrow jinja2 \
opencv-contrib-python-headless safetensors scipy && \
opencv-contrib-python-headless safetensors scipy \
onnxruntime-gpu==${onnx_version} --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need onnxruntime-gpu?, we only use it for conversion

Copy link
Contributor Author

@xyang16 xyang16 May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for O4 optimization. Otherwise this will fail.

@xyang16 xyang16 merged commit 68036e1 into deepjavalibrary:master May 14, 2024
6 checks passed
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.

3 participants