prigoyal/pytorch_memonger

★ 364⑂ 0

Experimental ground for optimizing memory of pytorch models

About prigoyal/pytorch_memonger

prigoyal/pytorch_memonger is an open-source project on GitHub, mainly written in Python. Experimental ground for optimizing memory of pytorch models It currently holds 364 stars and 0 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the AI Agent Memory board.

GitHub Repository Details

Repository prigoyal/pytorch_memonger · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

PyTorch Memory optimizations via gradient checkpointing

This repository contains implementation of various PyTorch models using the gradient checkpointing[1] which allows trading compute for memory and hence allows training bigger/wider models and use large minibatch sizes.

The application of checkpointing is showcased on various models:

Results of checkpointing on these models are showcased below:

In order to use the models, you need to install PyTorch master following instructions from here

To run checkpointed models and their baseline tests, follow the commands below:

# for checkpointed
python test_memory_optimized.py

for baseline

python test_memory_optimized.py

Tutorial

We provide a tutorial to describe how to use checkpointing for various kinds of models.

There are few special kinds of layers like Batch normalization, dropout that should be handled carefully. The details for handling those are also available in the tutorial

References

[1]. Siskind, Jeffrey Mark, and Barak A. Pearlmutter. "Divide-and-Conquer Checkpointing for Arbitrary Programs with No User Annotation." arXiv preprint arXiv:1708.06799 (2017).

GitHub Stars & Activity

364Stars
0Forks
0Open issues
PythonLanguage

GitHub Popularity

GitHub stars364
Forks0
Open issues0
Primary languagePython
License-
Stars gained today0
Created-
Last pushed-

Trending History

Trending statusnot on today's boards

Related AI Projects

1

mem0ai / mem0

Python★ 65,719⑂ 0
2

volcengine / OpenViking

Python★ 38,212⑂ 0
3

topoteretes / cognee

Python★ 30,864⑂ 0
4

MemoriLabs / Memori

Python★ 16,866⑂ 0
5

NevaMind-AI / memU

Python★ 14,418⑂ 0
6

EverMind-AI / EverOS

Python★ 13,094⑂ 0
7

plastic-labs / honcho

Python★ 7,274⑂ 0
8

FlowElement-xinliuyuansu / m_flow

Python★ 4,507⑂ 0

More AI Rankings