Skip to content

Commit

Permalink
Clarifiy se_atten_v2 compression doc (#3727)
Browse files Browse the repository at this point in the history
#3643

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- **Documentation**
- Simplified the description for the number of attention layers in the
code documentation.
- Added a notice about model compression compatibility for `se_atten_v2`
descriptor in the documentation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
(cherry picked from commit 62832e8)
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
nahso and njzjz committed Jul 3, 2024
1 parent 446d2f0 commit ef73b7a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deepmd_utils/utils/argcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def descrpt_se_atten_common_args():
doc_seed = "Random seed for parameter initialization"
doc_exclude_types = "The excluded pairs of types which have no interaction with each other. For example, `[[0, 1]]` means no interaction between type 0 and type 1."
doc_attn = "The length of hidden vectors in attention layers"
doc_attn_layer = "The number of attention layers. Note that model compression of `se_atten` is only enabled when attn_layer==0 and stripped_type_embedding is True"
doc_attn_layer = "The number of attention layers."
doc_attn_dotr = "Whether to do dot product with the normalized relative coordinates"
doc_attn_mask = "Whether to do mask on the diagonal in the attention matrix"

Expand Down
2 changes: 2 additions & 0 deletions doc/freeze/compress.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ The model compression interface requires the version of DeePMD-kit used in the o

Descriptors with `se_e2_a`, `se_e3`, `se_e2_r` and `se_atten_v2` types are supported by the model compression feature. `Hybrid` mixed with the above descriptors is also supported.

Notice: Model compression for the `se_atten_v2` descriptor is exclusively designed for models with the training parameter {ref}`attn_layer <model/descriptor[se_atten_v2]/attn_layer>` set to 0.

**Available activation functions for descriptor:**

- tanh
Expand Down
2 changes: 2 additions & 0 deletions doc/model/train-se-atten.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ We highly recommend using the version 2.0 of the attention-based descriptor `"se

Practical evidence demonstrates that `"se_atten_v2"` offers better and more stable performance compared to `"se_atten"`.

Notice: Model compression for the `se_atten_v2` descriptor is exclusively designed for models with the training parameter {ref}`attn_layer <model/descriptor[se_atten_v2]/attn_layer>` set to 0.

### Fitting `"ener"`

DPA-1 only supports `"ener"` fitting type, and you can refer [here](train-energy.md) for detailed information.
Expand Down

0 comments on commit ef73b7a

Please sign in to comment.