Skip to content

dscamiss/attention-gradient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

attention-gradient

A PyTorch implementation of scaled dot-product attention, with an explicit backward() method to compute gradients.

The implementation follows this blog post: https://dscamiss.github.io/blog/posts/attention-explicit/.

Usage

git clone https://github.com/dscamiss/attention-gradient && cd attention-gradient
pip install -r requirements.txt
python -m pytest .

About

Scaled dot-product attention with an explicit backward() method

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages