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

Late bind external data #269

Merged
merged 6 commits into from
Apr 21, 2023
Merged

Late bind external data #269

merged 6 commits into from
Apr 21, 2023

Conversation

pankajroark
Copy link
Collaborator

Instead of bundling external data into the docker image, download it at model load time using b10cp. b10cp download is very fast and we avoid the decompression step that comes with bundling into docker image. We also avoid the longer build times by bundling weights into docker image.

With https://github.com/basetenlabs/flan-t5-xl-truss/tree/ext-data Downloading the weights, which total around 11 GB, takes 40 seconds compared to 2 minutes when downloading from HuggingFace directly. This is significant improvement in startup time.

Copy link
Collaborator

@bolasim bolasim left a comment

Choose a reason for hiding this comment

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

lgtm pending tests passing

Copy link
Collaborator

@bolasim bolasim left a comment

Choose a reason for hiding this comment

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

One thing that's not clear to me here (maybe I missed it in the last PR),

Where do we ignore that paths in external_data when zipping up the PR? I worry that users will end up with a copy in their image anyways if they don't clean up the data_dir before deploying their model (and I know what the client doesn't check for external_data at this point)

@pankajroark
Copy link
Collaborator Author

One thing that's not clear to me here (maybe I missed it in the last PR),

Where do we ignore that paths in external_data when zipping up the PR? I worry that users will end up with a copy in their image anyways if they don't clean up the data_dir before deploying their model (and I know what the client doesn't check for external_data at this point)

You're right, at this time this will need to be taken care of manually. In future, we should provide a truss cli feature similar to git lfs track, where we do this automatically, i.e. upload file to provided storage, remove local file and update external_data.

@pankajroark pankajroark merged commit 8d4d229 into main Apr 21, 2023
3 checks passed
@pankajroark pankajroark deleted the pg/ext-data-late-bind branch April 21, 2023 03:31
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.

None yet

2 participants