-
Notifications
You must be signed in to change notification settings - Fork 74
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
Flash v2 #137
base: main
Are you sure you want to change the base?
Flash v2 #137
Conversation
* readme * add contributing and dco
* rename scripts * fix bug * refine scripts * fix renaming bug * keep 10 ckps * dump outputs * readme * hierachy * title * introduction * rm converter readme * intro * log interval * README * intro
…rp#7) * add the convert script and alphafold original configs * add the convert script for alphafold and modify the README * add the convert script for alphafold * merge from main
* add script for benchmarking * code clean * add benchmark in memory cost * remove use_lma * add option for LMA
* add evaluation results * par * compress img * figure layout * white bg * png -> jpg * Revert "figure layout" * revert to green
* Update README.md * Update README.md
* optional msa col attn mask * chunk attention * fix chunk_size * code clean Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
* add the colab version of Uni-Fold * add the description of Uni-Fold Colab at README
* refine notebook * rephrase * rephrase * rephrase * rephrase * rm output * rephrase * rephrase Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
change default model name to avoid confusion
* fix uf-symmetry wget url * fix url
* do not download af2 params * do not download af params
* refactor the notebook * change branch * add init * fix auto chunk size * optim plot & fix pae * fix ssave file bug * merge cell * finalize
* fix wrong version * change from google drive to github release
* Update unifold.ipynb * Update unifold.ipynb * Update unifold.ipynb
* update get assembly from mmcif * add comment
* add dataset download via Volcengine * rephrase --------- Co-authored-by: Ziyao Li <36321246+ZiyaoLi@users.noreply.github.com>
* add symmetry utils to process input structures * fix import
…-corp#119) * tolerate inconsistencies between pdb_assembly and multi_label * Update dataset.py
@@ -2,15 +2,16 @@ | |||
[ -z "${n_gpu}" ] && n_gpu=$(nvidia-smi -L | wc -l) | |||
export NCCL_ASYNC_ERROR_HANDLING=1 | |||
export OMP_NUM_THREADS=1 | |||
mkdir -p $1 | |||
mkdir -p temp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once this proposal is validated, modifications to this file can be dropped; was just for easy testing of the code
unifold/modules/attentions.py
Outdated
k = k.view(*k.shape[:-1], self.num_heads, self.head_dim).transpose(-2, -3).contiguous() | ||
v = v.view(*v.shape[:-1], self.num_heads, self.head_dim).transpose(-2, -3) | ||
# (b, n, h, i, dim_head), (b, n, h, j, dim_head) -> (b, n, h, i, dim_head) | ||
o = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about its speed/memory compared with the one with softmax_dropout?
27d1b4e
to
189443e
Compare
Uses flash attention v2. Works for any sequence length.
WARNING! Pls install the custom fork from trident provided below as a zip file. You might need to install
triton-nightly
afterwards (maybe alsonvtx
) to get it working (see triton repo for instructions). Check withipython; import trident as td
trident.zip