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

Fsdp inference checkpoints #39

Merged
merged 22 commits into from Jul 31, 2023
Merged

Fsdp inference checkpoints #39

merged 22 commits into from Jul 31, 2023

Conversation

HamidShojanazeri
Copy link
Contributor

Adding converter script for converting FSDP sharded state dict to HF model for inference.

parent_directory = os.path.dirname(current_directory)

# Append the parent directory to sys.path
sys.path.append(parent_directory)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move the code for path setting inside main / function

inference/inference.py Outdated Show resolved Hide resolved
inference/inference.py Outdated Show resolved Hide resolved
docs/inference.md Outdated Show resolved Hide resolved
Copy link
Contributor

@chauhang chauhang left a comment

Choose a reason for hiding this comment

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

@HamidShojanazeri Thanks for getting this started. Please see comments inline

docs/inference.md Outdated Show resolved Hide resolved
Copy link
Contributor

@chauhang chauhang left a comment

Choose a reason for hiding this comment

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

Please add steps used for testing this out, including below along with output of your test for verification:

  1. command to run and generate the pure fsdp checkpoint
  2. command for converting the checkpoint to HF format for inference
  3. command for running the inference

@HamidShojanazeri
Copy link
Contributor Author

Please add steps used for testing this out, including below along with output of your test for verification:

  1. command to run and generate the pure fsdp checkpoint
  2. command for converting the checkpoint to HF format for inference
  3. command for running the inference

done.

docs/inference.md Outdated Show resolved Hide resolved
inference/inference.py Outdated Show resolved Hide resolved
@chauhang chauhang merged commit 0cd5694 into main Jul 31, 2023
3 checks passed
@chauhang chauhang deleted the fsdp-inference-checkpoints branch August 1, 2023 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants