Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rasbt/pytorch-memory-optim

This code repository contains the code used for my "Optimizing Memory Usage for Training LLMs and Vision Transformers in PyTorch" blog post.
https://github.com/rasbt/pytorch-memory-optim

deep-learning llm memory-optimization pytorch vision vit

Last synced: 16 days ago
JSON representation

This code repository contains the code used for my "Optimizing Memory Usage for Training LLMs and Vision Transformers in PyTorch" blog post.

Awesome Lists containing this project

README

        

# Optimizing PyTorch Memory Usage

This code repository contains the code used for my "Optimizing Memory Usage for Training LLMs and Vision Transformers in PyTorch" blog post.

You can install the dependencies via

```bash
pip install -r requirements.txt
```

The scripts are all standalone scripts and can be run by executing

```bash
python 01_pytorch-vit.py
```

and so forth. The only requirement is to have the [`local_utilities.py`](local_utilities.py) in the same folder as the script as it contains some data loading utilities that are reused across all the scripts.

I tracked the script outputs in the [`logs.md`](logs.md) file.

![overview](figures/overview.png)