Upload attention based model#1866
Merged
wanghan-iapcm merged 35 commits intodeepmodeling:develfrom Aug 26, 2022
Merged
Conversation
Devel update
Devel update
Devel update
Devel update
Devel update
Devel update
Devel update
Devel update
Devel update 2.0.0 with more features
Devel update
Devel update
Devel update
Collaborator
Author
Codecov Report
@@ Coverage Diff @@
## devel #1866 +/- ##
===========================================
- Coverage 76.98% 61.53% -15.45%
===========================================
Files 117 4 -113
Lines 9417 13 -9404
===========================================
- Hits 7250 8 -7242
+ Misses 2167 5 -2162 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
njzjz
requested changes
Aug 19, 2022
Member
njzjz
left a comment
There was a problem hiding this comment.
This is a preliminary review.
Besides, there is no documentation to describe it.
wanghan-iapcm
requested changes
Aug 20, 2022
Collaborator
wanghan-iapcm
left a comment
There was a problem hiding this comment.
- The organization and the data format of the DPA model is different from the standard DP model. We should explain in the doc what is the difference and how to prepare data.
Member
njzjz
reviewed
Aug 23, 2022
Add docs to ntype and nmask in ProdEnvMatAMix. Change nmask from FPTYPE to bool. Fix bugs in toc depth.
wanghan-iapcm
requested changes
Aug 24, 2022
Delete the need of 'real_atom_numbs.npy' from both code and doc. Add correct checks for each systems of mix_type format. Add none support in get_activation_func.
njzjz
reviewed
Aug 25, 2022
Change the default values of type_embedding_args in argcheck.py. Match args in TypeEmbedNet of se_atten with default ones in type_embedding_args.
njzjz
reviewed
Aug 25, 2022
Change default activation_function back to 'tanh' in tebd. Use None in se_atten if not provided.
njzjz
approved these changes
Aug 25, 2022
wanghan-iapcm
approved these changes
Aug 26, 2022
wanghan-iapcm
pushed a commit
that referenced
this pull request
Oct 27, 2022
) Fixes #1400. Fixes #2009. 1. Uses cmake native module `CMakeDetermineHIPCompiler` to find the search path; 2. for ROCm>=3.5.1, `hip-hcc hiprtc` is replaced by `amd_comgr amdhip64`, per ROCm/ROCm#1200. (I am not sure about the situation of `amd_comgr`?) 3. Removes `-hc` from the flag for ROCm>=3.5.1. 4. Bumps from C++11 to C++14 as C++ 14 required by `amd_comgr`. 5. Removes `--amdgpu-target=gfx906`. I don't see the reason why it is in the flag. 6. Fixes a typo in #1866. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
mingzhong15
pushed a commit
to mingzhong15/deepmd-kit
that referenced
this pull request
Jan 15, 2023
Here I upload the implementation of attention based model (DPA-1), see details in paper: https://arxiv.org/abs/2208.08236. The changes can mainly be listed as following: 1. Add a new descriptor '**se_atten**', using attention schemes and type embeddings (deepmd/descriptor/se_atten.py); 2. Add a new custom op '**ProdEnvMatAMix**', mixing atoms with different types in the sorting, which is only suitable for descriptor using type embeddings (source/op/prod_env_mat_multi_device.cc and other sub files, here I try the best to reuse the previous codes); 3. Other changes to match the newly added descriptor, such as 'sel' supporting 'int' type as input (deepmd/entrypoints/train.py ) and type embedding with padding (deepmd/utils/type_embed.py); 4. **Mixed_type**: a new format of DeepmdData to put different systems sharing the same 'nloc' (instead of same fingerprints) together. (deepmd/utils/data.py & data_system.py) Note that this is only the training code on this new format of data. The generation code of this new format will soon be uploaded in _dpdata_. 5. An example of DPA-1 on water system (examples/water/se_atten/input.json); 6. The unittests on both C++&CUDA&ROCM and python interface of newly added apis(source/lib/tests & source/tests). Unittests passed individually for these newly added features. Thanks for reviewing and disccusions are welcome.
mingzhong15
pushed a commit
to mingzhong15/deepmd-kit
that referenced
this pull request
Jan 15, 2023
…epmodeling#2012) Fixes deepmodeling#1400. Fixes deepmodeling#2009. 1. Uses cmake native module `CMakeDetermineHIPCompiler` to find the search path; 2. for ROCm>=3.5.1, `hip-hcc hiprtc` is replaced by `amd_comgr amdhip64`, per ROCm/ROCm#1200. (I am not sure about the situation of `amd_comgr`?) 3. Removes `-hc` from the flag for ROCm>=3.5.1. 4. Bumps from C++11 to C++14 as C++ 14 required by `amd_comgr`. 5. Removes `--amdgpu-target=gfx906`. I don't see the reason why it is in the flag. 6. Fixes a typo in deepmodeling#1866. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Here I upload the implementation of attention based model (DPA-1), see details in paper: https://arxiv.org/abs/2208.08236.
The changes can mainly be listed as following:
Add a new descriptor 'se_atten', using attention schemes and type embeddings (deepmd/descriptor/se_atten.py);
Add a new custom op 'ProdEnvMatAMix', mixing atoms with different types in the sorting, which is only suitable for descriptor using type embeddings (source/op/prod_env_mat_multi_device.cc and other sub files, here I try the best to reuse the previous codes);
Other changes to match the newly added descriptor, such as 'sel' supporting 'int' type as input (deepmd/entrypoints/train.py ) and type embedding with padding (deepmd/utils/type_embed.py);
Mixed_type: a new format of DeepmdData to put different systems sharing the same 'nloc' (instead of same fingerprints) together. (deepmd/utils/data.py & data_system.py) Note that this is only the training code on this new format of data. The generation code of this new format will soon be uploaded in dpdata.
An example of DPA-1 on water system (examples/water/se_atten/input.json);
The unittests on both C++&CUDA&ROCM and python interface of newly added apis(source/lib/tests & source/tests).
Unittests passed individually for these newly added features. Thanks for reviewing and disccusions are welcome.