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

[Partition] Remove redudant model splitting, Improve Input Model Parsing #1609

Merged

Conversation

a-ys
Copy link
Contributor

@a-ys a-ys commented Mar 7, 2024

Description

This PR includes 2 changes

  1. Removed a redundant call to save_pretrained_split in TNXModelLoader partition(). Previously it was called in partition() and then called again in load_inf2_model_from_disk(). We retain only the call in load_inf2_model_from_disk().

    • This was tested with llama-2-7b, reduced partitioning time from 13 min to 9 min (inf2.48xlarge, 6 neuron cores exposed to container, compiler cache populated for both runs)
  2. Improved the error handling of the partition PropertiesManager. Previously, this checked if any .bin files existed in the model artifacts, if not, partitioning would fail. Now, we check for .bin OR .safetensors files, allowing users to pass in models that only have .safetensors files without erros.

cc: @tosterberg

@a-ys a-ys requested review from zachgk, frankfliu and a team as code owners March 7, 2024 22:24
@tosterberg tosterberg merged commit a59383b into deepjavalibrary:master Mar 9, 2024
8 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.

2 participants