Skip to content

project-codeflare/zero-copy-model-loading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zero-copy-model-loading

Code to accompany the Medium post, "How to Load PyTorch Models 340 Times Faster with Ray".

Notebooks

Notebooks can be found in the notebooks directory:

  • zero_copy_loading.ipynb: The notebook that was used when authoring the original blog post.
  • benchmark/benchmark.ipynb: The notebook that was used when authoring the second post in the series.

Instructions to run notebooks:

  1. Install bash and either anaconda or miniconda.
  2. Check out a copy of this repository and navigate to the root directory of your local copy.
  3. Run the script ./env.sh, which creates an Anaconda environment under <root of your local copy>/env.
    ./env.sh
    
  4. Activate the Anaconda environment:
    conda activate ./env
    
  5. Run JupyterLab:
    jupyter lab
    
  6. Navigate to the notebooks directory and open up the Jupyter notebook of your choice.

Python Package

This repository also contains the source code for the zerocopy library. zerocopy is a Python package that provides functions for implementing zero-copy model loading of PyTorch models on Ray.

You can find the source code for the package inside the package directory.

About

In-depth code associated with my Medium blog post, "How to Load PyTorch Models 340 Times Faster with Ray"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published